Summary: Perforce configuration management Name: p4 Version: 2001.1 Release: 24019 Group: Development/Other Copyright: Perforce Software. Vendor: Perforce Software URL: http://www.perforce.com BuildRoot: /var/tmp/p4 Source0: p4.tar.gz Source1: p4d Source2: p4 Source3: p4web Source4: p4ftpd %description Perforce is a fast, reliable Software Configuration Management (SCM) System that runs on over 40 platforms. It is a commercial product but is available free of charge for Open Source development. %package -n p4-server Summary: Perforce - the F-f-f-a-s-t SCM system! Group: Development/Other Version: 2000.2 Release: 24019 Requires: p4-client %description -n p4-server Perforce is a fast, reliable Software Configuration Management (SCM) System that runs on over 40 platforms. It is a commercial product but is available free of charge for Open Source development. This is the server package. You only need this package on the machine that will be your Perforce server. On other machines, install the client package only. %package -n p4-client Summary: Perforce - the F-f-f-a-s-t SCM system! Group: Development/Other Version: 2001.1 Release: 24019 %description -n p4-client Perforce is a fast, reliable Software Configuration Management (SCM) System that runs on over 40 platforms. It is a commercial product but is available free of charge for Open Source development. Install this package if you will be using the Perforce SCM tool as a client. %package -n p4-web Summary: Web interface to the Perforce SCM system Group: Development/Other Version: 2001.1 Release: 24019 %description -n p4-web Perforce is a fast, reliable Software Configuration Management (SCM) System that runs on over 40 platforms. It is a commercial product but is available free of charge for Open Source development. Install this package if you want to access Perforce via your web browser using the HTTP protocol. %package -n p4-ftp Summary: FTP interface to the Perforce SCM System Group: Development/Other Version: 2001.1 Release: 24019 %description -n p4-ftp Perforce is a fast, reliable Software Configuration Management (SCM) System that runs on over 40 platforms. It is a commercial product but is available free of charge for Open Source development. Install this package if you want to access Perforce via an FTP client. %prep %setup -q -n p4-redhat %build %install rm -rf $RPM_BUILD_ROOT install -D -m 755 %{SOURCE1} $RPM_BUILD_ROOT/usr/bin/p4d install -D -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/bin/p4 install -D -m 755 %{SOURCE3} $RPM_BUILD_ROOT/usr/bin/p4web install -D -m 755 %{SOURCE4} $RPM_BUILD_ROOT/usr/bin/p4ftpd install -D -m 755 p4d.init $RPM_BUILD_ROOT/etc/rc.d/init.d/p4d install -D -m 644 p4d.conf $RPM_BUILD_ROOT/etc/p4d.conf install -D -m 755 p4.csh $RPM_BUILD_ROOT/etc/profile.d/ install -D -m 755 p4.sh $RPM_BUILD_ROOT/etc/profile.d/ install -D -m 755 p4d.checkpoint $RPM_BUILD_ROOT/etc/cron.daily/p4-checkpoint install -D -m 644 p4d.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/p4d install -D -m 600 p4config $RPM_BUILD_ROOT/home/perforce/.p4config mkdir -p $RPM_BUILD_ROOT/var/log/perforce mkdir -p $RPM_BUILD_ROOT/home/perforce/p4root %clean #rm -rf $RPM_BUILD_ROOT %files -n p4-server %defattr(-,root,root) %config /etc/p4d.conf %attr(700, perforce, perforce) /var/log/perforce %attr(700, perforce, perforce) /home/perforce /usr/bin/p4d /etc/rc.d/init.d /etc/cron.daily /etc/logrotate.d %files -n p4-client %defattr(-,root,root) /usr/bin/p4 /etc/profile.d %files -n p4-web %defattr(-,root,root) /usr/bin/p4web %files -n p4-ftp %defattr(-,root,root) /usr/bin/p4ftpd %pre -n p4-server # Check that the group perforce exists and if not, create it. if grep ^perforce /etc/group >/dev/null 2>&1 ; then : else groupadd perforce fi # Check that perforce user exists and if not create it. if grep ^perforce /etc/passwd >/dev/null 2>&1 ; then # It exists already : else useradd -c "Perforce user" -d /home/perforce -g perforce -m perforce fi %post -n p4-server # Install the startup scripts. for runlevel in 0 1 2 6 do file=/etc/rc.d/rc$runlevel.d/K15p4d [ ! -e $file ] && ln -s ../init.d/p4d $file done for runlevel in 3 4 5 do file=/etc/rc.d/rc$runlevel.d/S85p4d [ ! -e $file ] && ln -s ../init.d/p4d $file done %postun -n p4-server # Remove the symlinks from the init dirs rm -f /etc/rc.d/rc0.d/K15p4d rm -f /etc/rc.d/rc1.d/K15p4d rm -f /etc/rc.d/rc2.d/K15p4d rm -f /etc/rc.d/rc3.d/S85p4d rm -f /etc/rc.d/rc4.d/S85p4d rm -f /etc/rc.d/rc5.d/S85p4d rm -f /etc/rc.d/rc6.d/K15p4d %changelog * Tue Jul 10 2001 Tony Smith - Reworked installation of symlinks to be a little tidier - Added new p4web package - Added new p4ftp package * Tue Nov 14 2000 Tony Smith - Updated to work better on non-redhat related distro's which don't have chkconfig (fools!). Also moved user creation into %pre section rather than post as it was generating errors. * Mon Oct 17 2000 Tony Smith - Tidied package definitions so that SRPM is just p4 rather than p4-server. RPMS are properly named. Also incorporated the logrotate stuff from Matthew Rice's SRPM (thanks Matthew!), and put in a checkpoint & verify script in /etc/cron.daily. Also moved log file and journal to /var/log/p4 as these files may be on a different device to /home which makes the default config a little more resilient. * Tue Sep 19 2000 Tony Smith - Adapted so that the binaries are not part of the tarball to make it easier to update the RPM without having to build a tarball. * Fri Sep 15 2000 Tony Smith - Initial version