SuSE Linux: Versions since 5.1
You plan to compile a source package that came with your SuSE Linux
All source packages are located in series "zq". They all have the
extension .spm. These packages are the so called
Source-RPMs. As you might have guessed already compiling, packaging and
installing is done by rpm.
The base packages of series "d" (Development) need to be
installed. If you plan to compile X applications make sure that the packages
in series "xdev" (Development under X11) are installed either.
The working directories of the rpm need to be setup (as far as no
settings have been made, e.g. in /etc/rpmrc)
SOURCES.tar.gz)as well
as the specific adaptions of the distribution(.dif-Files).SPECS.specfiles. These serve as a sort
of Meta-Makefiles for the build process.BUILDRPMSCAUTION: Please do not experiment with RPM using important and vital system components (libc,rpm,nkit, etc.). You might damage your system!
If you install a source package from "zq" with YaST the
components that are needed for the build will be installed under
/usr/src/packages, the sources themselves and the
adaptions are located in SOURCES,the .spec in
SPECS.
Now lets have a look at an example. We install the package
wget.spm. After the actual installation the following files have
been installed:
/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
To start the compile process invoke rpm -b <X>
/usr/src/packages/SPECS/wget.spec. Here <X>
may be one of the options listed below:
rpm -b <X> /usr/src/packages/SPECS/wget.spec starts the
compiling process; <X> stands for different stages
(see the --help-Output or the RPM documentation). Here's a
short extract:
-bp/usr/src/packages/BUILD:
extract and pathc-bc-bp, but compile additionally-bi-bc, but install files afterwards;
Attention, if a package does not supply the
BuildRoot-Feature, it is possible that you will overwrite
important configuration files!-bb-bi, but will also create a binary-RPM package.
If successful, you will find it in /usr/src/packages/RPMS.-ba-bb, but will also create the source RPM.
If successful, you will find it in /usr/src/packages/SRPMS.
The Option --short-circuit enables you to skip certain steps.
The freshly created RPM binary may be installed by entering rpm -i
... or even better with rpm -U ... (thus it wil make its
way into the RPM database.
Further info about RPM can be found in the Book "Maximum RPM" which is also available in PostScript on http://www.rpm.org an in the RPM-HOWTO.
You try to install an .spm but get an error message as:
cannot write to ///usr/src/redhat/SOURCES
error: /cdrom/suse/zq1/tetex.spm cannot be installed
Remove /etc/rpmrc (or adapt it to /usr/lib/rpmrc).
The easiest way is to enter:
rm /etc/rpmrc
Updating individual RPM-packages of the »SuSE Linux«-Distribution
rpm - The package manager of SuSE Linux