crypto++: create a versioned soname (#871).

We use the same version for the soname, because I'm not sure if the major
version would be applicable.
This commit is contained in:
Juan RP 2015-02-16 10:14:13 +01:00
parent bf1a4c3110
commit 075ace33f0
3 changed files with 24 additions and 4 deletions

View File

@ -1192,7 +1192,7 @@ libdb-5.3.so libdb-5.3.21_1
libdb_cxx-5.3.so libdb-cxx-5.3.21_1
libsdb.so.0 sdb-0.6.2_1
libcares.so.2 c-ares-1.10.0_1
libcryptopp.so crypto++-562_1
libcryptopp.so.562 crypto++-562_4
libqzeitgeist.so.1 libqzeitgeist-0.8.0_1
libphonon.so.4 phonon-4.6.0_1
libphononexperimental.so.4 phonon-4.6.0_1

View File

@ -0,0 +1,19 @@
--- GNUmakefile.orig 2015-02-16 10:07:31.188232968 +0100
+++ GNUmakefile 2015-02-16 10:09:08.028179047 +0100
@@ -16,6 +16,7 @@ IS_SUN_CC = $(shell $(CXX) -V 2>&1 | $(E
IS_LINUX = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -c "linux")
IS_MINGW = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -c "mingw")
CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang version")
+VERSION = 562
# Default prefix for make install
ifeq ($(PREFIX),)
@@ -165,7 +166,7 @@ libcryptopp.a: $(LIBOBJS)
$(RANLIB) $@
libcryptopp.so: $(LIBOBJS)
- $(CXX) -shared -o $@ $(LIBOBJS)
+ $(CXX) -shared -Wl,-soname=libcryptopp.so.$(VERSION) -o $@.$(VERSION) $(LIBOBJS)
cryptest.exe: libcryptopp.a $(TESTOBJS)
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)

View File

@ -17,15 +17,15 @@ do_build() {
make CXX=$CXX -f GNUmakefile ${makejobs}
make CXX=$CXX libcryptopp.so ${makejobs}
}
do_install() {
install -d ${DESTDIR}/usr/{lib/pkgconfig,include/cryptopp}
install -m644 *.h ${DESTDIR}/usr/include/cryptopp/
install -m644 libcryptopp.a ${DESTDIR}/usr/lib/libcryptopp.a
install -m644 libcryptopp.so ${DESTDIR}/usr/lib/libcryptopp.so
install -m644 libcryptopp.so.${version} ${DESTDIR}/usr/lib/libcryptopp.so.${version}
ln -s libcryptopp.so.${version} ${DESTDIR}/usr/lib/libcryptopp.so
install -m644 ${FILESDIR}/libcrypto++.pc ${DESTDIR}/usr/lib/pkgconfig/libcrypto++.pc
sed -e "s,@@VERSION@@,${version},g" -i ${DESTDIR}/usr/lib/pkgconfig/libcrypto++.pc
install -Dm644 License.txt ${DESTDIR}/usr/share/licenses/${pkgname}/LICENSE
vlicense License.txt LICENSE
}
crypto++-devel_package() {
@ -34,6 +34,7 @@ crypto++-devel_package() {
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/lib/pkgconfig
}
}