]> git.pld-linux.org Git - packages/cvs.git/commitdiff
- use macros in %{pre,post}{,un}
authorsaq <saq@pld-linux.org>
Wed, 25 Jul 2001 16:30:43 +0000 (16:30 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- need rebuilt rpm (with new macros.pld) to build these

Changed files:
    cvs.spec -> 1.64

cvs.spec

index 9d9075ae09542c02765b86a2693be75837e3f3f3..2ba98fc3b3f9f2dd58ac1ca26119b1cc927997a3 100644 (file)
--- a/cvs.spec
+++ b/cvs.spec
@@ -135,17 +135,14 @@ gzip -9nf doc/*.ps BUGS FAQ MINOR-BUGS NEWS PROJECTS TODO README ChangeLog \
        contrib/{*.man,README,ChangeLog,intro.doc}
 
 %post
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%fix_info_dir
 
 %postun
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%fix_info_dir
 
 %pre pserver
-if [ "$1" = 1 ]; then
-       # Add user and group
-       getgid cvs >/dev/null 2>&1 || %{_sbindir}/groupadd -f -g 52 cvs
-       id -u cvs >/dev/null 2>&1 || %{_sbindir}/useradd -g cvs -m -d /home/cvsroot -u 52 -s /bin/false cvs 2>/dev/null
-fi
+GID=52; %groupadd
+UID=52; HOMEDIR=/home/cvsroot; %useradd
 
 %post pserver
 if [ "$1" = 1 ]; then
@@ -153,19 +150,12 @@ if [ "$1" = 1 ]; then
        %{_bindir}/cvs -d :local:/home/cvsroot init 
        chown -R cvs.cvs /home/cvsroot/CVSROOT
 fi
-if [ -f /var/lock/subsys/rc-inetd ]; then
-       /etc/rc.d/init.d/rc-inetd reload
-fi
+%rc_inetd_post
 
 %postun pserver
-if [ "$1" = "0" ]; then
-       # Remove user and group
-       %{_sbindir}/userdel cvs 2>/dev/null
-       %{_sbindir}/groupdel cvs 2>/dev/null
-       if [ -f /var/lock/subsys/rc-inetd ]; then
-               /etc/rc.d/init.d/rc-inetd reload
-       fi
-fi
+%userdel
+%groupdel
+%rc_inetd_postun
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.075931 seconds and 4 git commands to generate.