]> git.pld-linux.org Git - packages/cvsd.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 20 Apr 2006 18:18:27 +0000 (18:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    cvsd.spec -> 1.24

cvsd.spec

index 69a5b84e33839fd73d4187ca28f99a107dfa2a4b..f0e20d7080113a9a20024511a0f0a06d9d1f8cdf 100644 (file)
--- a/cvsd.spec
+++ b/cvsd.spec
@@ -14,7 +14,7 @@ Source1:      %{name}.init
 #Source1:      %{name}.conf
 #Source2:      %{name}-passwd
 URL:           http://ch.tudelft.nl/~arthur/cvsd/
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
@@ -63,7 +63,7 @@ install -d $RPM_BUILD_ROOT%{rootdir}/{etc,bin,lib,tmp,dev,cvsroot} \
        DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-#install %{SOURCE2} $RPM_BUILD_ROOT%{rootdir}/etc/passwd
+#install %{SOURCE2} $RPM_BUILD_ROOT%{rootdir}%{_sysconfdir}/passwd
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -82,22 +82,21 @@ fi
 
 %post
 /sbin/chkconfig --add cvsd
-if [ -f /var/lock/subsys/cvsd ]; then
-       /etc/rc.d/init.d/cvsd restart 1>&2
-else
-       echo "Type \"/etc/rc.d/init.d/cvsd start\" to start cvsd." 1>&2
-fi
+%service cvsd restart "cvsd"
+
+if [ "$1" = 1 ]; then
+%banner -e %{name} <<EOF
+Now check out %{_sysconfdir}/cvsd.conf and initialise the repository using:
+cvs -d :pserver:cvsadmin@localhost:/cvsroot init
 
-echo "Now check out /etc/cvsd.conf and initialise the repository using: "
-echo "\"cvs -d :pserver:cvsadmin@localhost:/cvsroot init\" "
-echo "Also edit/modify/whatever the /home/cvsowner/cvsd-root/etc/passwd file."
-echo "Default user/passwds are cvs/cvs (for ro anon), user/pass. Change these!"
+Also edit/modify/whatever the /home/cvsowner/cvsd-root%{_sysconfdir}/passwd file.
+Default user/passwds are cvs/cvs (for ro anon), user/pass. Change these!
+EOF
+fi
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/cvsd ]; then
-               /etc/rc.d/init.d/cvsd stop 1>&2
-       fi
+       %service cvsd stop
        /sbin/chkconfig --del cvsd
 fi
 
@@ -125,4 +124,4 @@ fi
 %dev(c,1,3) %{rootdir}/dev/null
 %dir %{rootdir}/lib
 %dir %{rootdir}/tmp
-#%config(noreplace) %verify(not size mtime md5) %{rootdir}/etc/passwd
+#%config(noreplace) %verify(not size mtime md5) %{rootdir}%{_sysconfdir}/passwd
This page took 0.081918 seconds and 4 git commands to generate.