SPECS: fnfx.spec - use %service - tabs

shadzik shadzik at pld-linux.org
Fri Dec 8 01:14:41 CET 2006


Author: shadzik                      Date: Fri Dec  8 00:14:41 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %service
- tabs

---- Files affected:
SPECS:
   fnfx.spec (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: SPECS/fnfx.spec
diff -u SPECS/fnfx.spec:1.11 SPECS/fnfx.spec:1.12
--- SPECS/fnfx.spec:1.11	Thu Jun  8 23:59:59 2006
+++ SPECS/fnfx.spec	Fri Dec  8 01:14:36 2006
@@ -11,7 +11,8 @@
 Source1:	%{name}.init
 Patch0:		%{name}-shad.patch
 URL:		http://fnfx.sourceforge.net/
-Requires(post,preun):   /sbin/chkconfig
+Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -49,7 +50,7 @@
 
 install src/fnfxd $RPM_BUILD_ROOT%{_sbindir}
 install src/fnfx $RPM_BUILD_ROOT%{_bindir}
-install etc/{fnfxd.conf,keymap} $RPM_BUILD_ROOT/etc/fnfx
+install etc/{fnfxd.conf,keymap} $RPM_BUILD_ROOT%{_sysconfdir}/fnfx
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/fnfx
 
 %clean
@@ -57,18 +58,12 @@
 
 %post
 /sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/%{name} ]; then
-        /etc/rc.d/init.d/%{name} restart >&2
-else
-        echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon." >&2
-fi
+%service fnfx restart
 
 %preun
 if [ "$1" = "0" ]; then
-        if [ -f /var/lock/subsys/%{name} ]; then
-                /etc/rc.d/init.d/%{name} stop >&2
-        fi
-        /sbin/chkconfig --del %{name}
+	%service fnfx stop
+	/sbin/chkconfig --del %{name}
 fi
 
 %files
@@ -77,7 +72,7 @@
 %attr(755,root,root) %{_sbindir}/fnfxd
 %attr(755,root,root) %{_bindir}/fnfx
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}
-%attr(754,root,root)  /etc/rc.d/init.d/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -85,6 +80,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.12  2006/12/08 00:14:36  shadzik
+- use %service
+- tabs
+
 Revision 1.11  2006/06/08 21:59:59  shadzik
 - added my own patchset to add "toggle lcd" command to the daemon
 - rel 4
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/fnfx.spec?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list