]> git.pld-linux.org Git - packages/camserv.git/blobdiff - camserv.spec
- use %service
[packages/camserv.git] / camserv.spec
index ff0b4f1f5016c4238943c2dca20c16036b733f27..8859e1f9c95078f9c2f3420ab1a5952dea555c89 100644 (file)
@@ -20,6 +20,7 @@ BuildRequires:        imlib2-devel >= 1.0.6
 BuildRequires: libjpeg-devel >= 6b
 BuildRequires: libltdl-devel
 BuildRequires: libtool
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires:      gdk-pixbuf >= 0.14.0
 Requires:      imlib2 >= 1.0.5
@@ -104,17 +105,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/%{name} ]; then
-       /etc/rc.d/init.d/%{name} restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
-fi
+%service %{name} restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/%{name} ]; then
-               /etc/rc.d/init.d/%{name} stop 1>&2
-       fi
+       %service %{name} stop
        /sbin/chkconfig --del %{name}
 fi
 
This page took 0.072728 seconds and 4 git commands to generate.