Building an RPM for Perforce ============================ This directory contains all the files you need to build an RPM for Perforce, with two notable exceptions - the p4 and p4d binaries. The intention is to make it easy to rebuild your RPM when new versions of the client and server become available. FILES ----- README - This file buildp4rpm.pl - Perl script to automate the build p4.spec - Describes how to build the RPM p4.tar.gz - Supporting scripts and utilities How to build your RPM and SRPM ============================== First identify your RPM build directory. Here are some common places to look: Red Hat: /usr/src/RedHat Mandrake: /usr/src/RPM If you want to build the RPM's in your home directory, then put the following line in ~/.rpmmacros: %_topdir /home/tony/RPM Then create the following directories: /home/tony/RPM /home/tony/RPM/SPECS /home/tony/RPM/RPMS/i386 /home/tony/RPM/RPMS/i486 /home/tony/RPM/RPMS/i586 /home/tony/RPM/RPMS/i686 /home/tony/RPM/RPMS/k6 /home/tony/RPM/RPMS/noarch /home/tony/RPM/SRPMS /home/tony/RPM/SOURCES /home/tony/RPM/BUILD Once you have created (or located) the RPM build directories, you need to ensure that you have the following files available: p4.spec p4.tar.gz p4 (optional) p4d (optional) The buildp4rpm.pl script will do everything necessary to build the RPM's, including downloading the binaries if you want it to. Just pick the command line flags to suit. EXAMPLES: perl buildp4rpm.pl --rpmroot /home/tony/RPM \ --ftp Would build the RPM using the tarball and specfile in the current directory, but will download the p4 and p4d binaries from the Perforce FTP site. perl buildp4rpm.pl --rpmroot /usr/src/RPM \ --tarball /tmp/p4.tar.gz \ --specfile /tmp/p4.spec Would build the RPM using the tarball and specfile in /tmp and would use the existing p4 and p4d binaries (which must be in the PATH). Then install the RPM's. You must install the client RPM first as the server RPM requires the client to be present. rpm -i /usr/src/RPM/i386/p4-client-2000.1-16895.i386.rpm rpm -i /usr/src/RPM/i386/p4-server-2000.1-16895.i386.rpm The SRPM is also built just so that you have a copy of all of the necessary scripts and files, but this file, and the buildp4rpm.pl script are not yet included in the SRPM as it would lead to an excessively complicated script.
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 495 | Tony Smith | Re-ordered directory structure for the ( hopefully ) last time | ||
#2 | 491 | Tony Smith |
Adjustments. Now downloads 2000.2 by default and the buildscript now takes a --distro argument so you can specify what style of RPM you want. Means I've got to rename these paths again I guess. The tarball is now built on the fly based on the distro you pick. |
||
#1 | 487 | Tony Smith |
Renamed the RPM building tree because this RPM is quite RedHat specific. SuSE RPM builder to be added |
||
//guest/tony_smith/perforce/SRPM/README | |||||
#2 | 448 | Tony Smith |
Updated RPM building kit so that it will automatically download the latest binaries from ftp.perforce.com. Spec file is also a bit more clever, and logrotate, checkpointing and verify support has been added. Thanks to Matthew Rice for the logrotate script! |
||
#1 | 429 | Tony Smith | First pass at RPM building toolkit. |