our build.rpm with buildservice support
[platform/upstream/build.git] / build.1
1 .TH build 1 "(c) 1997-2005 SuSE Linux AG Nuernberg, Germany"
2 .SH NAME
3 build \- build SuSE Linux RPMs in a chroot environment
4 .SH SYNOPSIS
5 .B build
6 .RB [ --clean | --no-init]
7 .RB [ --rpms
8 .IR path1 : path2 : ... ]
9 .RB [ --arch
10 .IR arch1 : arch2 : ... ]
11 .RB [ --root
12 .IR buildroot ]
13 .RB [ specfile | srcrpm ]
14 .br
15 .B build
16 .B --help
17 .br
18 .B build
19 .B --verify
20 .SH DESCRIPTION
21 \fBbuild\fR is a tool to build SuSE Linux RPMs in a safe and clean way.
22 .B build
23 will install a minimal SuSE Linux as build system into some directory
24 and will chroot to this system to compile the package.
25 This way you don't risk to corrupt your working system (due to a broken spec
26 file for example), even if the package does not use BuildRoot.
27
28 .B build
29 searches the spec file for a
30 .I BuildRequires:
31 line; if such a line is found, all the specified rpms are installed.
32 Otherwise a selection of default packages are used. Note that
33 .B build
34 doesn't automatically resolve missing dependencies, so the specified
35 rpms have to be sufficient for the build.
36 .P
37 If a spec file is specified on the command line,
38 .B build
39 will use this file and all other files in the directory for building
40 the package. If a srcrpm is specified,
41 .B build
42 automatically unpacks it for the build.
43 If neither is given,
44 .B build
45 will use all the specfiles in the current directory.
46 .SH OPTIONS
47 .TP
48 .B --clean
49 remove the build system and reinitialize it from scratch.
50 .TP
51 .B --no-init
52 skip the build system initialization and start with build immediately.
53 .TP
54 .BI "\-\-rpms " path1 : path2 : path3\fR...\fP
55 Where build can find the SuSE Linux RPMs needed to create the
56 build system. This option overrides the BUILD_RPMS environment
57 variable.
58 .TP
59 .BI "\-\-arch " arch1 : arch2 : arch3\fR...\fP
60 What architectures to select from the RPMs.
61 .B build
62 automatically sets this to a sensible value for your host if you
63 don't specify this option.
64 .TP
65 .BI "\-\-root " buildroot
66 Specifies where the build system is set up. Overrides the
67 BUILD_ROOT enviroment variable.
68 .TP
69 .B "\-\-useusedforbuild"
70 Tell build not to do dependency expansion, but to extract the
71 list of packages to install from "usedforbuild" lines or, if none
72 are found, from all "BuildRequires" lines. This option is useful
73 if you want to re-build a package from a srcrpm with exactly the
74 same packages used for the srcrpm build.
75 .TP
76 .B --help
77 Print a short help text.
78 .TP
79 .B --verify
80 verify the files in an existing build system.
81 .SH ENVIRONMENT
82 .TP
83 .B BUILD_ROOT
84 The directory where build should install the chrooted build system.
85 "/var/tmp/build-root" is used by default.
86 .TP
87 .B BUILD_RPMS
88 Where build can find the SuSE Linux RPMs.  build needs them to create the
89 build system.  "/media/dvd/suse" is the default value which will do
90 the trick if you have the SuSE Linux DVD mounted.
91 .TP
92 .B BUILD_RPM_BUILD_STAGE
93 The rpm build stage (-ba, -bb, ...).  This is just passed through to
94 rpm, check the rpm manpage for a complete list and descriptions.
95 "-ba" is the default.
96 You can use this to add more options to RPM.
97
98 .SH SEE ALSO
99 .BR rpm (1),
100 .TP
101 .BR "Maximum RPM":
102 .I http://www.rpm.org/max-rpm/