SPECS: NewsCache.spec - use %service, %banner info is outdated

glen glen at pld-linux.org
Tue Mar 14 01:15:28 CET 2006


Author: glen                         Date: Tue Mar 14 00:15:28 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service, %banner info is outdated

---- Files affected:
SPECS:
   NewsCache.spec (1.19 -> 1.20) 

---- Diffs:

================================================================
Index: SPECS/NewsCache.spec
diff -u SPECS/NewsCache.spec:1.19 SPECS/NewsCache.spec:1.20
--- SPECS/NewsCache.spec:1.19	Sat Jun 25 22:14:24 2005
+++ SPECS/NewsCache.spec	Tue Mar 14 01:15:23 2006
@@ -23,10 +23,10 @@
 URL:		http://www.linuxhacker.at/newscache/
 BuildRequires:	autoconf
 BuildRequires:	automake
-BuildRequires:	socket++-devel
 BuildRequires:	libwrap-devel
+BuildRequires:	rpmbuild(macros) >= 1.268
+BuildRequires:	socket++-devel
 Requires(post,preun):	/sbin/chkconfig
-Requires:	rpmbuild(macros) >= 1.208
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sysconfdir	/etc/%{name}
@@ -49,9 +49,9 @@
 Summary:	NewsCache standalone mode
 Summary(pl):	NewsCache w trybie samodzielnym
 Group:		Applications/News
-PreReq:         rc-scripts
 Requires:	%{name} = %{version}-%{release}
-Obsoletes:	%{name}-inetd
+Requires:	rc-scripts
+Obsoletes:	NewsCache-inetd
 
 %description standalone
 Run NewsCache in the standalone mode.
@@ -65,7 +65,7 @@
 Group:		Applications/News
 Requires:	%{name} = %{version}-%{release}
 Requires:	rc-inetd
-Obsoletes:	%{name}-standalone
+Obsoletes:	NewsCache-standalone
 
 %description inetd
 Run NewsCache from the inetd.
@@ -113,8 +113,7 @@
 fi
 
 %triggerun -- %{name} < 1.2
-if [ "$1" = "2" -a "$2" = "1" ] ; then
-# Don't use #%%banner file -a - messages are displayed twice or more
+if [ "$1" -ge "2" -a "$2" = "1" ] ; then
 echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 %{name} works now with newscache user and group - making:
 1. appropriate changes in your %{_sysconfdir}/newscache.conf ...'
@@ -132,30 +131,20 @@
 
 %post standalone
 /sbin/chkconfig --add newscache
-if [ -f /var/lock/subsys/newscache ]; then
-	/etc/rc.d/init.d/newscache restart 1>&2
-else
-	echo "Run \"/etc/rc.d/init.d/newscache start\" to start NewsCache daemon."
-fi
+%service newscache restart "NewsCache daemon"
 
 %preun standalone
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/newscache ]; then
-		/etc/rc.d/init.d/newscache stop 1>&2
-	fi
+	%service newscache stop
 	/sbin/chkconfig --del newscache
 fi
 
 %post inetd
-if [ -f /var/lock/subsys/rc-inetd ]; then
-	/etc/rc.d/init.d/rc-inetd restart 1>&2
-else
-	echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start NewsCache from inet server" 1>&2
-fi
+%service -q rc-inetd reload
 
 %postun inetd
-if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
-	/etc/rc.d/init.d/rc-inetd reload 1>&2
+if [ "$1" = "0" ]; then
+	%service -q rc-inetd reload
 fi
 
 %files
@@ -187,9 +176,12 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.20  2006/03/14 00:15:23  glen
+- use %service, %banner info is outdated
+
 Revision 1.19  2005/06/25 20:14:24  twittner
 - added -info.patch - fixes for info page taken from
-http://download.cmeerw.net/debian/newscache/source/newscache_1.1.92-0cmeerw.diff.gz
+  http://download.cmeerw.net/debian/newscache/source/newscache_1.1.92-0cmeerw.diff.gz
 
 Revision 1.18  2005/06/24 20:33:10  twittner
 - OK - no new maintainer - only new URL (my commitlog fixed)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/NewsCache.spec?r1=1.19&r2=1.20&f=u



More information about the pld-cvs-commit mailing list