]> wolfpit.net Git - tool/Arch-pacman/.git/blame - doc/makepkg.8.txt
makepkg.8: fix typo in usage
[tool/Arch-pacman/.git] / doc / makepkg.8.txt
CommitLineData
e412ac19 1/////
cd8747ba 2vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
e412ac19 3/////
be0a472c
AF
4makepkg(8)
5==========
6
7Name
8----
9makepkg - package build utility
10
11
12Synopsis
13--------
9e50e531 14'makepkg' [options] [ENVVAR=value] [ENVVAR+=value] ...
be0a472c
AF
15
16
17Description
18-----------
c3ae2092 19'makepkg' is a script to automate the building of packages. The requirements for
f1d74d92 20using the script are a build-capable *nix platform and a custom build script
889fccd5 21for each package you wish to build (known as a PKGBUILD). See
b3c6bdda 22linkman:PKGBUILD[5] for details on creating your own build scripts.
be0a472c
AF
23
24The advantage to a script-based build is that the work is only done once. Once
c3ae2092 25you have the build script for a package, 'makepkg' will do the rest: download and
be0a472c
AF
26validate source files, check dependencies, configure the build-time settings,
27build the package, install the package into a temporary root, make
c9189f54
DM
28customizations, generate meta-info, and package the whole thing up for pacman
29to use.
be0a472c 30
c3ae2092 31NOTE: 'makepkg' uses your current locale by default and does not unset it when
a7a9f375
DM
32building packages. If you wish to share your build output with others when
33seeking help or for other purposes, you may wish to run "`LC_ALL=C makepkg`" so
34your logs and output are not localized.
35
be0a472c
AF
36Options
37-------
e93b0a2f
DM
38*\--asroot*::
39 Allow makepkg to run as root. This is for security purposes as it is
40 normally dangerous to do so. This will also disable use of fakeroot and
41 sudo.
42
c9189f54
DM
43*-A, \--ignorearch*::
44 Ignore a missing or incomplete arch field in the build script. This is
45 for rebuilding packages from source when the PKGBUILD may be slightly
e37ecbe8 46 outdated and not updated with an `arch=('yourarch')` field.
c9189f54 47
c9189f54 48*-c, \--clean*::
be0a472c
AF
49 Clean up leftover work files and directories after a successful build.
50
7d899910 51*\--config* <file>::
aad57cc0 52 Use an alternate config file instead of the +{sysconfdir}/makepkg.conf+
5eca2fbd 53 default.
4b183bf9 54
c9189f54 55*-d, \--nodeps*::
be0a472c
AF
56 Do not perform any dependency checks. This will let you override and
57 ignore any dependencies required. There is a good chance this option
58 will break the build process if all of the dependencies are not
59 installed.
60
c9189f54 61*-e, \--noextract*::
eb25a185
E
62 Do not extract source files or run the prepare() function (if present);
63 use whatever source already exists in the $srcdir/ directory. This is
64 handy if you want to go into $srcdir/ and manually patch or tweak code,
65 then make a package out of the result. Keep in mind that creating a
66 patch may be a better solution to allow others to use your PKGBUILD.
be0a472c 67
2259dff7
OB
68*\--verifysource*::
69 For each source file in the source array of PKGBUILD, download the file
70 if required and perform the integrity checks. No extraction or build is
71 performed. Useful for performing subsequent offline builds.
72
c9189f54 73*-f, \--force*::
be0a472c 74 makepkg will not build a package if a built package already exists in
c2603924 75 the `PKGDEST` (set in linkman:makepkg.conf[5]) directory, which may
be0a472c
AF
76 default to the current directory. This allows the built package to be
77 overwritten.
78
c9189f54 79*-g, \--geninteg*::
be0a472c 80 For each source file in the source array of PKGBUILD, download the file
79987c92
XC
81 if required and generate integrity checks. The integrity checks generated
82 are determined by the checks present in the PKGBUILD, falling back to the
83 value of the INTEGRITY_CHECK array in makepkg.conf(5) if these are absent
84 This output can be redirected into your PKGBUILD for source validation
85 using "`makepkg -g >> PKGBUILD`".
be0a472c 86
82522dd8 87*--skipinteg*::
2b3405e0
AM
88 Do not perform any integrity checks (checksum and PGP) on source files.
89
90*\--skipchecksums*::
91 Do not verify checksums of source files.
82522dd8 92
94f61c5b 93*\--skippgpcheck*::
2b3405e0 94 Do not verify PGP signatures of source files.
94f61c5b 95
c9189f54 96*-h, \--help*::
be0a472c
AF
97 Output syntax and command line options.
98
d51902c9
AM
99*--holdver*::
100 When using VCS sources (linkman:PKGBUILD[5]) any currently checked out source
101 will not be updated to the latest revision.
102
c9189f54
DM
103*-i, \--install*::
104 Install or upgrade the package after a successful build using
b3c6bdda 105 linkman:pacman[8].
be0a472c 106
a7a9f375
DM
107*-L, \--log*::
108 Enable makepkg build logging. This will use the *tee* program to send
109 output of the `build()` function to both the console and to a text file in
110 the build directory named `pkgname-pkgver-pkgrel-arch.log`. As mentioned
111 above, the build log will be localized so you may want to set your locale
112 accordingly if sharing the log output with others.
113
c9189f54 114*-m, \--nocolor*::
be0a472c
AF
115 Disable color in output messages.
116
c9189f54 117*-o, \--nobuild*::
eb25a185
E
118 Download and extract files, run the prepare() function, but do not build
119 them. Useful with the '\--noextract' option if you wish to tweak the files
120 in $srcdir/ before building.
be0a472c 121
7d899910 122*-p* <buildscript>::
aea45a8b 123 Read the package script `buildscript` instead of the `PKGBUILD` default;
b3c6bdda 124 see linkman:PKGBUILD[5].
be0a472c 125
c9189f54 126*-r, \--rmdeps*::
be0a472c 127 Upon successful build, remove any dependencies installed by makepkg
89b0a76b 128 during dependency auto-resolution and installation when using `-s`.
be0a472c 129
c9189f54 130*-R, \--repackage*::
5e32928a
AM
131 Repackage contents of the package without rebuilding the package. This
132 is useful if you forgot a depend or install file in your PKGBUILD and
133 the build itself will not change.
be0a472c 134
c9189f54 135*-s, \--syncdeps*::
aea45a8b
SH
136 Install missing dependencies using pacman. When build-time or run-time
137 dependencies are not found, pacman will try to resolve them. If
be0a472c
AF
138 successful, the missing packages will be downloaded and installed.
139
4a7f3bbc
SL
140*-S, \--source*::
141 Do not actually build the package, but build a source-only tarball that
142 does not include sources that can be fetched via a download URL. This is
143 useful for passing a single tarball to another program such as a chroot,
144 remote builder, or a tarball upload. Because integrity checks are verified,
145 all source files of the package need to be present or downloadable.
146
91b9ea92
EB
147*-V, \--version*::
148 Display version information.
149
692ea728
DM
150*\--allsource*::
151 Do not actually build the package, but build a source-only tarball that
152 includes all sources, including those that are normally download via
153 makepkg. This is useful for passing a single tarball to another program
154 such as a chroot or remote builder. It will also satisfy requirements of
155 the GPL when distributing binary packages.
156
59dc631c 157*\--pkg* <list>::
d85c7186 158 Only build listed packages from a split package. Multiple packages should
3f9cf847 159 be comma separated in the list. This option can be specified multiple times.
f2c9e51e 160
0c29eb43
AM
161*\--check*::
162 Run the check() function in the PKGBUILD, overriding the setting in
163 linkman:makepkg.conf[5].
164
165*\--nocheck*::
166 Do not run the check() function in the PKGBUILD or handle the checkdepends.
167
9de33488
EB
168*\--noprepare*::
169 Do not run the prepare() function in the PKGBUILD.
170
cb35affd
AM
171*\--sign*::
172 Sign the resulting package with gpg, overriding the setting in
173 linkman:makepkg.conf[5].
174
175*\--nosign*::
176 Do not create a signature for the built package.
177
178*\--key* <key>::
4c31bc6e
AM
179 Specify a key to use when signing packages, overriding the GPGKEY setting
180 in linkman:makepkg.conf[5]. If not specified in either location, the
181 default key from the keyring will be used.
cb35affd 182
c9189f54 183*\--noconfirm*::
be0a472c
AF
184 (Passed to pacman) Prevent pacman from waiting for user input before
185 proceeding with operations.
186
6b1deedf 187*\--needed*::
188 (Passed to pacman) Tell pacman not to reinstall a target if it is already
189 up to date. (used with -i / --install).
190
52550a2a
DW
191*\--asdeps*::
192 (Passed to pacman) Install packages as non-explicitly installed (used
193 with -i / --install).
194
c9189f54 195*\--noprogressbar*::
be0a472c
AF
196 (Passed to pacman) Prevent pacman from displaying a progress bar;
197 useful if you are redirecting makepkg output to file.
198
199
aea45a8b
SH
200Additional Features
201-------------------
202makepkg supports building development versions of packages without having to
203manually update the pkgver in the PKGBUILD. This was formerly done using the
b3c6bdda 204separate utility 'versionpkg'. See linkman:PKGBUILD[5] for details on how to
aea45a8b
SH
205set up a development PKGBUILD.
206
207
66c6d288
CS
208Environment Variables
209---------------------
210*PACMAN*::
211 The command that will be used to check for missing dependencies and to
ccbef232
AM
212 install and remove packages. Pacman's -Qq, -Rns, -S, -T, and -U
213 operations must be supported by this command. If the variable is not
214 set or empty, makepkg will fall back to `pacman'.
66c6d288 215
eee61a0b
CS
216**PKGDEST=**"/path/to/folder"::
217 Folder where the resulting packages will be stored. Overrides the
218 corresponding value defined in linkman:makepkg.conf[5].
219
220**SRCDEST=**"/path/to/folder"::
221 Folder where the downloaded sources will be stored. Overrides the
222 corresponding value defined in linkman:makepkg.conf[5].
223
5ba8b83b
PS
224**PACKAGER=**"John Doe <john@doe.com>"::
225 String to identify the creator of the resulting package. Overrides
226 the corresponding value defined in linkman:makepkg.conf[5].
227
508b360c
AM
228**BUILDDIR=**"/path/to/folder"::
229 Folder where the package will be built. Overrides the corresponding
230 value defined in linkman:makepkg.conf[5].
66c6d288 231
5bcc058d
PS
232**CARCH=**"(i686|x86_64)"::
233 Force build for a specific architecture. Useful for cross-compiling.
234 Overrides the corresponding value defined in linkman:makepkg.conf[5].
235
be0a472c
AF
236Configuration
237-------------
b3c6bdda 238See linkman:makepkg.conf[5] for more details on configuring makepkg using the
c9189f54 239'makepkg.conf' file.
be0a472c
AF
240
241
242See Also
243--------
b3c6bdda 244linkman:makepkg.conf[5], linkman:PKGBUILD[5], linkman:pacman[8]
be0a472c
AF
245
246include::footer.txt[]