diff --git a/lmdb.pc.in b/lmdb.pc.in new file mode 100644 index 0000000..b26cf70 --- /dev/null +++ b/lmdb.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=@EXEC_PREFIX@ +libdir=@LIBDIR@ +includedir=@INCLUDEDIR@ + +Name: liblmdb +Description: Lightning Memory-mapped key-value database +URL: http://symas.com/mdb/ +Version: @PACKAGE_VERSION@ +Libs: -L${libdir} -llmdb +Cflags: -I${includedir} diff --git a/lmdb.spec b/lmdb.spec index 1de7ccd..8e7ed0f 100644 --- a/lmdb.spec +++ b/lmdb.spec @@ -3,12 +3,13 @@ Name: lmdb Version: 0.9.20 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Memory-mapped key-value database License: OpenLDAP URL: http://symas.com/mdb/ -Source: https://github.com/LMDB/lmdb/archive/LMDB_%{version}.tar.gz +Source0: https://github.com/LMDB/lmdb/archive/LMDB_%{version}.tar.gz +Source1: lmdb.pc.in # Patch description in the corresponding file Patch0: lmdb-make.patch Patch1: lmdb-s390-check.patch @@ -70,6 +71,14 @@ mkdir -m 0755 -p %{buildroot}{%{_libdir},%{_mandir}/man1} make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} mandir=%{_mandir} install popd +# Install pkgconfig file +sed -e 's:@PREFIX@:%{_prefix}:g' \ + -e 's:@EXEC_PREFIX@:%{_exec_prefix}:g' \ + -e 's:@LIBDIR@:%{_libdir}:g' \ + -e 's:@INCLUDEDIR@:%{_includedir}:g' \ + -e 's:@PACKAGE_VERSION@:%{version}:g' \ + %{SOURCE1} >lmdb.pc +install -Dpm 0644 -t %{buildroot}%{_libdir}/pkgconfig lmdb.pc %check %if 0%{?rhel} == 6 && %{_arch} == "ppc64" @@ -100,6 +109,7 @@ popd %files devel %{_includedir}/* %{_libdir}/*.so +%{_libdir}/pkgconfig/*.pc %files doc %doc %{archive_path}/html @@ -109,6 +119,9 @@ popd %changelog +* Mon Mar 20 2017 Jan Stanek - 0.9.20-3 +- Add pkgconfig file to devel subpackage + * Fri Feb 10 2017 Fedora Release Engineering - 0.9.20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild