split libs out to sub package

This commit is contained in:
Peter Robinson 2018-03-12 22:20:40 +00:00
parent 4149ae6867
commit a8e9f1e474

View File

@ -1,9 +1,13 @@
%bcond_with largefile
Summary: A GNU set of database routines which use extensible hashing
Name: gdbm
Version: 1.14.1
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 1
License: GPLv3+
URL: http://www.gnu.org/software/gdbm/
Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
# See https://bugzilla.redhat.com/show_bug.cgi?id=4457
# Upstream bug http://puszcza.gnu.org.ua/bugs/?func=detailitem&item_id=151
@ -12,12 +16,12 @@ Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
#Patch0: gdbm-1.10-zeroheaders.patch
Patch1: gdbm-1.10-fedora.patch
License: GPLv3+
URL: http://www.gnu.org/software/gdbm/
Group: System Environment/Libraries
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: gettext
BuildRequires: readline-devel
Requires: %{name}-libs = %{epoch}:%{version}-%{release}
%description
Gdbm is a GNU database indexing library, including routines which use
@ -30,9 +34,14 @@ If you're a C developer and your programs need access to simple
database routines, you should install gdbm. You'll also need to
install gdbm-devel.
%package libs
Summary: Libraries files for gdbm
%description libs
Libraries for the Gdbm GNU database indexing library
%package devel
Summary: Development libraries and header files for the gdbm library
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires(post): info
Requires(preun): info
@ -75,8 +84,8 @@ ln -sf ../gdbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/gdbm.h
ln -sf ../ndbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/ndbm.h
ln -sf ../dbm.h $RPM_BUILD_ROOT/%{_includedir}/gdbm/dbm.h
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/libgdbm_compat.la
# Remove libtool archives
find %{buildroot} -type f -name "*.la" -delete
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
@ -84,7 +93,7 @@ rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
export LD_LIBRARY_PATH=`pwd`/src/.libs/:`pwd`/compat/.libs/
make check
%ldconfig_scriptlets
%ldconfig_scriptlets libs
%post devel
/sbin/install-info %{_infodir}/gdbm.info.gz %{_infodir}/dir \
@ -97,14 +106,15 @@ if [ $1 = 0 ]; then
fi
%files -f %{name}.lang
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc NEWS README THANKS AUTHORS NOTE-WARNING
%{_libdir}/libgdbm.so.5*
%{_libdir}/libgdbm_compat.so.4*
%doc NEWS README THANKS AUTHORS NOTE-WARNING
%{_bindir}/gdbm*
%{_mandir}/man1/gdbm*
%files libs
%license COPYING
%{_libdir}/libgdbm.so.5*
%{_libdir}/libgdbm_compat.so.4*
%files devel
%{_libdir}/libgdbm.so
%{_libdir}/libgdbm_compat.so
@ -113,6 +123,10 @@ fi
%{_mandir}/man3/*
%changelog
* Mon Mar 12 2018 Peter Robinson <pbrobinson@fedoraproject.org>a 1:1.14.1-4
- Split libraries out to separate libs subpackage
- Minor spec cleanups
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.14.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild