Quick Start Guide

/usr/src/packages/SOURCES/wget-1.11.4.tar.bz2
/usr/src/packages/SOURCES/wgetrc.patch
/usr/src/packages/SPECS/wget.spec
rpmbuild -b
X
/usr/src/packages/SPECS/wget.spec starts the compilation.
X
is a wild
card for various stages of the build process (see the output of --help or the RPM
documentation for details). The following is merely a brief explanation:
-bp
Prepare sources in /usr/src/packages/BUILD: unpack and patch.
-bc
Do the same as -bp, but with additional compilation.
-bi
Do the same as -bp, but with additional installation of the built software. Caution:
if the package does not support the BuildRoot feature, you might overwrite con-
guration les.
-bb
Do the same as -bi, but with the additional creation of the binary package. If the
compile was successful, the binary should be in /usr/src/packages/RPMS.
-ba
Do the same as -bb, but with the additional creation of the source RPM. If the
compilation was successful, the binary should be in /usr/src/packages/SRPMS.
--short-circuit
Skip some steps.
The binary RPM created can now be installed with rpm -i or, preferably, with rpm -U.
Installation with rpm makes it appear in the RPM database.
9.2.7 Compiling RPM Packages with build
The danger with many packages is that unwanted les are added to the running
system during the build process. To prevent this use build, which creates a dened
environment in which the package is built. To establish this chroot environment, the
build script must be provided with a complete package tree. This tree can be made
available on the hard disk, via NFS, or from DVD. Set the position with build --rpms
directory
. Unlike rpm, the build command looks for the .spec le in the source direc-
tory. To build wget (like in the above example) with the DVD mounted in the system
under /media/dvd, use the following commands as root:
cd /usr/src/packages/SOURCES/
mv ../SPECS/wget.spec .
build --rpms /media/dvd/suse/ wget.spec
128 Start-Up