build(1)

NAME

build - build SuSE Linux RPMs in a chroot environment

SYNOPSIS

build [--clean|--no-init][--rpms path][specfile]
build [--help]
build [--verify]

DESCRIPTION

build is a tool to build SuSE Linux RPMs. build will install a minimal SuSE Linux as build system into some
directory and will chroot to this system to compile the
package.

This way you don't risk to corrupt your working system
(due to a broken spec file for example), even if the pack
age does not use BuildRoot.

build also handles build dependences, i.e. all RPMs
required to build some package are installed into the
build system. The extra line usedforbuild in the spec file is used for this to get a list of all needed RPMs, and
this is the place where you should add RPMs you otherwise
would put in the BuildRequires part of the specfile.

Dependencies of installed RPMs will be ignored, all RPMs
have to be listed in the spec file in this line. It should
also be added to the line neededforbuild allthough it's at the moment only used internally at SuSE.

build expects to find all files (spec file, sources,
patches) for the package to build within the current work
ing directory. If you want to rebuild (or modify +
rebuild) a package from the distribution, you should cre
ate some directory, change into this directory, unpack the
source rpm there (rpm2cpio <file> | cpio --extract), then
run the build utility.

OPTIONS

--clean
remove the build system and reinitialize it from
scratch.
--no-init
skip the build system initialization and start with
build immediately.
--rpms path1:path2:path3...
Where build can find the SuSE Linux RPMs needed to
create the build system.
--arch arch1:arch2:arch3...
What architectures to select from the RPMs.
--help Print a short help text.
--verify
verify an existing build system if files are miss
ing.

ENVIRONMENT

BUILD_ROOT
The directory where build should install the
chrooted build system. "/var/tmp/build-root" is
used by default.
BUILD_RPMS
Where build can find the SuSE Linux RPMs. build
needs them to create the build system.
"/media/dvd/suse" is the default value which will
do the trick if you have the SuSE Linux DVD
mounted.
BUILD_RPM_BUILD_STAGE
The rpm build stage (-ba, -bb, ...). This is just
passed througth to rpm, check the rpm manpage for a
complete list and descriptions. "-ba" is the
default. You can use this to add more options to
RPM. For example,
BUILD_RPM_BUILD_STAGE="-ba --target=i686"
will create RPMs optimized for i686 CPUs. This will
only work, if the spec file is prepared to build
such RPMs. This is not the case for most packages.

SEE ALSO

rpm(1), rpm2cpio(1), cpio(1)
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout