[packages/lmdb] pldize

glen glen at pld-linux.org
Sun Sep 6 00:29:54 CEST 2015


commit 8633c4492013408a3537f0ba09d39ca5220295fc
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Sep 6 01:29:36 2015 +0300

    pldize

 lmdb.spec | 44 ++++++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 20 deletions(-)
---
diff --git a/lmdb.spec b/lmdb.spec
index 090a512..b902194 100644
--- a/lmdb.spec
+++ b/lmdb.spec
@@ -1,15 +1,19 @@
-%bcond_without	tests
+#
+# Conditional build:
+%bcond_without	tests		# build without tests
+
 Summary:	Memory-mapped key-value database
 Name:		lmdb
 Version:	0.9.16
 Release:	1
 License:	OpenLDAP
 Group:		Libraries
-URL:		http://symas.com/mdb/
 Source0:	https://github.com/LMDB/lmdb/archive/LMDB_%{version}.tar.gz
 # Source0-md5:	0de89730b8f3f5711c2b3a4ba517b648
+URL:		http://symas.com/mdb/
 Patch0:		%{name}-make.patch
 BuildRequires:	doxygen
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 LMDB is an ultra-fast, ultra-compact key-value embedded data store
@@ -18,31 +22,38 @@ it provides the read performance of a pure in-memory database while
 still offering the persistence of standard disk-based databases, and
 is only limited to the size of the virtual address space.
 
-%package        libs
+%package libs
 Summary:	Shared libraries for %{name}
+Group:		Libraries
 
-%description    libs
+%description libs
 The %{name}-libs package contains shared libraries necessary for
 running applications that use %{name}.
 
-%package        devel
+%package devel
 Summary:	Development files for %{name}
-Requires:	%{name} = %{version}-%{release}
+Group:		Development/Libraries
+Requires:	%{name}-libs = %{version}-%{release}
 
-%description    devel
+%description devel
 The %{name}-devel package contains libraries and header files for
 developing applications that use %{name}.
 
 %prep
 %setup -q -n %{name}-LMDB_%{version}
-%patch0 -p1 -b .make
+%patch0 -p1
 
 %build
-cd libraries/lib%{name}
+cd libraries/liblmdb
 %{__make} \
 	CC="%{__cc}" \
 	XCFLAGS="%{rpmcflags} %{rpmcppflags}"
 
+%if %{with tests}
+rm -rf testdb
+LD_LIBRARY_PATH=$PWD %{__make} test
+%endif
+
 # Build doxygen documentation
 doxygen
 # remove unpackaged files
@@ -52,28 +63,21 @@ cd ../../
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd libraries/lib%{name}
 
 # make install expects existing directory tree
-mkdir -m 0755 -p $RPM_BUILD_ROOT%{_prefix}{/bin,/include}
-mkdir -m 0755 -p $RPM_BUILD_ROOT{%{_libdir},%{_mandir}/man1}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir},%{_mandir}/man1}
 
-%{__make} install \
+%{__make} -C libraries/liblmdb install \
 	DESTDIR=$RPM_BUILD_ROOT \
 	prefix=%{_prefix} \
 	libprefix=%{_libdir} \
 	manprefix=%{_mandir}
 
-%if %{with tests}
-rm -rf testdb
-LD_LIBRARY_PATH=$PWD %{__make} test
-%endif
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post libs -p /sbin/ldconfig
-%postun libs -p /sbin/ldconfig
+%post	libs -p /sbin/ldconfig
+%postun	libs -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lmdb.git/commitdiff/8633c4492013408a3537f0ba09d39ca5220295fc



More information about the pld-cvs-commit mailing list