2 vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
9 makepkg - package build utility
19 'makepkg' is a script to automate the building of packages. The requirements for
20 using the script are a build-capable \*nix platform and a custom build script
21 for each package you wish to build (known as a PKGBUILD). See
22 linkman:PKGBUILD[5] for details on creating your own build scripts.
24 The advantage to a script-based build is that the work is only done once. Once
25 you have the build script for a package, 'makepkg' will do the rest: download and
26 validate source files, check dependencies, configure the build-time settings,
27 build the package, install the package into a temporary root, make
28 customizations, generate meta-info, and package the whole thing up for pacman
31 NOTE: 'makepkg' uses your current locale by default and does not unset it when
32 building packages. If you wish to share your build output with others when
33 seeking help or for other purposes, you may wish to run "`LC_ALL=C makepkg`" so
34 your logs and output are not localized.
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
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
46 outdated and not updated with an `arch=('yourarch')` field.
49 Clean up leftover work files and directories after a successful build.
52 Use an alternate config file instead of the +{sysconfdir}/makepkg.conf+
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
62 Do not extract source files; use whatever source already exists in the
63 src/ directory. This is handy if you want to go into src/ and manually
64 patch or tweak code, then make a package out of the result. Keep in mind
65 that creating a patch may be a better solution to allow others to use
69 makepkg will not build a package if a built package already exists in
70 the `PKGDEST` (set in linkman:makepkg.conf[5]) directory, which may
71 default to the current directory. This allows the built package to be
75 This is a hidden option that should *not* be used unless you really know
76 what you are doing. makepkg uses this internally when calling itself to
77 set the new development pkgver of the package.
80 For each source file in the source array of PKGBUILD, download the file
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`".
88 Do not perform any integrity checks (checksum and PGP) on source files.
91 Do not verify checksums of source files.
94 Do not verify PGP signatures of source files.
97 Output syntax and command line options.
100 Useful when building development versions of packages. Prevents makepkg
101 from automatically bumping the pkgver to the latest revision number in
102 the package's development tree.
105 Install or upgrade the package after a successful build using
109 Enable makepkg build logging. This will use the *tee* program to send
110 output of the `build()` function to both the console and to a text file in
111 the build directory named `pkgname-pkgver-pkgrel-arch.log`. As mentioned
112 above, the build log will be localized so you may want to set your locale
113 accordingly if sharing the log output with others.
116 Disable color in output messages.
119 Download and extract files only, but do not build them. Useful with the
120 '\--noextract' option if you wish to tweak the files in src/ before
124 Read the package script `buildscript` instead of the `PKGBUILD` default;
125 see linkman:PKGBUILD[5].
128 Upon successful build, remove any dependencies installed by makepkg
129 during dependency auto-resolution and installation when using `-s`.
132 Repackage contents of the package without rebuilding the package. This
133 is useful if you forgot a depend or install file in your PKGBUILD and
134 the build itself will not change.
137 Install missing dependencies using pacman. When build-time or run-time
138 dependencies are not found, pacman will try to resolve them. If
139 successful, the missing packages will be downloaded and installed.
142 Do not actually build the package, but build a source-only tarball that
143 does not include sources that can be fetched via a download URL. This is
144 useful for passing a single tarball to another program such as a chroot,
145 remote builder, or a tarball upload. Because integrity checks are verified,
146 all source files of the package need to be present or downloadable.
149 Do not actually build the package, but build a source-only tarball that
150 includes all sources, including those that are normally download via
151 makepkg. This is useful for passing a single tarball to another program
152 such as a chroot or remote builder. It will also satisfy requirements of
153 the GPL when distributing binary packages.
156 Only build listed packages from a split package.
159 Run the check() function in the PKGBUILD, overriding the setting in
160 linkman:makepkg.conf[5].
163 Do not run the check() function in the PKGBUILD or handle the checkdepends.
166 Sign the resulting package with gpg, overriding the setting in
167 linkman:makepkg.conf[5].
170 Do not create a signature for the built package.
173 Specify a key to use when signing packages, overriding the GPGKEY setting
174 in linkman:makepkg.conf[5]. If not specified in either location, the
175 default key from the keyring will be used.
178 (Passed to pacman) Prevent pacman from waiting for user input before
179 proceeding with operations.
182 (Passed to pacman) Prevent pacman from displaying a progress bar;
183 useful if you are redirecting makepkg output to file.
188 makepkg supports building development versions of packages without having to
189 manually update the pkgver in the PKGBUILD. This was formerly done using the
190 separate utility 'versionpkg'. See linkman:PKGBUILD[5] for details on how to
191 set up a development PKGBUILD.
194 Environment Variables
195 ---------------------
197 The command that will be used to check for missing dependencies and to
198 install and remove packages. Pacman's -Qq, -Rns, -S, -T, and -U
199 operations must be supported by this command. If the variable is not
200 set or empty, makepkg will fall back to `pacman'.
202 **PKGDEST=**"/path/to/folder"::
203 Folder where the resulting packages will be stored. Overrides the
204 corresponding value defined in linkman:makepkg.conf[5].
206 **SRCDEST=**"/path/to/folder"::
207 Folder where the downloaded sources will be stored. Overrides the
208 corresponding value defined in linkman:makepkg.conf[5].
210 **PACKAGER=**"John Doe <john@doe.com>"::
211 String to identify the creator of the resulting package. Overrides
212 the corresponding value defined in linkman:makepkg.conf[5].
214 **BUILDDIR=**"/path/to/folder"::
215 Folder where the package will be built. Overrides the corresponding
216 value defined in linkman:makepkg.conf[5].
220 See linkman:makepkg.conf[5] for more details on configuring makepkg using the
226 linkman:makepkg.conf[5], linkman:PKGBUILD[5], linkman:pacman[8]
228 include::footer.txt[]