From beffb60b93a923fcc4c53da0cce52fb31cdc39b8 Mon Sep 17 00:00:00 2001 From: Kaihao Bai Date: Thu, 13 Apr 2023 17:28:55 +0800 Subject: [PATCH] optimize spec --- isns-utils.spec | 51 +++++++++++++++++++------------------------------ 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/isns-utils.spec b/isns-utils.spec index 7f916c6..c9d7c39 100644 --- a/isns-utils.spec +++ b/isns-utils.spec @@ -1,19 +1,16 @@ -%define anolis_release 1 +%define anolis_release 2 + Name: isns-utils Version: 0.102 Release: %{anolis_release}%{?dist} Summary: The iSNS daemon and utility programs - License: LGPLv2+ URL: https://github.com/open-iscsi/open-isns Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/isns-utils-%{version}.tar.gz Source1: isnsd.service - -BuildRequires: gcc -BuildRequires: openssl-devel automake pkgconfig systemd-devel systemd -BuildRequires: make -Requires(post): systemd-units -Requires(preun): systemd-units +BuildRequires: gcc openssl-devel automake pkgconfig systemd-devel systemd make +Requires(post): systemd-units +Requires(preun): systemd-units Requires(postun): systemd-units %description @@ -22,14 +19,6 @@ and iSNS client tools. The Internet Storage Name Service (iSNS) protocol allows automated discovery, management and configuration of iSCSI and Fibre Channel devices (using iFCP gateways) on a TCP/IP network. -%package doc -Summary: Documentation files for %{name} -Requires: %{name} = %{EVR} -BuildArch: noarch - -%description doc -The %{name}-doc package contains documentation files for %{name}. - %package libs Summary: Shared library files for iSNS @@ -38,21 +27,26 @@ Shared library files for iSNS %package devel Summary: Development files for iSNS -Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-libs = %{EVR} %description devel Development files for iSNS +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. %prep %autosetup -p1 -n open-isns-%{version} - %build %configure --enable-shared --disable-static %make_build - %install %make_install make install_hdrs DESTDIR=%{buildroot} @@ -68,27 +62,21 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service %post %systemd_post isnsd.service - %postun %systemd_postun isnsd.service - %preun %systemd_preun isnsd.service - %triggerun -- isns-utils < 0.91-7 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply httpd -# to migrate them to systemd targets /usr/bin/systemd-sysv-convert --save isnsd >/dev/null 2>&1 ||: -# Run these because the SysV package being removed won't do them /sbin/chkconfig --del isnsd >/dev/null 2>&1 || : /bin/systemctl try-restart isnsd.service >/dev/null 2>&1 || : %files -%doc COPYING +%license COPYING +%dir %{abidir} %{_sbindir}/isnsd %{_sbindir}/isnsadm %{_sbindir}/isnsdd @@ -102,11 +90,7 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service %dir %{_var}/lib/isns %config(noreplace) %{_sysconfdir}/isns/* -%files doc -%doc README - %files libs -%dir %{abidir} %{_libdir}/libisns.so.0 %{_libdir}/pkgconfig/libisns.pc %{abidir}/libisns.dump @@ -116,8 +100,13 @@ install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/isnsd.service %{_includedir}/libisns/*.h %{_libdir}/libisns.so +%files doc +%doc README %changelog +* Thu Apr 13 2023 Kaihao Bai - 0.102-2 +- optimize spec + * Mon Mar 06 2023 Kaihao Bai - 0.102-1 - update version and spec -- Gitee