Reorder the subpackages
This commit is contained in:
parent
0fc73fbd64
commit
9faae09f7c
50
ipset.spec
50
ipset.spec
@ -14,20 +14,6 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
# This is developed hand in hand with a kernel module
|
||||
Requires: kernel
|
||||
|
||||
%package service
|
||||
Summary: %{name} service for %{name}s
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildRequires: systemd
|
||||
Requires: iptables-services
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
BuildArch: noarch
|
||||
|
||||
%description service
|
||||
This package provides the service %{name} that is split
|
||||
out of the base package since it is not active by default.
|
||||
|
||||
%description
|
||||
IP sets are a framework inside the Linux 2.4.x and 2.6.x kernel, which can be
|
||||
administered by the ipset utility. Depending on the type, currently an IP set
|
||||
@ -44,12 +30,14 @@ If you want to:
|
||||
rule and benefit from the speed of IP sets
|
||||
then ipset may be the proper tool for you.
|
||||
|
||||
|
||||
%package libs
|
||||
Summary: Shared library providing the IP sets functionality
|
||||
|
||||
%description libs
|
||||
This package contains the libraries which provide the IP sets funcionality.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}-libs%{?_isa} == %{version}-%{release}
|
||||
@ -60,6 +48,21 @@ This package contains the files required to develop software using the %{name}
|
||||
libraries.
|
||||
|
||||
|
||||
%package service
|
||||
Summary: %{name} service for %{name}s
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildRequires: systemd
|
||||
Requires: iptables-services
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
BuildArch: noarch
|
||||
|
||||
%description service
|
||||
This package provides the service %{name} that is split
|
||||
out of the base package since it is not active by default.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
@ -92,12 +95,19 @@ install -c -m 755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}
|
||||
# Create directory for configuration
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
||||
|
||||
|
||||
%preun
|
||||
if [[ $1 -eq 0 && -n $(lsmod | grep "^xt_set ") ]]; then
|
||||
rmmod xt_set 2>/dev/null
|
||||
[[ $? -ne 0 ]] && echo Current iptables configuration requires ipsets && exit 1
|
||||
fi
|
||||
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
|
||||
%post service
|
||||
%systemd_post %{name}.service
|
||||
|
||||
@ -111,10 +121,6 @@ fi
|
||||
%postun service
|
||||
%systemd_postun_with_restart %{name}.service
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
|
||||
%files
|
||||
%doc COPYING ChangeLog
|
||||
@ -125,16 +131,16 @@ fi
|
||||
%doc COPYING
|
||||
%{_libdir}/lib%{name}.so.3*
|
||||
|
||||
%files devel
|
||||
%{_includedir}/lib%{name}
|
||||
%{_libdir}/lib%{name}.so
|
||||
|
||||
%files service
|
||||
%{_unitdir}/%{name}.service
|
||||
%dir %{_libexecdir}/%{name}
|
||||
%attr(0755,root,root) %{_libexecdir}/%{name}/%{name}.start-stop
|
||||
%dir %{_sysconfdir}/%{name}
|
||||
|
||||
%files devel
|
||||
%{_includedir}/lib%{name}
|
||||
%{_libdir}/lib%{name}.so
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 27 2013 Quentin Armitage <quentin@armitage.org.uk> 6.19-2
|
||||
|
Loading…
Reference in New Issue
Block a user