From 15156f45d868a359b43644e66c5cdded0ef22d8ceae03b03a7790b8903da84a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Tue, 4 Feb 2014 12:09:38 +0000 Subject: [PATCH] fix libname and .so symlinks OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/lmdb?expand=0&rev=2 --- lmdb.spec | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/lmdb.spec b/lmdb.spec index 6bbd224..9b039d4 100644 --- a/lmdb.spec +++ b/lmdb.spec @@ -18,11 +18,11 @@ Name: lmdb %define libname liblmdb -%define libsoname %{libname}3 +%define libsoname %{libname}0 License: OLDAP-2.8 Group: Productivity/Databases/Tools -Summary: lmdb is a tiny database with some great capabilities +Summary: LMDB is a tiny database with some great capabilities Version: 0.9.11 Release: 0 Url: http://symas.com/mdb @@ -30,10 +30,10 @@ Source: %{name}-%{version}.tar.bz2 # fix prefix and libdir Patch: liblmdb.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%description -lmdb is a tiny database with some great capabilities: +%description LMDB is a tiny database with some great capabilities: + Ordered-map interface (keys are always sorted, supports range lookups) Fully transactional, full ACID semantics with MVCC. Reader/writer transactions: readers don't block writers and writers @@ -59,31 +59,25 @@ workloads other DB designs may be more suitable. %package -n %{libsoname} -Summary: Shared library of cfengine +Summary: Shared library of Lightning MDB (LMDB) Group: System/Libraries -Provides: %{libname}1 -Obsoletes: %{libname}1 %if 0%{?suse_version} == 1010 Requires: glibc %endif %description -n %{libsoname} -This package contains the shared libpromises (cfengine) library. +This package contains the shared lightning memory data base (lmdb) %package devel -Summary: Development package for libpromises +Summary: Development package for lmdb Group: Development/Libraries/C and C++ -Provides: %{name}-devel < %{version} -Obsoletes: %{name}-devel < %{version} Requires: %{libsoname} = %{version} -Requires: glibc-devel %description devel -A high-speed character set detection library +A high-speed in-memory database. This package contains the files needed to compile programs that use the -libpromises library. - +liblmdb library. %prep %setup -q -n %{libname} @@ -98,9 +92,17 @@ install -d %{buildroot}%{_libdir} install -d %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_prefix}/include MANDIR=%{_mandir} LIB=%{_lib} %{__make} install DESTDIR=%{buildroot} -install lmdb.h %{buildroot}%{_prefix}/include +mv %{buildroot}%{_libdir}/liblmdb.so %{buildroot}%{_libdir}/liblmdb0.so.0 +(cd %{buildroot}%{_libdir}; ln -s liblmdb0.so.0 liblmdb.so) +install -m 644 lmdb.h %{buildroot}%{_prefix}/include rm -f %{buildroot}%{_libdir}/*.a +%post -n %{libsoname} +/sbin/ldconfig + +%postun -n %{libsoname} +/sbin/ldconfig + %files %defattr(-,root,root) %doc CHANGES @@ -111,10 +113,11 @@ rm -f %{buildroot}%{_libdir}/*.a %files -n %{libsoname} %defattr(-,root,root) -%{_libdir}/*.so +%{_libdir}/*.so.* %files devel %defattr(-,root,root) %{_prefix}/include/* +%{_libdir}/*.so %changelog