SPECS: knock.spec - use %service
darekr
darekr at pld-linux.org
Sat Mar 31 22:34:35 CEST 2007
Author: darekr Date: Sat Mar 31 20:34:35 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use %service
---- Files affected:
SPECS:
knock.spec (1.11 -> 1.12)
---- Diffs:
================================================================
Index: SPECS/knock.spec
diff -u SPECS/knock.spec:1.11 SPECS/knock.spec:1.12
--- SPECS/knock.spec:1.11 Tue Feb 13 07:46:49 2007
+++ SPECS/knock.spec Sat Mar 31 22:34:30 2007
@@ -12,6 +12,7 @@
Source2: %{name}d.init
URL: http://zeroflux.org/cgi-bin/cvstrac.cgi/knock/wiki/
BuildRequires: libpcap-devel
+BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: sed >= 4.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -33,6 +34,7 @@
Summary: Knock - a port-knocking server/client
Summary(pl.UTF-8): Knock - serwer/klient "port-knocking"
Group: Applications/System
+Requires: rc-scripts
Requires(post,preun): /sbin/chkconfig
%description server
@@ -56,7 +58,7 @@
%configure
%{__make}
-sed -i 's/^/#/' knockd.conf
+%{__sed} -i 's/^/#/' knockd.conf
%install
rm -rf $RPM_BUILD_ROOT
@@ -72,17 +74,11 @@
%post server
/sbin/chkconfig --add knockd
-if [ -f /var/lock/subsys/knockd ]; then
- /etc/rc.d/init.d/knockd restart 1>&2
-else
- echo "Run \"/etc/rc.d/init.d/knockd start\" to start knockd daemon."
-fi
+%service knockd restart
%preun server
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/knockd ]; then
- /etc/rc.d/init.d/knockd stop 1>&2
- fi
+ %service knockd stop
/sbin/chkconfig --del knockd
fi
@@ -93,7 +89,7 @@
%files server
%defattr(644,root,root,755)
-%doc README ChangeLog TODO
+%doc ChangeLog README TODO
%attr(755,root,root) %{_sbindir}/*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
@@ -106,6 +102,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.12 2007/03/31 20:34:30 darekr
+- use %service
+
Revision 1.11 2007/02/13 06:46:49 glen
- tabs in preamble
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/knock.spec?r1=1.11&r2=1.12&f=u
More information about the pld-cvs-commit
mailing list