1MAKEPKG(8)                       Pacman Manual                      MAKEPKG(8)
2
3
4

NAME

6       makepkg - package build utility
7

SYNOPSIS

9       makepkg [options] [ENVVAR=value] [ENVVAR+=value] ...
10

DESCRIPTION

12       makepkg is a script to automate the building of packages. The
13       requirements for using the script are a build-capable *nix platform and
14       a custom build script for each package you wish to build (known as a
15       PKGBUILD). See PKGBUILD(5) for details on creating your own build
16       scripts.
17
18       The advantage to a script-based build is that the work is only done
19       once. Once you have the build script for a package, makepkg will do the
20       rest: download and validate source files, check dependencies, configure
21       the build-time settings, build the package, install the package into a
22       temporary root, make customizations, generate meta-info, and package
23       the whole thing up for pacman to use.
24
25           Note
26           makepkg uses your current locale by default and does not unset it
27           when building packages. If you wish to share your build output with
28           others when seeking help or for other purposes, you may wish to run
29           "LC_ALL=C makepkg" so your logs and output are not localized.
30

OPTIONS

32       -A, --ignorearch
33           Ignore a missing or incomplete arch field in the build script. This
34           is for rebuilding packages from source when the PKGBUILD may be
35           slightly outdated and not updated with an arch=('yourarch') field.
36
37       -c, --clean
38           Clean up leftover work files and directories after a successful
39           build.
40
41       --config <file>
42           Use an alternate configuration file instead of the
43           /etc/makepkg.conf default.
44
45       -d, --nodeps
46           Do not perform any dependency checks. This will let you override
47           and ignore any dependencies required. There is a good chance this
48           option will break the build process if all of the dependencies are
49           not installed.
50
51       -e, --noextract
52           Do not extract source files or run the prepare() function (if
53           present); use whatever source already exists in the $srcdir/
54           directory. This is handy if you want to go into $srcdir/ and
55           manually patch or tweak code, then make a package out of the
56           result. Keep in mind that creating a patch may be a better solution
57           to allow others to use your PKGBUILD.
58
59       --verifysource
60           For each source file in the source array of PKGBUILD, download the
61           file if required and perform the integrity checks. No extraction or
62           build is performed. Dependencies specified in the PKGBUILD will not
63           be handled unless --syncdeps is used. Useful for performing
64           subsequent offline builds.
65
66       -f, --force
67           makepkg will not build a package if a built package already exists
68           in the PKGDEST (set in makepkg.conf(5)) directory, which may
69           default to the current directory. This allows the built package to
70           be overwritten.
71
72       -g, --geninteg
73           For each source file in the source array of PKGBUILD, download the
74           file if required and generate integrity checks. The integrity
75           checks generated are determined by the checks present in the
76           PKGBUILD, falling back to the value of the INTEGRITY_CHECK array in
77           makepkg.conf(5) if these are absent This output can be redirected
78           into your PKGBUILD for source validation using "makepkg -g >>
79           PKGBUILD".
80
81       --skipinteg
82           Do not perform any integrity checks (checksum and PGP) on source
83           files.
84
85       --skipchecksums
86           Do not verify checksums of source files.
87
88       --skippgpcheck
89           Do not verify PGP signatures of source files.
90
91       -h, --help
92           Output syntax and command line options.
93
94       --holdver
95           When using VCS sources (PKGBUILD(5)) any currently checked out
96           source will not be updated to the latest revision.
97
98       -i, --install
99           Install or upgrade the package after a successful build using
100           pacman(8).
101
102       -L, --log
103           Enable logging. This will use the tee program to send the output of
104           each of the PKGBUILD functions to both the console and to a text
105           file in the build directory named
106           pkgbase-pkgver-pkgrel-arch-<function>.log. As mentioned above, the
107           logs will be localized so you may want to set your locale
108           accordingly if sharing the log output with others.
109
110       -m, --nocolor
111           Disable color in output messages.
112
113       -o, --nobuild
114           Download and extract files, run the prepare() function, but do not
115           build them. Useful with the --noextract option if you wish to tweak
116           the files in $srcdir/ before building.
117
118       -p <buildscript>
119           Read the package script buildscript instead of the PKGBUILD
120           default; see PKGBUILD(5). The buildscript must be located in the
121           directory makepkg is called from.
122
123       -r, --rmdeps
124           Upon successful build, remove any dependencies installed by makepkg
125           during dependency auto-resolution and installation when using -s.
126
127       -R, --repackage
128           Repackage contents of the package without rebuilding the package.
129           This is useful if you forgot, for example, a dependency or install
130           file in your PKGBUILD and the build itself will not change.
131
132       -s, --syncdeps
133           Install missing dependencies using pacman. When build-time or
134           run-time dependencies are not found, pacman will try to resolve
135           them. If successful, the missing packages will be downloaded and
136           installed.
137
138       -S, --source
139           Do not actually build the package, but build a source-only tarball
140           that does not include sources that can be fetched via a download
141           URL. This is useful for passing a single tarball to another program
142           such as a chroot, remote builder, or a tarball upload. Because
143           integrity checks are verified, all source files of the package need
144           to be present or downloadable.
145
146       -V, --version
147           Display version information.
148
149       -C, --cleanbuild
150           Remove the $srcdir before building the package.
151
152       --allsource
153           Do not actually build the package, but build a source-only tarball
154           that includes all sources, including those that are normally
155           downloaded via makepkg. This is useful for passing a single tarball
156           to another program such as a chroot or remote builder. It will also
157           satisfy requirements of the GPL when distributing binary packages.
158
159       --check
160           Run the check() function in the PKGBUILD, overriding the setting in
161           makepkg.conf(5).
162
163       --noarchive
164           Do not create the archive at the end of the build process. This can
165           be useful to test the package() function or if your target
166           distribution does not use pacman.
167
168       --nocheck
169           Do not run the check() function in the PKGBUILD or handle the
170           checkdepends.
171
172       --noprepare
173           Do not run the prepare() function in the PKGBUILD.
174
175       --sign
176           Sign the resulting package with gpg, overriding the setting in
177           makepkg.conf(5).
178
179       --nosign
180           Do not create a signature for the built package.
181
182       --key <key>
183           Specify a key to use when signing packages, overriding the GPGKEY
184           setting in makepkg.conf(5). If not specified in either location,
185           the default key from the keyring will be used.
186
187       --noconfirm
188           (Passed to pacman) Prevent pacman from waiting for user input
189           before proceeding with operations.
190
191       --needed
192           (Passed to pacman) Tell pacman not to reinstall a target if it is
193           already up-to-date. (used with -i / --install).
194
195       --asdeps
196           (Passed to pacman) Install packages as non-explicitly installed
197           (used with -i / --install).
198
199       --noprogressbar
200           (Passed to pacman) Prevent pacman from displaying a progress bar;
201           useful if you are redirecting makepkg output to file.
202
203       --packagelist
204           List the packages that would be produced without building. Listed
205           package names do not include PKGEXT.
206
207       --printsrcinfo
208           Generate and print the SRCINFO file to stdout.
209

