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 Name: lmdb
%define libname liblmdb %define libname liblmdb
%define libsoname %{libname}3 %define libsoname %{libname}0
License: OLDAP-2.8 License: OLDAP-2.8
Group: Productivity/Databases/Tools 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 Version: 0.9.11
Release: 0 Release: 0
Url: http://symas.com/mdb Url: http://symas.com/mdb
@ -30,10 +30,10 @@ Source: %{name}-%{version}.tar.bz2
# fix prefix and libdir # fix prefix and libdir
Patch: liblmdb.patch Patch: liblmdb.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build 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: LMDB is a tiny database with some great capabilities:
Ordered-map interface (keys are always sorted, supports range lookups) Ordered-map interface (keys are always sorted, supports range lookups)
Fully transactional, full ACID semantics with MVCC. Fully transactional, full ACID semantics with MVCC.
Reader/writer transactions: readers don't block writers and writers 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} %package -n %{libsoname}
Summary: Shared library of cfengine Summary: Shared library of Lightning MDB (LMDB)
Group: System/Libraries Group: System/Libraries
Provides: %{libname}1
Obsoletes: %{libname}1
%if 0%{?suse_version} == 1010 %if 0%{?suse_version} == 1010
Requires: glibc Requires: glibc
%endif %endif
%description -n %{libsoname} %description -n %{libsoname}
This package contains the shared libpromises (cfengine) library. This package contains the shared lightning memory data base (lmdb)
%package devel %package devel
Summary: Development package for libpromises Summary: Development package for lmdb
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Provides: %{name}-devel < %{version}
Obsoletes: %{name}-devel < %{version}
Requires: %{libsoname} = %{version} Requires: %{libsoname} = %{version}
Requires: glibc-devel
%description 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 This package contains the files needed to compile programs that use the
libpromises library. liblmdb library.
%prep %prep
%setup -q -n %{libname} %setup -q -n %{libname}
@ -98,9 +92,17 @@ install -d %{buildroot}%{_libdir}
install -d %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_mandir}/man1
install -d %{buildroot}%{_prefix}/include install -d %{buildroot}%{_prefix}/include
MANDIR=%{_mandir} LIB=%{_lib} %{__make} install DESTDIR=%{buildroot} 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 rm -f %{buildroot}%{_libdir}/*.a
%post -n %{libsoname}
/sbin/ldconfig
%postun -n %{libsoname}
/sbin/ldconfig
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc CHANGES %doc CHANGES
@ -111,10 +113,11 @@ rm -f %{buildroot}%{_libdir}/*.a
%files -n %{libsoname} %files -n %{libsoname}
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/*.so %{_libdir}/*.so.*
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_prefix}/include/* %{_prefix}/include/*
%{_libdir}/*.so
%changelog %changelog