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       LTOFLAGS="ltoflags"
85           Additional compiler and linker flags appended to CFLAGS, CXXFLAGS
86           and LDFLAGS when building with link time optimization. If empty,
87           “-flto” is used.
88
89       MAKEFLAGS="makeflags"
90           This is often used to set the number of jobs used; for example,
91           -j2. Other flags that make accepts can also be passed.
92
93       DEBUG_CFLAGS="debug_cflags"
94           Additional compiler flags appended to CFLAGS for use in debugging.
95           Usually this would include: “-g”. Read gcc(1) for more details on
96           the wide variety of compiler flags available.
97
98       DEBUG_CXXFLAGS="debug_cxxflags"
99           Debug flags used for the C++ compiler; see DEBUG_CFLAGS for more
100           info.
101
102       DEBUG_RUSTFLAGS="debug_rustflags"
103           Additional compiler flags appended to RUSTFLAGS for use in
104           debugging. Usually this would include: “-C debuginfo=2”. Read
105           rustc(1) for more details on the available flags.
106
107       BUILDENV=(!distcc !color !ccache check !sign)
108           This array contains options that affect the build environment; the
109           defaults are shown here. All options should always be left in the
110           array; to enable or disable an option, simply remove or add an “!”
111           at the front of the option. If an option is specified multiple
112           times, the final value takes precedence. Each option works as
113           follows:
114
115           distcc
116               Use the distributed C/C++/ObjC compiler to spread compilation
117               among multiple machines. If this is enabled, DISTCC_HOSTS must
118               be specified as well.
119
120           color
121               Colorize output messages, making output easier to read.
122
123           ccache
124               Use ccache to cache compilation by default. This allows for
125               faster compiles if you are continuously recompiling the same
126               packages. It can be disabled for individual packages by placing
127               !ccache in the PKGBUILD options array.
128
129           check
130               Run the check() function if present in the PKGBUILD. This can
131               be enabled or disabled for individual packages through the use
132               of makepkg’s --check and --nocheck options, respectively.
133
134           sign
135               Generate a PGP signature file using GnuPG. This will execute
136               gpg --detach-sign --use-agent on the built package to generate
137               a detached signature file, using the GPG agent, if it is
138               available. The signature file will be the entire file name of
139               the package with a “.sig” extension.
140
141       DISTCC_HOSTS="host1 ..."
142           If using DistCC, this is used to specify a space-delimited list of
143           hosts running in the DistCC cluster. In addition, you will want to
144           modify your MAKEFLAGS.
145
146       BUILDDIR="/path/to/directory"
147           If this value is not set, packages will, by default, be built in
148           subdirectories of the directory that makepkg is called from. This
149           option allows setting the build location to another directory.
150           Incorrect use of $startdir in a PKGBUILD may cause building with
151           this option to fail.
152
153       GPGKEY=""
154           Specify a key to use for GPG signing instead of the default key in
155           the keyring. Can be overridden with makepkg’s --key option.
156
157       OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge
158       !debug)
159           This array contains options that affect default packaging. They are
160           equivalent to options that can be placed in the PKGBUILD; the
161           defaults are shown here. All options should always be left in the
162           array; to enable or disable an option, simply remove or add an “!”
163           at the front of the option. If an option is specified multiple
164           times, the final value takes precedence. Each option works as
165           follows:
166
167           strip
168               Strip symbols from binaries and libraries. If you frequently
169               use a debugger on programs or libraries, it may be helpful to
170               disable this option.
171
172           docs
173               Save doc directories. If you wish to delete doc directories,
174               specify !docs in the array. The directories affected are
175               specified by the DOC_DIRS variable.
176
177           libtool
178               Leave libtool (.la) files in packages. Specify !libtool to
179               remove them.
180
181           staticlibs
182               Leave static library (.a) files in packages. Specify
183               !staticlibs to remove them, if they have a shared counterpart.
184
185           emptydirs
186               Leave empty directories in packages.
187
188           zipman
189               Compress manual (man and info) pages with gzip. The directories
190               affected are specified by the MAN_DIRS variable.
191
192           purge
193               Remove files specified by the PURGE_TARGETS variable from the
194               package.
195
196           debug
197               Add the user-specified debug flags as specified in DEBUG_CFLAGS
198               and DEBUG_CXXFLAGS to their counterpart buildflags. Creates a
199               separate package containing the debug symbols when used with
200               ‘strip’.
201
202           lto
203               Enable building packages using link time optimization. Adds the
204               flags specified in LTOFLAGS to CFLAGS, CXXFLAGS and LDFLAGS (or
205               “-flto” if LTOFLAGS is empty).
206
207       INTEGRITY_CHECK=(check1 ...)
208           File integrity checks to use. Multiple checks may be specified;
209           this affects both generation and checking. The current valid
210           options are: ck, md5, sha1, sha224, sha256, sha384, sha512, and b2.
211
212       STRIP_BINARIES="--strip-all"
213           Options to be used when stripping binaries. See strip(1) for
214           details.
215
216       STRIP_SHARED="--strip-unneeded"
217           Options to be used when stripping shared libraries or PIE
218           executables. See strip(1) for details.
219
220       STRIP_STATIC="--strip-debug"
221           Options to be used when stripping static libraries. See strip(1)
222           for details.
223
224       MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info} ...)
225           If zipman is specified in the OPTIONS array, this variable will
226           instruct makepkg where to look to compress manual (man and info)
227           pages. If you build packages that are located in opt/, you may need
228           to add the directory to this array.  NOTE: Do not add the leading
229           slash to the directory name.
230
231       DOC_DIRS=(usr/{,share/}{doc,gtk-doc} ...)
232           If !docs is specified in the OPTIONS array, this variable will
233           instruct makepkg where to look to remove docs. If you build
234           packages that are located in opt/, you may need to add the
235           directory to this array.  NOTE: Do not add the leading slash to the
236           directory name.
237
238       PURGE_TARGETS=(usr/{,share}/info/dir .podlist *.pod...)
239           If purge is specified in the OPTIONS array, this variable will
240           instruct makepkg which files to remove from the package. This is
241           useful for index files that are added by multiple packages.
242
243       DBGSRCDIR="/usr/src/debug"
244           If strip and debug are specified in the OPTIONS array, this
245           variable will instruct makepkg where to place source files for
246           installed binaries. The binaries will be modified to link this
247           directory for the debugger search path.
248
249       PKGDEST="/path/to/directory"
250           If this value is not set, packages will, by default, be placed in
251           the current directory (location of the PKGBUILD(5)). Many people
252           like to keep all their packages in one place so this option allows
253           for this behavior. A common location is “/home/packages”.
254
255       SRCDEST="/path/to/directory"
256           If this value is not set, downloaded source files will only be
257           stored in the current directory. Many people like to keep all
258           source files in a central location for easy cleanup, so this path
259           can be set here.
260
261       SRCPKGDEST="/path/to/directory"
262           If this value is not set, source package files will be stored in in
263           the current directory. Many people like to keep all source package
264           files in a central location for easy cleanup, so this path can be
265           set here.
266
267       LOGDEST="/path/to/directory"
268           If this value is not set, log files are written to the current
269           directory. This centralizes the log location, facilitating cleanup
270           and compression.
271
272       PACKAGER="John Doe <john@example.com>"
273           This value is used when querying a package to see who was the
274           builder. The given format is required for PGP key lookup through
275           WKD. It is recommended to change this to your name and email
276           address.
277
278       COMPRESSGZ="(gzip -c -f -n)", COMPRESSBZ2="(bzip2 -c -f)",
279       COMPRESSXZ="(xz -c -z -)", COMPRESSZST="(zstd -c -z -)",
280       COMPRESSLZO"(lzop -q)", COMPRESSLRZ="(lrzip -q)", COMPRESSLZ4="(lz4
281       -q)", COMPRESSZ="(compress -c -f)", COMPRESSLZ="(lzip -c -f)"
282           Sets the command and options used when compressing compiled or
283           source packages in the named format.
284
285       PKGEXT=".pkg.tar.gz", SRCEXT=".src.tar.gz"
286           Sets the compression used when making compiled or source packages.
287           Valid suffixes are .tar.gz, .tar.bz2, .tar.xz, .tar.zst, .tar.lzo,
288           .tar.lrz, .tar.lz4, .tar.lz and .tar.Z, or simply .tar to disable
289           compression entirely.
290
291       PACMAN_AUTH=()
292           Specify a command prefix for running pacman as root. If unset,
293           makepkg will check for the presence of sudo(8) and su(1) in turn,
294           and try the first one it finds.
295
296           If present, %c will be replaced with the shell-quoted form of the
297           command to run. Otherwise, the command to run is appended to the
298           auth command.
299

SEE ALSO

301       makepkg(8), pacman(8), PKGBUILD(5)
302
303       See the pacman website at https://archlinux.org/pacman/ for current
304       information on pacman and its related tools.
305

BUGS

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

AUTHORS

312       Current maintainers:
313
314       •   Allan McRae <allan@archlinux.org>
315
316       •   Andrew Gregory <andrew.gregory.8@gmail.com>
317
318       •   Eli Schwartz <eschwartz@archlinux.org>
319
320       •   Morgan Adamiec <morganamilo@archlinux.org>
321
322       Past major contributors:
323
324       •   Judd Vinet <jvinet@zeroflux.org>
325
326       •   Aurelien Foret <aurelien@archlinux.org>
327
328       •   Aaron Griffin <aaron@archlinux.org>
329
330       •   Dan McGee <dan@archlinux.org>
331
332       •   Xavier Chantry <shiningxc@gmail.com>
333
334       •   Nagy Gabor <ngaba@bibl.u-szeged.hu>
335
336       •   Dave Reisner <dreisner@archlinux.org>
337
338       For additional contributors, use git shortlog -s on the pacman.git
339       repository.
340
341
342
343Pacman 6.0.2                      2023-05-19                   MAKEPKG.CONF(5)
Impressum