]> git.pld-linux.org Git - packages/ccs.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 16 Apr 2006 21:05:39 +0000 (21:05 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    ccs.spec -> 1.12

ccs.spec

index f3cf1b565fdda686b36ffd95f1309dedc449d51c..31b051f5f1e280d3eab76ae5a77ea92b93d45258 100644 (file)
--- a/ccs.spec
+++ b/ccs.spec
@@ -12,7 +12,8 @@ Source2:      %{name}.sysconfig
 URL:           http://sources.redhat.com/cluster/ccs/
 BuildRequires: libxml2-devel >= 2.0
 BuildRequires: magma-devel >= 0:1.01
-BuildRequires: perl-base
+BuildRequires: sed >= 4.0
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires:      magma >= 0:1.01
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -40,7 +41,7 @@ Pliki nag
 %prep
 %setup -q -n cluster-%{version}
 cd %{name}
-%{__perl} -pi -e 's/-O2/%{rpmcflags}/' {ccs_tool,ccs_test,lib,daemon}/Makefile
+%{__sed} -i -e 's/-O2/%{rpmcflags}/' {ccs_tool,ccs_test,lib,daemon}/Makefile
 
 %build
 cd %{name}
@@ -72,18 +73,12 @@ 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 "Type \"/etc/rc.d/init.d/%{name} start\" to start %{name}" 1>&2
-fi
+%service %{name} 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 %{name} stop
+       /sbin/chkconfig --del %{name}
 fi
 
 %files
This page took 0.064784 seconds and 4 git commands to generate.