1MAKEPKG.CONF(5)                  Pacman Manual                 MAKEPKG.CONF(5)
2
3
4

NAME

6       makepkg.conf - makepkg configuration file
7

SYNOPSIS

9       /etc/makepkg.conf, $XDG_CONFIG_HOME/pacman/makepkg.conf,
10       ~/.makepkg.conf
11

DESCRIPTION

13       Configuration options for makepkg are stored in makepkg.conf. This file
14       is sourced so you can include any special compiler flags you wish to
15       use. This is helpful when building for different architectures or with
16       different optimizations. However, only the variables described below
17       are exported to the build environment.
18
19           Note
20           This does not guarantee that all package Makefiles will use your
21           exported variables. Some of them are non-standard.
22
23       The system-wide configuration file is found in /etc/makepkg.conf.
24       Individual options can be overridden (or added to) on a per-user basis
25       in $XDG_CONFIG_HOME/pacman/makepkg.conf or ~/.makepkg.conf, with the
26       former taking priority.
27
28       The default file is fairly well commented, so it may be easiest to
29       simply follow directions given there for customization.
30

OPTIONS

32       DLAGENTS=('protocol::/path/to/command [options]' ...)
33           Sets the download agents used to fetch source files specified with
34           a URL in the PKGBUILD(5) file. Options can be specified for each
35           command as well, and any protocol can have a download agent. Any
36           spaces in option arguments are required to be escaped to avoid
37           being split. Several examples are provided in the default
38           makepkg.conf.
39
40           If present, %u will be replaced with the download URL. Otherwise,
41           the download URL will be placed on the end of the command. If
42           present, %o will be replaced with the local file name, plus a
43           “.part” extension, which allows makepkg to handle resuming file
44           downloads.
45
46       VCSCLIENTS=('protocol::package' ...)
47           Sets the packages required to fetch version controlled source
48           files. When required, makepkg will check that these packages are
49           installed or are included in the depends or makedepends arrays in
50           the PKGBUILD.
51
52       CARCH="carch"
53           Specifies your computer architecture; possible values include such
54           things as “i686”, “x86_64”, “ppc”, etc. This should be
55           automatically set on installation.
56
57       CHOST="chost"
58           A string such as “i686-pc-linux-gnu”; do not touch this unless you
59           know what you are doing. This can be commented out by most users if
60           desired.
61
62       CPPFLAGS="cppflags"
63           Flags used for the C preprocessor; see CFLAGS for more information.
64
65       CFLAGS="cflags"
66           Flags used for the C compiler. This is a key part to the use of
67           makepkg. Usually several options are specified, and the most common
68           string resembles something like this: “-march=i686 -O2 -pipe”.
69           Another useful option may be -mcpu in place of -march. Read gcc(1)
70           for more details on the wide variety of compiler flags available.
71
72       CXXFLAGS="cxxflags"
73           Flags used for the C++ compiler; see CFLAGS for more info.
74
75       RUSTFLAGS="rustflags"
76           Flags used for the Rust compiler, similar in spirit to CFLAGS. Read
77           rustc(1) for more details on the available flags.
78
79       LDFLAGS="ldflags"
80           Flags used for the linker. Several options may be specified with
81           common usage resembling “-Wl,--hash-style=gnu”. Read ld(1) for more
82           details on available linker flags.
83
84       MAKEFLAGS="makeflags"
85           This is often used to set the number of jobs used; for example,
86           -j2. Other flags that make accepts can also be passed.
87
88       DEBUG_CFLAGS="debug_cflags"
89           Additional compiler flags appended to CFLAGS for use in debugging.
90           Usually this would include: “-g”. Read gcc(1) for more details on
91           the wide variety of compiler flags available.
92
93       DEBUG_CXXFLAGS="debug_cxxflags"
94           Debug flags used for the C++ compiler; see DEBUG_CFLAGS for more
95           info.
96
97       DEBUG_RUSTFLAGS="debug_rustflags"
98           Additional compiler flags appended to RUSTFLAGS for use in
99           debugging. Usually this would include: “-C debuginfo=2”. Read
100           rustc(1) for more details on the available flags.
101
102       BUILDENV=(!distcc !color !ccache check !sign)
103           This array contains options that affect the build environment; the
104           defaults are shown here. All options should always be left in the
105           array; to enable or disable an option, simply remove or add an “!”
106           at the front of the option. If an option is specified multiple
107           times, the final value takes precedence. Each option works as
108           follows:
109
110           distcc
111               Use the distributed C/C++/ObjC compiler to spread compilation
112               among multiple machines. If this is enabled, DISTCC_HOSTS must
113               be specified as well.
114
115           color
116               Colorize output messages, making output easier to read.
117
118           ccache
119               Use ccache to cache compilation by default. This allows for
120               faster compiles if you are continuously recompiling the same
121               packages. It can be disabled for individual packages by placing
122               !ccache in the PKGBUILD options array.
123
124           check
125               Run the check() function if present in the PKGBUILD. This can
126               be enabled or disabled for individual packages through the use
127               of makepkg’s --check and --nocheck options, respectively.
128
129           sign
130               Generate a PGP signature file using GnuPG. This will execute
131               gpg --detach-sign --use-agent on the built package to generate
132               a detached signature file, using the GPG agent, if it is
133               available. The signature file will be the entire file name of
134               the package with a “.sig” extension.
135
136       DISTCC_HOSTS="host1 ..."
137           If using DistCC, this is used to specify a space-delimited list of
138           hosts running in the DistCC cluster. In addition, you will want to
139           modify your MAKEFLAGS.
140
141       BUILDDIR="/path/to/directory"
142           If this value is not set, packages will, by default, be built in
143           subdirectories of the directory that makepkg is called from. This
144           option allows setting the build location to another directory.
145           Incorrect use of $startdir in a PKGBUILD may cause building with
146           this option to fail.
147
148       GPGKEY=""
149           Specify a key to use for GPG signing instead of the default key in
150           the keyring. Can be overridden with makepkg’s --key option.
151
152       OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge
153       !debug)
154           This array contains options that affect default packaging. They are
155           equivalent to options that can be placed in the PKGBUILD; the
156           defaults are shown here. All options should always be left in the
157           array; to enable or disable an option, simply remove or add an “!”
158           at the front of the option. If an option is specified multiple
159           times, the final value takes precedence. Each option works as
160           follows:
161
162           strip
163               Strip symbols from binaries and libraries. If you frequently
164               use a debugger on programs or libraries, it may be helpful to
165               disable this option.
166
167           docs
168               Save doc directories. If you wish to delete doc directories,
169               specify !docs in the array. The directories affected are
170               specified by the DOC_DIRS variable.
171
172           libtool
173               Leave libtool (.la) files in packages. Specify !libtool to
174               remove them.
175
176           staticlibs
177               Leave static library (.a) files in packages. Specify
178               !staticlibs to remove them, if they have a shared counterpart.
179
180           emptydirs
181               Leave empty directories in packages.
182
183           zipman
184               Compress manual (man and info) pages with gzip. The directories
185               affected are specified by the MAN_DIRS variable.
186
187           purge
188               Remove files specified by the PURGE_TARGETS variable from the
189               package.
190
191           debug
192               Add the user-specified debug flags as specified in DEBUG_CFLAGS
193               and DEBUG_CXXFLAGS to their counterpart buildflags. Creates a
194               separate package containing the debug symbols when used with
195               ‘strip’.
196
197       INTEGRITY_CHECK=(check1 ...)
198           File integrity checks to use. Multiple checks may be specified;
199           this affects both generation and checking. The current valid
200           options are: md5, sha1, sha224, sha256, sha384, sha512, and b2.
201
202       STRIP_BINARIES="--strip-all"
203           Options to be used when stripping binaries. See strip(1) for
204           details.
205
206       STRIP_SHARED="--strip-unneeded"
207           Options to be used when stripping shared libraries or PIE
208           executables. See strip(1) for details.
209
210       STRIP_STATIC="--strip-debug"
211           Options to be used when stripping static libraries. See strip(1)
212           for details.
213
214       MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info} ...)
215           If zipman is specified in the OPTIONS array, this variable will
216           instruct makepkg where to look to compress manual (man and info)
217           pages. If you build packages that are located in opt/, you may need
218           to add the directory to this array.  NOTE: Do not add the leading
219           slash to the directory name.
220
221       DOC_DIRS=(usr/{,share/}{doc,gtk-doc} ...)
222           If !docs is specified in the OPTIONS array, this variable will
223           instruct makepkg where to look to remove docs. If you build
224           packages that are located in opt/, you may need to add the
225           directory to this array.  NOTE: Do not add the leading slash to the
226           directory name.
227
228       PURGE_TARGETS=(usr/{,share}/info/dir .podlist *.pod...)
229           If purge is specified in the OPTIONS array, this variable will
230           instruct makepkg which files to remove from the package. This is
231           useful for index files that are added by multiple packages.
232
233       DBGSRCDIR="/usr/src/debug"
234           If strip and debug are specified in the OPTIONS array, this
235           variable will instruct makepkg where to place source files for
236           installed binaries. The binaries will be modified to link this
237           directory for the debugger search path.
238
239       PKGDEST="/path/to/directory"
240           If this value is not set, packages will, by default, be placed in
241           the current directory (location of the PKGBUILD(5)). Many people
242           like to keep all their packages in one place so this option allows
243           for this behavior. A common location is “/home/packages”.
244
245       SRCDEST="/path/to/directory"
246           If this value is not set, downloaded source files will only be
247           stored in the current directory. Many people like to keep all
248           source files in a central location for easy cleanup, so this path
249           can be set here.
250
251       SRCPKGDEST="/path/to/directory"
252           If this value is not set, source package files will be stored in in
253           the current directory. Many people like to keep all source package
254           files in a central location for easy cleanup, so this path can be
255           set here.
256
257       LOGDEST="/path/to/directory"
258           If this value is not set, log files are written to the current
259           directory. This centralizes the log location, facilitating cleanup
260           and compression.
261
262       PACKAGER="John Doe <john@example.com>"
263           This value is used when querying a package to see who was the
264           builder. The given format is required for PGP key lookup through
265           WKD. It is recommended to change this to your name and email
266           address.
267
268       COMPRESSGZ="(gzip -c -f -n)", COMPRESSBZ2="(bzip2 -c -f)",
269       COMPRESSXZ="(xz -c -z -)", COMPRESSZST="(zstd -c -z -)",
270       COMPRESSLZO"(lzop -q)", COMPRESSLRZ="(lrzip -q)", COMPRESSLZ4="(lz4
271       -q)", COMPRESSZ="(compress -c -f)", COMPRESSLZ="(lzip -c -f)"
272           Sets the command and options used when compressing compiled or
273           source packages in the named format.
274
275       PKGEXT=".pkg.tar.gz", SRCEXT=".src.tar.gz"
276           Sets the compression used when making compiled or source packages.
277           Valid suffixes are .tar.gz, .tar.bz2, .tar.xz, .tar.zst, .tar.lzo,
278           .tar.lrz, .tar.lz4, .tar.lz and .tar.Z, or simply .tar to disable
279           compression entirely.
280

