SPECS: ipset.spec - add init script.
pluto
pluto at pld-linux.org
Mon Dec 10 21:13:10 CET 2007
Author: pluto Date: Mon Dec 10 20:13:10 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add init script.
---- Files affected:
SPECS:
ipset.spec (1.12 -> 1.13)
---- Diffs:
================================================================
Index: SPECS/ipset.spec
diff -u SPECS/ipset.spec:1.12 SPECS/ipset.spec:1.13
--- SPECS/ipset.spec:1.12 Tue Oct 16 01:46:55 2007
+++ SPECS/ipset.spec Mon Dec 10 21:13:05 2007
@@ -14,6 +14,7 @@
Group: Networking/Admin
Source0: http://ipset.netfilter.org/%{name}-%{version_base}-%{version_tstamp}.tar.bz2
# Source0-md5: 9e17798dfd8ed87c63a1f3498f9fe64d
+Source1: %{name}.init
Patch0: %{name}-no_kernel_headers.patch
URL: http://ipset.netfilter.org/
BuildRequires: linux-libc-headers >= 7:2.6.22.1-2
@@ -44,6 +45,16 @@
%description devel -l pl.UTF-8
Pliki nagłówkowe do interfejsu ipset.
+%package init
+Summary: Ipset init (RedHat style)
+Group: Networking/Admin
+PreReq: rc-scripts
+Requires(post,preun): /sbin/chkconfig
+Requires: %{name}
+
+%description init
+Ipset initialization script.
+
%prep
%setup -qn %{name}-%{version_base}
%patch0 -p1
@@ -58,7 +69,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_includedir}
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_includedir}}
%{__make} install \
DESTDIR="$RPM_BUILD_ROOT" \
@@ -69,9 +80,19 @@
install *.h $RPM_BUILD_ROOT%{_includedir}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post init
+/sbin/chkconfig --add %{name}
+
+%preun init
+if [ "$1" = "0" ]; then
+ /sbin/chkconfig --del %{name}
+fi
+
%files
%defattr(644,root,root,755)
%doc ChangeLog ChangeLog.ippool TODO
@@ -84,12 +105,19 @@
%defattr(644,root,root,755)
%{_includedir}/*.h
+%files init
+%defattr(644,root,root,755)
+%attr(754,root,root) /etc/rc.d/init.d/*
+
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.13 2007-12-10 20:13:05 pluto
+- add init script.
+
Revision 1.12 2007-10-15 23:46:55 zbyniu
- up to 2.3.0-20070828
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/ipset.spec?r1=1.12&r2=1.13&f=u
More information about the pld-cvs-commit
mailing list