-%post
-if [ -n "`getgid cvs`" ]; then
- if [ "`getgid cvs`" != "52" ]; then
- echo "Warning: group cvs haven't gid=52. Correct this before installing cvs-nserver" 1>&2
- exit 1
- fi
-else
- echo "Making group cvs GID=52"
- /usr/sbin/groupadd -g 52 -r -f cvs
-fi
-if [ -n "`getgid cvsadmin`" ]; then
- if [ "`getgid cvsadmin`" != "53" ]; then
- echo "Warning: group cvsadmin haven't gid=53. Correct this before installing cvs-nserver" 1>&2
- exit 1
- fi
-else
- echo "Making group cvsadmin GID=53"
- /usr/sbin/groupadd -g 53 -r -f cvsadmin
-fi
-if [ -n "`id -u cvs 2>/dev/null`" ]; then
- if [ "`id -u cvs`" != "52" ]; then
- echo "Warning: user cvs haven't uid=52. Correct this before installing cvs-nserver" 1>&2
- exit 1
- fi
-else
- echo "Making user cvs UID=52"
- /usr/sbin/useradd -u 52 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvs cvs 1>&2
-fi
-if [ -n "`id -u cvsadmin 2>/dev/null`" ]; then
- if [ "`id -u cvsadmin`" != "53" ]; then
- echo "Warning: user cvsadmin haven't uid=53. Correct this before installing cvs-nserver" 1>&2
- exit 1
- fi
-else
- echo "Making user cvsadmin UID=53"
- /usr/sbin/useradd -u 53 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvsadmin -G cvs cvsadmin 1>&2
-fi
+%post client -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%postun client -p /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%pre common
+%groupadd -P %{name}-common -g 52 -r cvs
+%groupadd -P %{name}-common -g 53 -r cvsadmin
+%useradd -P %{name}-common -u 52 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvs cvs
+%useradd -P %{name}-common -u 53 -r -d %{_cvsroot} -s /bin/false -c "CVS user" -g cvsadmin -G cvs cvsadmin