Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 182 #208
i
i
i
i
i
i
i
i
SRPMS/ here are the source RPMs
When you install a source package with YaST, all the necessary components
will be installed in /usr/src/packages/: the sources and the adjust-
ments in SOURCES/ and the relevant .spec file in SPECS/.
Caution
Do not experiment with system components (glibc, rpm,
sysvinit, etc.), as this endangers the operability of your sys-
tem.
Caution
The following example uses the wget.src.rpm package. After installing
the package with YaST, you should have the following files:
/usr/src/packages/SPECS/wget.spec
/usr/src/packages/SOURCES/wget-1.4.5.dif
/usr/src/packages/SOURCES/wget-1.4.5.tar.gz
rpmbuild -b hXi /usr/src/packages/SPECS/wget.spec starts the
compilation. hXi is a wild card for various stages of the build process (see
the output of --help or the RPM documentation for details). The follow-
ing 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 soft-
ware. Caution: if the package does not support the BuildRoot feature,
you might overwrite configuration files.
-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 Allows skipping specific 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.
182 5.3. RPM — the Package Manager