Building the master branch @ f24b838bedffe19643fafd817b82fc49472d4877 on FreeBSD 14.3:
- with Autotools:
0$ ./autogen.sh
1$ ./configure --disable-static --prefix /tmp/AUTOTOOLS
2$ gmake
3$ gmake install
4$ tree /tmp/AUTOTOOLS/lib
5/tmp/AUTOTOOLS/lib
6├── libsecp256k1.la
7├── libsecp256k1.so -> libsecp256k1.so.5.0.1
8├── libsecp256k1.so.5 -> libsecp256k1.so.5.0.1
9├── libsecp256k1.so.5.0.1
10└── pkgconfig
11 └── libsecp256k1.pc
12
132 directories, 5 files
- with CMake:
0$ cmake -B build -DCMAKE_INSTALL_PREFIX=/tmp/CMAKE
1$ cmake --build build
2$ cmake --install build
3$ tree /tmp/CMAKE/lib
4/tmp/CMAKE/lib
5├── cmake
6│ └── libsecp256k1
7│ ├── libsecp256k1-config-version.cmake
8│ ├── libsecp256k1-config.cmake
9│ ├── libsecp256k1-targets-relwithdebinfo.cmake
10│ └── libsecp256k1-targets.cmake
11├── libsecp256k1.so -> libsecp256k1.so.5
12├── libsecp256k1.so.5
13└── pkgconfig
14 └── libsecp256k1.pc
15
164 directories, 7 files
With this PR:
0$ cmake -B build -DCMAKE_INSTALL_PREFIX=/tmp/CMAKE+PR
1$ cmake --build build
2$ cmake --install build
3$ tree /tmp/CMAKE+PR/lib
4/tmp/CMAKE+PR/lib
5├── cmake
6│ └── libsecp256k1
7│ ├── libsecp256k1-config-version.cmake
8│ ├── libsecp256k1-config.cmake
9│ ├── libsecp256k1-targets-relwithdebinfo.cmake
10│ └── libsecp256k1-targets.cmake
11├── libsecp256k1.so -> libsecp256k1.so.5
12├── libsecp256k1.so.5 -> libsecp256k1.so.5.0.1
13├── libsecp256k1.so.5.0.1
14└── pkgconfig
15 └── libsecp256k1.pc
16
174 directories, 8 files
From FreeBSD Developers’ Handbook:
If you are adding shared library support to a port or other piece of software that does not have one, the version numbers should follow these rules. Generally, the resulting numbers will have nothing to do with the release version of the software.
For ports:
Prefer using the number already selected by upstream
If upstream provides symbol versioning, ensure that we use their script