From d329fa5e452dfb39b616bccf810afe921fc422c4 Mon Sep 17 00:00:00 2001 From: mgb01105731 Date: Thu, 27 Oct 2022 15:58:37 +0800 Subject: [PATCH] optimise spec file & add doc package --- gdbm.spec | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/gdbm.spec b/gdbm.spec index 9a9ec08..a91d1c2 100644 --- a/gdbm.spec +++ b/gdbm.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %bcond_with largefile Summary: A GNU set of database routines which use extensible hashing @@ -20,7 +20,7 @@ BuildRequires: make # when -libs subpkg was introduced Obsoletes: gdbm < 1:1.14.1-4 -Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-libs = %{epoch}:%{version}-%{release} %description Gdbm is a GNU database indexing library, including routines which use @@ -33,6 +33,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 doc +Summary: Documentation files for %{name} +Requires: %{name} = %{epoch}:%{version}-%{release} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + %package libs Summary: Libraries files for gdbm # when -libs subpkg was introduced @@ -43,7 +51,7 @@ Libraries for the Gdbm GNU database indexing library %package devel Summary: Development libraries and header files for the gdbm library -Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{epoch}:%{version}-%{release} Requires(post): info Requires(preun): info @@ -89,6 +97,8 @@ find %{buildroot} -type f -name "*.la" -delete rm -f $RPM_BUILD_ROOT/%{_infodir}/dir +%generate_compatibility_deps + %check export LD_LIBRARY_PATH=`pwd`/src/.libs/:`pwd`/compat/.libs/ make check @@ -96,14 +106,20 @@ make check %ldconfig_scriptlets libs %files -f %{name}.lang -%doc NEWS README THANKS AUTHORS NOTE-WARNING %{_bindir}/gdbm* +%{abidir}/gdbm*-option.list %{_mandir}/man1/gdbm* +%files doc +%doc NEWS README THANKS AUTHORS NOTE-WARNING + %files libs +%dir %{abidir} %license COPYING %{_libdir}/libgdbm.so.6* %{_libdir}/libgdbm_compat.so.4* +%{abidir}/libgdbm.dump +%{abidir}/libgdbm_compat.dump %files devel %{_libdir}/libgdbm.so @@ -113,5 +129,8 @@ make check %{_mandir}/man3/* %changelog +* Thu Oct 27 2022 mgb01105731 - 1.23-2 +- optimise spec file & add doc package + * Tue Mar 8 2022 Liwei Ge - 1.23-1 - Init version from upstream v1.23 -- Gitee