1MAKEPKG.CONF(5) Pacman Manual MAKEPKG.CONF(5)
2
3
4
6 makepkg.conf - makepkg configuration file
7
9 /etc/makepkg.conf, $XDG_CONFIG_HOME/pacman/makepkg.conf,
10 ~/.makepkg.conf
11
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
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 LDFLAGS="ldflags"
76 Flags used for the linker. Several options may be specified with
77 common usage resembling “-Wl,--hash-style=gnu”. Read ld(1) for more
78 details on available linker flags.
79
80 MAKEFLAGS="makeflags"
81 This is often used to set the number of jobs used; for example,
82 -j2. Other flags that make accepts can also be passed.
83
84 DEBUG_CFLAGS="debug_cflags"
85 Additional compiler flags appended to CFLAGS for use in debugging.
86 Usually this would include: “-g”. Read gcc(1) for more details on
87 the wide variety of compiler flags available.
88
89 DEBUG_CXXFLAGS="debug_cxxflags"
90 Debug flags used for the C++ compiler; see DEBUG_CFLAGS for more
91 info.
92
93 BUILDENV=(!distcc color !ccache check !sign)
94 This array contains options that affect the build environment; the
95 defaults are shown here. All options should always be left in the
96 array; to enable or disable an option, simply remove or add an “!”
97 at the front of the option. If an option is specified multiple
98 times, the final value takes precedence. Each option works as
99 follows:
100
101 distcc
102 Use the distributed C/C++/ObjC compiler to spread compilation
103 among multiple machines. If this is enabled, DISTCC_HOSTS must
104 be specified as well.
105
106 color
107 Colorize output messages, making output easier to read.
108
109 ccache
110 Use ccache to cache compilation by default. This allows for
111 faster compiles if you are continuously recompiling the same
112 packages. It can be disabled for individual packages by placing
113 !ccache in the PKGBUILD options array.
114
115 check
116 Run the check() function if present in the PKGBUILD. This can
117 be enabled or disabled for individual packages through the use
118 of makepkg’s --check and --nocheck options, respectively.
119
120 sign
121 Generate a PGP signature file using GnuPG. This will execute
122 gpg --detach-sign --use-agent on the built package to generate
123 a detached signature file, using the GPG agent, if it is
124 available. The signature file will be the entire file name of
125 the package with a “.sig” extension.
126
127 DISTCC_HOSTS="host1 ..."
128 If using DistCC, this is used to specify a space-delimited list of
129 hosts running in the DistCC cluster. In addition, you will want to
130 modify your MAKEFLAGS.
131
132 BUILDDIR="/path/to/directory"
133 If this value is not set, packages will, by default, be built in
134 subdirectories of the directory that makepkg is called from. This
135 option allows setting the build location to another directory.
136 Incorrect use of $startdir in a PKGBUILD may cause building with
137 this option to fail.
138
139 GPGKEY=""
140 Specify a key to use for GPG signing instead of the default key in
141 the keyring. Can be overridden with makepkg’s --key option.
142
143 OPTIONS=(strip docs libtool staticlibs emptydirs zipman purge !upx
144 !optipng)
145 This array contains options that affect default packaging. They are
146 equivalent to options that can be placed in the PKGBUILD; the
147 defaults are shown here. All options should always be left in the
148 array; to enable or disable an option, simply remove or add an “!”
149 at the front of the option. If an option is specified multiple
150 times, the final value takes precedence. Each option works as
151 follows:
152
153 strip
154 Strip symbols from binaries and libraries. If you frequently
155 use a debugger on programs or libraries, it may be helpful to
156 disable this option.
157
158 docs
159 Save doc directories. If you wish to delete doc directories,
160 specify !docs in the array. The directories affected are
161 specified by the DOC_DIRS variable.
162
163 libtool
164 Leave libtool (.la) files in packages. Specify !libtool to
165 remove them.
166
167 staticlibs
168 Leave static library (.a) files in packages. Specify
169 !staticlibs to remove them, if they have a shared counterpart.
170
171 emptydirs
172 Leave empty directories in packages.
173
174 zipman
175 Compress manual (man and info) pages with gzip. The directories
176 affected are specified by the MAN_DIRS variable.
177
178 purge
179 Remove files specified by the PURGE_TARGETS variable from the
180 package.
181
182 upx
183 Compress binary executable files using UPX. Additional options
184 can be passed to UPX by specifying the UPXFLAGS array variable.
185
186 optipng
187 Optimize PNG images with optipng. Additional options can be
188 passed to optipng by specifying the OPTIPNGFLAGS array
189 variable.
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, sha256, sha384, and sha512.
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. See strip(1)
208 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 PKGDEST="/path/to/directory"
234 If this value is not set, packages will, by default, be placed in
235 the current directory (location of the PKGBUILD(5)). Many people
236 like to keep all their packages in one place so this option allows
237 for this behavior. A common location is “/home/packages”.
238
239 SRCDEST="/path/to/directory"
240 If this value is not set, downloaded source files will only be
241 stored in the current directory. Many people like to keep all
242 source files in a central location for easy cleanup, so this path
243 can be set here.
244
245 SRCPKGDEST="/path/to/directory"
246 If this value is not set, source package files will be stored in in
247 the current directory. Many people like to keep all source package
248 files in a central location for easy cleanup, so this path can be
249 set here.
250
251 LOGDEST="/path/to/directory"
252 If this value is not set, log files are written to the current
253 directory. This centralizes the log location, facilitating cleanup
254 and compression.
255
256 PACKAGER="John Doe <john@example.com>"
257 This value is used when querying a package to see who was the
258 builder. It is recommended to change this to your name and email
259 address.
260
261 COMPRESSGZ="(gzip -c -f -n)", COMPRESSBZ2="(bzip2 -c -f)",
262 COMPRESSXZ="(xz -c -z -)", COMPRESSLZO"(lzop -q)", COMPRESSLRZ="(lrzip
263 -q)", COMPRESSZ="(compress -c -f)"
264 Sets the command and options used when compressing compiled or
265 source packages in the named format.
266
267 PKGEXT=".pkg.tar.gz", SRCEXT=".src.tar.gz"
268 Sets the compression used when making compiled or source packages.
269 Valid suffixes are .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.lzo,
270 .tar.lrz, and .tar.Z. Do not touch these unless you know what you
271 are doing.
272
274 makepkg(8), pacman(8), PKGBUILD(5)
275
276 See the pacman website at https://www.archlinux.org/pacman/ for current
277 information on pacman and its related tools.
278
280 Bugs? You must be kidding; there are no bugs in this software. But if
281 we happen to be wrong, send us an email with as much detail as possible
282 to pacman-dev@archlinux.org.
283
285 Current maintainers:
286
287 · Allan McRae <allan@archlinux.org>
288
289 · Andrew Gregory <andrew.gregory.8@gmail.com>
290
291 · Dan McGee <dan@archlinux.org>
292
293 · Dave Reisner <dreisner@archlinux.org>
294
295 Past major contributors:
296
297 · Judd Vinet <jvinet@zeroflux.org>
298
299 · Aurelien Foret <aurelien@archlinux.org>
300
301 · Aaron Griffin <aaron@archlinux.org>
302
303 · Xavier Chantry <shiningxc@gmail.com>
304
305 · Nagy Gabor <ngaba@bibl.u-szeged.hu>
306
307 For additional contributors, use git shortlog -s on the pacman.git
308 repository.
309
310
311
312Pacman 5.0.2 2019-02-02 MAKEPKG.CONF(5)