lmdb: fix soname generation (#4856)

lmdb: fix soname generation
This commit is contained in:
Denis Revin 2016-09-30 09:47:34 +04:00 committed by Toyam Cox
parent dfb0725192
commit e128169557
3 changed files with 42 additions and 2 deletions

View File

@ -2596,3 +2596,4 @@ libskk.so.0 libskk-1.0.2_1
libKF5WaylandServer.so.5 kwayland-5.26.0_1
libKF5WaylandClient.so.5 kwayland-5.26.0_1
libKF5IdleTime.so.5 kidletime-5.26.0_1
liblmdb.so.0 lmdb-0.9.18_2

View File

@ -0,0 +1,38 @@
--- libraries/liblmdb/Makefile.orig 2016-09-11 13:49:25.425232271 +0400
+++ libraries/liblmdb/Makefile 2016-09-11 14:15:01.040383128 +0400
@@ -26,6 +26,8 @@
CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
LDLIBS =
SOLIBS =
+MAJOR = 0
+MINOR = 9
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
@@ -49,12 +51,15 @@
mkdir -p $(DESTDIR)$(includedir)
mkdir -p $(DESTDIR)$(mandir)/man1
for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
- for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
+ cp liblmdb.a $(DESTDIR)$(libdir)
+ cp liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+ ln -s liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/liblmdb.so.$(MAJOR)
+ ln -s liblmdb.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/liblmdb.so
for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
clean:
- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb
+ rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb
test: all
rm -rf testdb && mkdir testdb
@@ -65,7 +70,7 @@
liblmdb.so: mdb.lo midl.lo
# $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS)
- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS)
+ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname=$@.$(MAJOR) -o $@.$(MAJOR).$(MINOR) mdb.lo midl.lo $(SOLIBS)
mdb_stat: mdb_stat.o liblmdb.a
mdb_copy: mdb_copy.o liblmdb.a

View File

@ -1,7 +1,7 @@
# Template file for 'lmdb'
pkgname=lmdb
version=0.9.18
revision=1
revision=2
wrksrc="lmdb-LMDB_${version}"
hostmakedepends="git"
short_desc="Lightning Memory-Mapped Database Manager"
@ -20,7 +20,7 @@ do_build() {
}
do_install() {
cd libraries/liblmdb
make DESTDIR=${DESTDIR} prefix=/usr mandir=/usr/share/man install
make DESTDIR=${DESTDIR} CC="$CC" prefix=/usr install
vlicense LICENSE
vlicense COPYRIGHT
@ -32,5 +32,6 @@ lmdb-devel_package() {
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}