fix libname and .so symlinks

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/lmdb?expand=0&rev=2
This commit is contained in:
Klaus Kämpf 2014-02-04 12:09:38 +00:00 committed by Git OBS Bridge
parent 154c3b498e
commit 15156f45d8

View File

@ -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