ADDITIONAL FEATURES

211       makepkg supports building development versions of packages without
212       having to manually update the pkgver in the PKGBUILD. This was formerly
213       done using the separate utility versionpkg. See PKGBUILD(5) for details
214       on how to set up a development PKGBUILD.
215

ENVIRONMENT VARIABLES

217       PACMAN
218           The command that will be used to check for missing dependencies and
219           to install and remove packages. Pacman’s -Qq, -Rns, -S, -T, and -U
220           operations must be supported by this command. If the variable is
221           not set or empty, makepkg will fall back to ‘pacman’.
222
223       MAKEPKG_CONF="/path/to/file"
224           Use an alternate config file instead of the /etc/makepkg.conf
225           default.
226
227       PKGDEST="/path/to/directory"
228           Directory where the resulting packages will be stored. Overrides
229           the corresponding value defined in makepkg.conf(5).
230
231       SRCDEST="/path/to/directory"
232           Directory where the downloaded sources will be stored. Overrides
233           the corresponding value defined in makepkg.conf(5).
234
235       SRCPKGDEST="/path/to/directory"
236           Directory where source package files will be stored. Overrides the
237           corresponding value defined in makepkg.conf(5).
238
239       LOGDEST="/path/to/directory"
240           Directory where generated log files will be stored. Overrides the
241           corresponding value defined in makepkg.conf(5).
242
243       PACKAGER="John Doe <john@doe.com>"
244           String to identify the creator of the resulting package. Overrides
245           the corresponding value defined in makepkg.conf(5).
246
247       BUILDDIR="/path/to/directory"
248           Directory where the package will be built. Overrides the
249           corresponding value defined in makepkg.conf(5).
250
251       CARCH="(i686|x86_64)"
252           Force build for a specific architecture. Useful for
253           cross-compiling. Overrides the corresponding value defined in
254           makepkg.conf(5).
255
256       PKGEXT=".pkg.tar.gz", SRCEXT=".src.tar.gz"
257           Sets the compression used when making compiled or source packages.
258           Overrides the corresponding value defined in makepkg.conf(5).
259
260       GNUPGHOME="/path/to/directory"
261           Directory where the gpg keyring for signing the built package is
262           stored.
263
264       GPGKEY="keyid"
265           Specify a key to use when signing packages, overriding the GPGKEY
266           setting in makepkg.conf(5)
267

CONFIGURATION

269       See makepkg.conf(5) for more details on configuring makepkg using the
270       makepkg.conf file.
271

SEE ALSO

273       makepkg.conf(5), PKGBUILD(5), pacman(8)
274
275       See the pacman website at https://www.archlinux.org/pacman/ for current
276       information on pacman and its related tools.
277

BUGS

279       Bugs? You must be kidding; there are no bugs in this software. But if
280       we happen to be wrong, send us an email with as much detail as possible
281       to pacman-dev@archlinux.org.
282

AUTHORS

284       Current maintainers:
285
286       ·   Allan McRae <allan@archlinux.org>
287
288       ·   Andrew Gregory <andrew.gregory.8@gmail.com>
289
290       ·   Dan McGee <dan@archlinux.org>
291
292       ·   Dave Reisner <dreisner@archlinux.org>
293
294       Past major contributors:
295
296       ·   Judd Vinet <jvinet@zeroflux.org>
297
298       ·   Aurelien Foret <aurelien@archlinux.org>
299
300       ·   Aaron Griffin <aaron@archlinux.org>
301
302       ·   Xavier Chantry <shiningxc@gmail.com>
303
304       ·   Nagy Gabor <ngaba@bibl.u-szeged.hu>
305
306       For additional contributors, use git shortlog -s on the pacman.git
307       repository.
308
309
310
311Pacman 5.0.2                      2018-07-14                        MAKEPKG(8)
Impressum