Building an RPM for Perforce ============================ This directory contains all the files you need to build an RPM for Perforce, with one notable exception - the 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-redhat/ - Supporting scripts for Redhat based distros p4-suse/ - Supporting scripts for SuSE based distros Documentation ------------- The lack of docs in these RPMS is deliberate. I've done this because I wanted to be able to grab updates quickly and easily and the docs are all online. If there's demand, I'll add a p4-doc RPM. 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-redhat/* p4-suse/* 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. The RPM built will do things the RedHat way. perl buildp4rpm.pl --rpmroot /usr/src/RPM --distro suse Would build the RPM using the script files in the local subdirectory p4-suse and the Perforce binaries from the current directory. 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 | |
---|---|---|---|---|---|
#2 | 734 | Tony Smith |
Updated for 2001.1. Also removed the PATH searching since it wasn't working properly anyway and added a bit more clarity to the README file. |
||
#1 | 495 | Tony Smith | Re-ordered directory structure for the ( hopefully ) last time | ||
//guest/tony_smith/perforce/RPM/RedHat/README | |||||
#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. |