diff --git a/.gitignore b/.gitignore index 2c94fe4..295d469 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /lmdb-0.9.11.tar.gz /lmdb-0.9.13.tar.gz /lmdb-0.9.14.tar.gz +/LMDB_0.9.16.tar.gz diff --git a/lmdb-make.patch b/lmdb-make.patch index 2fef4e3..d45b756 100644 --- a/lmdb-make.patch +++ b/lmdb-make.patch @@ -1,18 +1,18 @@ -# Update main Makefile in oprder to build and install follow guidelines +# Patch the main Makefile to allow for a build that complies to packaging guidelines. -diff -up liblmdb/Makefile.orig liblmdb/Makefile ---- liblmdb/Makefile.orig 2014-12-11 10:04:10.271450725 +0100 -+++ liblmdb/Makefile 2014-12-11 10:09:11.898187497 +0100 -@@ -23,25 +23,30 @@ OPT = -O2 -g +diff -up lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile.upstream lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile +--- lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile.upstream 2015-08-14 10:59:31.179144608 +0200 ++++ lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile 2015-08-14 11:05:57.763026045 +0200 +@@ -24,25 +24,30 @@ OPT = -O2 -g CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS) LDLIBS = SOLIBS = +SOVERSION = 0.0.0 prefix = /usr/local +binprefix = $(prefix)/bin -+libprefix = $(prefix)/lib -+includeprefix = $(prefix)/include -+manprefix = $(prefix)/man ++libprefix = $(prefix)/lib ++includeprefix = $(prefix)/include ++manprefix = $(prefix)/man ######################################################################## @@ -35,24 +35,24 @@ diff -up liblmdb/Makefile.orig liblmdb/Makefile + for f in $(IDOCS); do cp $$f $(DESTDIR)$(manprefix)/man1; done clean: -- rm -rf $(PROGS) *.[ao] *.so *~ testdb -+ rm -rf $(PROGS) *.[ao] *.so* *~ testdb +- rm -rf $(PROGS) *.[ao] *.[ls]o *~ testdb ++ rm -rf $(PROGS) *.[ao] *.[ls]o* *~ testdb test: all - mkdir testdb -@@ -50,20 +55,24 @@ test: all + rm -rf testdb && mkdir testdb +@@ -51,20 +56,24 @@ test: all liblmdb.a: mdb.o midl.o ar rs $@ mdb.o midl.o --liblmdb.so: mdb.o midl.o -+liblmdb.so: liblmdb.so.$(SOVERSION) +-liblmdb.so: mdb.lo midl.lo ++liblmdb.so: liblmdb.so.$(SOVERSION) + rm -f $@ + ln -s $< $@ + -+liblmdb.so.$(SOVERSION): mdb.o midl.o ++liblmdb.so.$(SOVERSION): mdb.lo midl.lo # $(CC) $(LDFLAGS) -pthread -shared -Wl,-Bsymbolic -o $@ mdb.o midl.o $(SOLIBS) -- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.o midl.o $(SOLIBS) -+ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.o midl.o $(SOLIBS) +- $(CC) $(LDFLAGS) -pthread -shared -o $@ mdb.lo midl.lo $(SOLIBS) ++ $(CC) $(LDFLAGS) -pthread -shared -Wl,-soname,$@ -o $@ mdb.lo midl.lo $(SOLIBS) -mdb_stat: mdb_stat.o liblmdb.a -mdb_copy: mdb_copy.o liblmdb.a @@ -76,4 +76,4 @@ diff -up liblmdb/Makefile.orig liblmdb/Makefile +mtest6: mtest6.o liblmdb.so mdb.o: mdb.c lmdb.h midl.h - $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) -c mdb.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c mdb.c diff --git a/lmdb-s390-check.patch b/lmdb-s390-check.patch index d19456c..105fe16 100644 --- a/lmdb-s390-check.patch +++ b/lmdb-s390-check.patch @@ -1,16 +1,14 @@ -The s390 arch needs a pause between accesing the database +# The s390 architecture needs a pause before accessing the test DB. -diff -up liblmdb/Makefile.old liblmdb/Makefile ---- liblmdb/Makefile.old 2014-06-26 09:34:24.593559711 +0200 -+++ liblmdb/Makefile 2014-06-26 09:34:48.131007841 +0200 -@@ -50,7 +50,9 @@ clean: +diff -up lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile.old lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile +--- lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile.old 2015-08-14 11:08:02.226631788 +0200 ++++ lmdb-LMDB_0.9.16/libraries/liblmdb/Makefile 2015-08-14 11:08:58.618906240 +0200 +@@ -51,7 +51,7 @@ clean: test: all - mkdir testdb + rm -rf testdb && mkdir testdb - ./mtest && ./mdb_stat testdb -+ ./mtest -+ sleep 1 -+ ./mdb_stat testdb ++ ./mtest && sleep 1 && ./mdb_stat testdb liblmdb.a: mdb.o midl.o ar rs $@ mdb.o midl.o diff --git a/lmdb.spec b/lmdb.spec index 889b4f6..3f104d0 100644 --- a/lmdb.spec +++ b/lmdb.spec @@ -1,16 +1,14 @@ +# The files themselves are in several subdirectories and need to be prefixed wit this. +%global archive_path libraries/lib%{name} + Name: lmdb -Version: 0.9.14 -Release: 2%{?dist} +Version: 0.9.16 +Release: 1%{?dist} Summary: Memory-mapped key-value database License: OpenLDAP URL: http://symas.com/mdb/ -# Source built from git. To get the tarball, execute following commands: -# $ export VERSION=%%{version} -# $ git clone git://gitorious.org/mdb/mdb.git lmdb && pushd lmdb -# $ git checkout tags/LMDB_$VERSION && popd -# $ tar cvzf lmdb-$VERSION.tar.gz -C lmdb/libraries/ liblmdb -Source: %{name}-%{version}.tar.gz +Source: https://github.com/LMDB/lmdb/archive/LMDB_%{version}.tar.gz # Patch description in the corresponding file Patch0: lmdb-make.patch Patch1: lmdb-s390-check.patch @@ -49,29 +47,35 @@ The %{name}-doc package contains automatically generated documentation for %{nam %prep -%setup -q -n lib%{name} +%setup -q -n %{name}-LMDB_%{version} %patch0 -p1 -b .make %patch1 -p1 -b .s390-check %build +pushd %{archive_path} make XCFLAGS="%{optflags}" %{?_smp_mflags} # Build doxygen documentation doxygen # remove unpackaged files rm -f Doxyfile rm -rf man # Doxygen generated manpages +popd %install +pushd %{archive_path} # make install expects existing directory tree mkdir -m 0755 -p %{buildroot}%{_prefix}{/bin,/include} mkdir -m 0755 -p %{buildroot}{%{_libdir},%{_mandir}/man1} make DESTDIR=%{buildroot} prefix=%{_prefix} libprefix=%{_libdir} manprefix=%{_mandir} install +popd %check +pushd %{archive_path} rm -rf testdb LD_LIBRARY_PATH=$PWD make test +popd %post libs -p /sbin/ldconfig @@ -83,7 +87,9 @@ LD_LIBRARY_PATH=$PWD make test %{_mandir}/man1/* %files libs -%doc COPYRIGHT CHANGES LICENSE +%doc %{archive_path}/COPYRIGHT +%doc %{archive_path}/CHANGES +%license %{archive_path}/LICENSE %{_libdir}/*.so.* %files devel @@ -91,10 +97,16 @@ LD_LIBRARY_PATH=$PWD make test %{_libdir}/*.so %files doc -%doc html COPYRIGHT CHANGES LICENSE +%doc %{archive_path}/html +%doc %{archive_path}/COPYRIGHT +%doc %{archive_path}/CHANGES +%license %{archive_path}/LICENSE %changelog +* Fri Aug 14 2015 Jan Staněk - 0.9.16-1 +- Updated to 0.9.16 + * Wed Jun 17 2015 Fedora Release Engineering - 0.9.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 2afe827..1f71c12 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5808c3822595960f8e965754f84ee99e lmdb-0.9.14.tar.gz +0de89730b8f3f5711c2b3a4ba517b648 LMDB_0.9.16.tar.gz