SEE ALSO

282       makepkg(8), pacman(8), PKGBUILD(5)
283
284       See the pacman website at https://www.archlinux.org/pacman/ for current
285       information on pacman and its related tools.
286

BUGS

288       Bugs? You must be kidding; there are no bugs in this software. But if
289       we happen to be wrong, submit a bug report with as much detail as
290       possible at the Arch Linux Bug Tracker in the Pacman section.
291

AUTHORS

293       Current maintainers:
294
295       •   Allan McRae <allan@archlinux.org>
296
297       •   Andrew Gregory <andrew.gregory.8@gmail.com>
298
299       •   Dan McGee <dan@archlinux.org>
300
301       •   Dave Reisner <dreisner@archlinux.org>
302
303       Past major contributors:
304
305       •   Judd Vinet <jvinet@zeroflux.org>
306
307       •   Aurelien Foret <aurelien@archlinux.org>
308
309       •   Aaron Griffin <aaron@archlinux.org>
310
311       •   Xavier Chantry <shiningxc@gmail.com>
312
313       •   Nagy Gabor <ngaba@bibl.u-szeged.hu>
314
315       For additional contributors, use git shortlog -s on the pacman.git
316       repository.
317
318
319
320Pacman 5.2.1                      2021-01-27                   MAKEPKG.CONF(5)
Impressum