Debian Codegraph @

upstream/debian-trixie/man5/makepkg.conf.5

raw
1 '\" t
2 .\" Title: makepkg.conf
3 .\" Author: [see the "Authors" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 2025-01-20
6 .\" Manual: Pacman Manual
7 .\" Source: Pacman 7.0.0
8 .\" Language: English
9 .\"
10 .TH "MAKEPKG\&.CONF" "5" "2025\-01\-20" "Pacman 7\&.0\&.0" "Pacman Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 makepkg.conf \- makepkg configuration file
32 .SH "SYNOPSIS"
33 .sp
34 /etc/makepkg\&.conf, $XDG_CONFIG_HOME/pacman/makepkg\&.conf, ~/\&.makepkg\&.conf
35 .SH "DESCRIPTION"
36 .sp
37 Configuration options for makepkg are stored in makepkg\&.conf\&. This file is sourced so you can include any special compiler flags you wish to use\&. This is helpful when building for different architectures or with different optimizations\&. However, only the variables described below are exported to the build environment\&.
38 .if n \{\
39 .sp
40 .\}
41 .RS 4
42 .it 1 an-trap
43 .nr an-no-space-flag 1
44 .nr an-break-flag 1
45 .br
46 .ps +1
47 \fBNote\fR
48 .ps -1
49 .br
50 .sp
51 This does not guarantee that all package Makefiles will use your exported variables\&. Some of them are non\-standard\&.
52 .sp .5v
53 .RE
54 .sp
55 The system\-wide configuration file is found in /etc/makepkg\&.conf\&. Specific additions (e\&.g\&. build flags for additional languages) can be placed in /etc/makepkg\&.conf\&.d/*\&.conf\&.
56 .sp
57 Individual options can be overridden (or added to) on a per\-user basis in $XDG_CONFIG_HOME/pacman/makepkg\&.conf or ~/\&.makepkg\&.conf, with the former taking priority\&.
58 .sp
59 The default file is fairly well commented, so it may be easiest to simply follow directions given there for customization\&.
60 .SH "OPTIONS"
61 .PP
62 \fBDLAGENTS=(\fR\*(Aqprotocol::/path/to/command [options]\*(Aq \&...\fB)\fR
63 .RS 4
64 Sets the download agents used to fetch source files specified with a URL in the
65 \fBPKGBUILD\fR(5)
66 file\&. Options can be specified for each command as well, and any protocol can have a download agent\&. Any spaces in option arguments are required to be escaped to avoid being split\&. Several examples are provided in the default makepkg\&.conf\&.
67
68 If present,
69 %u
70 will be replaced with the download URL\&. Otherwise, the download URL will be placed on the end of the command\&. If present,
71 %o
72 will be replaced with the local file name, plus a \(lq\&.part\(rq extension, which allows makepkg to handle resuming file downloads\&.
73 .RE
74 .PP
75 \fBVCSCLIENTS=(\fR\*(Aqprotocol::package\*(Aq \&...\fB)\fR
76 .RS 4
77 Sets the packages required to fetch version controlled source files\&. When required, makepkg will check that these packages are installed or are included in the
78 depends
79 or
80 makedepends
81 arrays in the PKGBUILD\&.
82 .RE
83 .PP
84 \fBCARCH=\fR"carch"
85 .RS 4
86 Specifies your computer architecture; possible values include such things as \(lqi686\(rq, \(lqx86_64\(rq, \(lqppc\(rq, etc\&. This should be automatically set on installation\&.
87 .RE
88 .PP
89 \fBCHOST=\fR"chost"
90 .RS 4
91 A string such as \(lqi686\-pc\-linux\-gnu\(rq; do not touch this unless you know what you are doing\&. This can be commented out by most users if desired\&.
92 .RE
93 .PP
94 \fBCPPFLAGS=\fR"cppflags"
95 .RS 4
96 Flags used for the C preprocessor; see CFLAGS for more information\&.
97 .RE
98 .PP
99 \fBCFLAGS=\fR"cflags"
100 .RS 4
101 Flags used for the C compiler\&. This is a key part to the use of makepkg\&. Usually several options are specified, and the most common string resembles something like this: \(lq\-march=i686 \-O2 \-pipe\(rq\&. Another useful option may be
102 \-mcpu
103 in place of
104 \-march\&. Read gcc(1) for more details on the wide variety of compiler flags available\&.
105 .RE
106 .PP
107 \fBCXXFLAGS=\fR"cxxflags"
108 .RS 4
109 Flags used for the C++ compiler; see CFLAGS for more info\&.
110 .RE
111 .PP
112 \fBLDFLAGS=\fR"ldflags"
113 .RS 4
114 Flags used for the linker\&. Several options may be specified with common usage resembling \(lq\-Wl,\-\-hash\-style=gnu\(rq\&. Read ld(1) for more details on available linker flags\&.
115 .RE
116 .PP
117 \fBLTOFLAGS=\fR"ltoflags"
118 .RS 4
119 Additional compiler and linker flags appended to
120 CFLAGS,
121 CXXFLAGS
122 and
123 LDFLAGS
124 when building with link time optimization\&. If empty, \(lq\-flto\(rq is used\&.
125 .RE
126 .PP
127 \fBMAKEFLAGS=\fR"makeflags"
128 .RS 4
129 This is often used to set the number of jobs used; for example,
130 \-j2\&. Other flags that make accepts can also be passed\&.
131 .RE
132 .PP
133 \fBDEBUG_CFLAGS=\fR"debug_cflags"
134 .RS 4
135 Additional compiler flags appended to
136 CFLAGS
137 for use in debugging\&. Usually this would include: \(lq\-g\(rq\&. Read gcc(1) for more details on the wide variety of compiler flags available\&.
138 .RE
139 .PP
140 \fBDEBUG_CXXFLAGS=\fR"debug_cxxflags"
141 .RS 4
142 Debug flags used for the C++ compiler; see DEBUG_CFLAGS for more info\&.
143 .RE
144 .PP
145 \fBBUILDENV=(\fR!distcc !color !ccache check !sign\fB)\fR
146 .RS 4
147 This array contains options that affect the build environment; the defaults are shown here\&. All options should always be left in the array; to enable or disable an option, simply remove or add an \(lq!\(rq at the front of the option\&. If an option is specified multiple times, the final value takes precedence\&. Each option works as follows:
148 .PP
149 \fBdistcc\fR
150 .RS 4
151 Use the distributed C/C++/ObjC compiler to spread compilation among multiple machines\&. If this is enabled,
152 DISTCC_HOSTS
153 must be specified as well\&.
154 .RE
155 .PP
156 \fBcolor\fR
157 .RS 4
158 Colorize output messages, making output easier to read\&.
159 .RE
160 .PP
161 \fBccache\fR
162 .RS 4
163 Use ccache to cache compilation by default\&. This allows for faster compiles if you are continuously recompiling the same packages\&. It can be disabled for individual packages by placing
164 !ccache
165 in the PKGBUILD options array\&.
166 .RE
167 .PP
168 \fBcheck\fR
169 .RS 4
170 Run the check() function if present in the PKGBUILD\&. This can be enabled or disabled for individual packages through the use of makepkg\(cqs
171 \fI\-\-check\fR
172 and
173 \fI\-\-nocheck\fR
174 options, respectively\&.
175 .RE
176 .PP
177 \fBsign\fR
178 .RS 4
179 Generate a PGP signature file using GnuPG\&. This will execute
180 \fIgpg \-\-detach\-sign\fR
181 on the built package to generate a detached signature file, using the GPG agent, if it is available\&. The signature file will be the entire file name of the package with a \(lq\&.sig\(rq extension\&.
182 .RE
183 .RE
184 .PP
185 \fBDISTCC_HOSTS=\fR"host1 \&..."
186 .RS 4
187 If using DistCC, this is used to specify a space\-delimited list of hosts running in the DistCC cluster\&. In addition, you will want to modify your
188 MAKEFLAGS\&.
189 .RE
190 .PP
191 \fBBUILDDIR=\fR"/path/to/directory"
192 .RS 4
193 If this value is not set, packages will, by default, be built in subdirectories of the directory that makepkg is called from\&. This option allows setting the build location to another directory\&. Incorrect use of
194 $startdir
195 in a PKGBUILD may cause building with this option to fail\&.
196 .RE
197 .PP
198 \fBGPGKEY=\fR""
199 .RS 4
200 Specify a key to use for GPG signing instead of the default key in the keyring\&. Can be overridden with makepkg\(cqs
201 \fI\-\-key\fR
202 option\&.
203 .RE
204 .PP
205 \fBOPTIONS=(\fR!strip docs libtool staticlibs emptydirs \&...\fB)\fR
206 .RS 4
207 This array contains options that affect default packaging\&. They are equivalent to options that can be placed in the PKGBUILD; the defaults are shown here\&. All options should always be left in the array; to enable or disable an option, simply remove or add an \(lq!\(rq at the front of the option\&. If an option is specified multiple times, the final value takes precedence\&. Each option works as follows:
208 .PP
209 \fBstrip\fR
210 .RS 4
211 Strip symbols from binaries and libraries\&. If you frequently use a debugger on programs or libraries, it may be helpful to disable this option\&.
212 .RE
213 .PP
214 \fBdocs\fR
215 .RS 4
216 Save doc directories\&. If you wish to delete doc directories, specify
217 !docs
218 in the array\&. The directories affected are specified by the
219 DOC_DIRS
220 variable\&.
221 .RE
222 .PP
223 \fBlibtool\fR
224 .RS 4
225 Leave libtool (\&.la) files in packages\&. Specify
226 !libtool
227 to remove them\&.
228 .RE
229 .PP
230 \fBstaticlibs\fR
231 .RS 4
232 Leave static library (\&.a) files in packages\&. Specify
233 !staticlibs
234 to remove them, if they have a shared counterpart\&.
235 .RE
236 .PP
237 \fBemptydirs\fR
238 .RS 4
239 Leave empty directories in packages\&.
240 .RE
241 .PP
242 \fBzipman\fR
243 .RS 4
244 Compress manual (man and info) pages with gzip\&. The directories affected are specified by the
245 MAN_DIRS
246 variable\&.
247 .RE
248 .PP
249 \fBpurge\fR
250 .RS 4
251 Remove files specified by the
252 PURGE_TARGETS
253 variable from the package\&.
254 .RE
255 .PP
256 \fBdebug\fR
257 .RS 4
258 Add the user\-specified debug flags as specified in DEBUG_CFLAGS and DEBUG_CXXFLAGS to their counterpart buildflags\&. Creates a separate package containing the debug symbols when used with \(oqstrip\(cq\&.
259 .RE
260 .PP
261 \fBlto\fR
262 .RS 4
263 Enable building packages using link time optimization\&. Adds the flags specified in LTOFLAGS to CFLAGS, CXXFLAGS and LDFLAGS (or \(lq\-flto\(rq if LTOFLAGS is empty)\&.
264 .RE
265 .PP
266 \fBautodeps\fR
267 .RS 4
268 Enable the automatic addition of libraries to the depends and provides arrays\&. Search library directories are controlled by the LIB_DIRS variable defined below\&.
269 .RE
270 .RE
271 .PP
272 \fBINTEGRITY_CHECK=(\fRcheck1 \&...\fB)\fR
273 .RS 4
274 File integrity checks to use\&. Multiple checks may be specified; this affects both generation and checking\&. The current valid options are:
275 ck,
276 md5,
277 sha1,
278 sha224,
279 sha256,
280 sha384,
281 sha512, and
282 b2\&.
283 .RE
284 .PP
285 \fBSTRIP_BINARIES=\fR"\-\-strip\-all"
286 .RS 4
287 Options to be used when stripping binaries\&. See
288 \fBstrip\fR(1)
289 for details\&.
290 .RE
291 .PP
292 \fBSTRIP_SHARED=\fR"\-\-strip\-unneeded"
293 .RS 4
294 Options to be used when stripping shared libraries or PIE executables\&. See
295 \fBstrip\fR(1)
296 for details\&.
297 .RE
298 .PP
299 \fBSTRIP_STATIC=\fR"\-\-strip\-debug"
300 .RS 4
301 Options to be used when stripping static libraries\&. See
302 \fBstrip\fR(1)
303 for details\&.
304 .RE
305 .PP
306 \fBMAN_DIRS=(\fR{usr{,/local}{,/share},opt/*}/{man,info} \&...\fB)\fR
307 .RS 4
308 If
309 zipman
310 is specified in the
311 OPTIONS
312 array, this variable will instruct makepkg where to look to compress manual (man and info) pages\&. If you build packages that are located in opt/, you may need to add the directory to this array\&.
313 \fBNOTE:\fR
314 Do not add the leading slash to the directory name\&.
315 .RE
316 .PP
317 \fBDOC_DIRS=(\fRusr/{,share/}{doc,gtk\-doc} \&...\fB)\fR
318 .RS 4
319 If
320 !docs
321 is specified in the
322 OPTIONS
323 array, this variable will instruct makepkg where to look to remove docs\&. If you build packages that are located in opt/, you may need to add the directory to this array\&.
324 \fBNOTE:\fR
325 Do not add the leading slash to the directory name\&.
326 .RE
327 .PP
328 \fBLIB_DIRS=(\fRlib:usr/lib \&...\fB)\fR
329 .RS 4
330 If
331 autodeps
332 is specified in the
333 OPTIONS
334 array, this variable will instruct makepkg where to look to find libraries to add to the
335 provides
336 array\&. The format is "prefix:path", where provides will be added for libraries found in "path" with the specified prefix added\&.
337 .RE
338 .PP
339 \fBPURGE_TARGETS=(\fRusr/{,share}/info/dir \&.podlist *\&.pod\&...\fB)\fR
340 .RS 4
341 If
342 purge
343 is specified in the
344 OPTIONS
345 array, this variable will instruct makepkg which files to remove from the package\&. This is useful for index files that are added by multiple packages\&.
346 .RE
347 .PP
348 \fBDBGSRCDIR=\fR"/usr/src/debug"
349 .RS 4
350 If
351 strip
352 and
353 debug
354 are specified in the
355 OPTIONS
356 array, this variable will instruct makepkg where to place source files for installed binaries\&. The binaries will be modified to link this directory for the debugger search path\&.
357 .RE
358 .PP
359 \fBPKGDEST=\fR"/path/to/directory"
360 .RS 4
361 If this value is not set, packages will, by default, be placed in the current directory (location of the
362 \fBPKGBUILD\fR(5))\&. Many people like to keep all their packages in one place so this option allows for this behavior\&. A common location is \(lq/home/packages\(rq\&.
363 .RE
364 .PP
365 \fBSRCDEST=\fR"/path/to/directory"
366 .RS 4
367 If this value is not set, downloaded source files will only be stored in the current directory\&. Many people like to keep all source files in a central location for easy cleanup, so this path can be set here\&.
368 .RE
369 .PP
370 \fBSRCPKGDEST=\fR"/path/to/directory"
371 .RS 4
372 If this value is not set, source package files will be stored in in the current directory\&. Many people like to keep all source package files in a central location for easy cleanup, so this path can be set here\&.
373 .RE
374 .PP
375 \fBLOGDEST=\fR"/path/to/directory"
376 .RS 4
377 If this value is not set, log files are written to the current directory\&. This centralizes the log location, facilitating cleanup and compression\&.
378 .RE
379 .PP
380 \fBPACKAGER=\fR"John Doe <john@example\&.com>"
381 .RS 4
382 This value is used when querying a package to see who was the builder\&. The given format is required for PGP key lookup through WKD\&. It is recommended to change this to your name and email address\&.
383 .RE
384 .PP
385 \fBCOMPRESSGZ=\fR"(gzip \-c \-f \-n)", \fBCOMPRESSBZ2=\fR"(bzip2 \-c \-f)", \fBCOMPRESSXZ=\fR"(xz \-c \-z \-)", \fBCOMPRESSZST=\fR"(zstd \-c \-z \-)", \fBCOMPRESSLZO\fR"(lzop \-q)", \fBCOMPRESSLRZ=\fR"(lrzip \-q)", \fBCOMPRESSLZ4=\fR"(lz4 \-q)", \fBCOMPRESSZ=\fR"(compress \-c \-f)", \fBCOMPRESSLZ=\fR"(lzip \-c \-f)"
386 .RS 4
387 Sets the command and options used when compressing compiled or source packages in the named format\&.
388 .RE
389 .PP
390 \fBPKGEXT=\fR"\&.pkg\&.tar\&.gz", \fBSRCEXT=\fR"\&.src\&.tar\&.gz"
391 .RS 4
392 Sets the compression used when making compiled or source packages\&. Valid suffixes are
393 \&.pkg
394 or
395 \&.src
396 (for PKGEXT and SRCEXT respectively) followed by one of
397 \&.tar\&.gz,
398 \&.tar\&.bz2,
399 \&.tar\&.xz,
400 \&.tar\&.zst,
401 \&.tar\&.lzo,
402 \&.tar\&.lrz,
403 \&.tar\&.lz4,
404 \&.tar\&.lz
405 and
406 \&.tar\&.Z, or simply
407 \&.tar
408 to disable compression entirely\&.
409 .RE
410 .PP
411 \fBPACMAN_AUTH=()\fR
412 .RS 4
413 Specify a command prefix for running pacman as root\&. If unset, makepkg will check for the presence of sudo(8) and su(1) in turn, and try the first one it finds\&.
414
415 If present,
416 %c
417 will be replaced with the shell\-quoted form of the command to run\&. Otherwise, the command to run is appended to the auth command\&.
418 .RE
419 .SH "SEE ALSO"
420 .sp
421 \fBmakepkg\fR(8), \fBpacman\fR(8), \fBPKGBUILD\fR(5)
422 .sp
423 See the pacman website at https://archlinux\&.org/pacman/ for current information on pacman and its related tools\&.
424 .SH "BUGS"
425 .sp
426 Bugs? You must be kidding; there are no bugs in this software\&. But if we happen to be wrong, please report them to the issue tracker at https://gitlab\&.archlinux\&.org/pacman/pacman/\-/issues with specific information such as your command\-line, the nature of the bug, and even the package database if it helps\&.
427 .SH "AUTHORS"
428 .sp
429 Current maintainers:
430 .sp
431 .RS 4
432 .ie n \{\
433 \h'-04'\(bu\h'+03'\c
434 .\}
435 .el \{\
436 .sp -1
437 .IP \(bu 2.3
438 .\}
439 Allan McRae <allan@archlinux\&.org>
440 .RE
441 .sp
442 .RS 4
443 .ie n \{\
444 \h'-04'\(bu\h'+03'\c
445 .\}
446 .el \{\
447 .sp -1
448 .IP \(bu 2.3
449 .\}
450 Andrew Gregory <andrew\&.gregory\&.8@gmail\&.com>
451 .RE
452 .sp
453 .RS 4
454 .ie n \{\
455 \h'-04'\(bu\h'+03'\c
456 .\}
457 .el \{\
458 .sp -1
459 .IP \(bu 2.3
460 .\}
461 Morgan Adamiec <morganamilo@archlinux\&.org>
462 .RE
463 .sp
464 Past major contributors:
465 .sp
466 .RS 4
467 .ie n \{\
468 \h'-04'\(bu\h'+03'\c
469 .\}
470 .el \{\
471 .sp -1
472 .IP \(bu 2.3
473 .\}
474 Judd Vinet <jvinet@zeroflux\&.org>
475 .RE
476 .sp
477 .RS 4
478 .ie n \{\
479 \h'-04'\(bu\h'+03'\c
480 .\}
481 .el \{\
482 .sp -1
483 .IP \(bu 2.3
484 .\}
485 Aurelien Foret <aurelien@archlinux\&.org>
486 .RE
487 .sp
488 .RS 4
489 .ie n \{\
490 \h'-04'\(bu\h'+03'\c
491 .\}
492 .el \{\
493 .sp -1
494 .IP \(bu 2.3
495 .\}
496 Aaron Griffin <aaron@archlinux\&.org>
497 .RE
498 .sp
499 .RS 4
500 .ie n \{\
501 \h'-04'\(bu\h'+03'\c
502 .\}
503 .el \{\
504 .sp -1
505 .IP \(bu 2.3
506 .\}
507 Dan McGee <dan@archlinux\&.org>
508 .RE
509 .sp
510 .RS 4
511 .ie n \{\
512 \h'-04'\(bu\h'+03'\c
513 .\}
514 .el \{\
515 .sp -1
516 .IP \(bu 2.3
517 .\}
518 Xavier Chantry <shiningxc@gmail\&.com>
519 .RE
520 .sp
521 .RS 4
522 .ie n \{\
523 \h'-04'\(bu\h'+03'\c
524 .\}
525 .el \{\
526 .sp -1
527 .IP \(bu 2.3
528 .\}
529 Nagy Gabor <ngaba@bibl\&.u\-szeged\&.hu>
530 .RE
531 .sp
532 .RS 4
533 .ie n \{\
534 \h'-04'\(bu\h'+03'\c
535 .\}
536 .el \{\
537 .sp -1
538 .IP \(bu 2.3
539 .\}
540 Dave Reisner <dreisner@archlinux\&.org>
541 .RE
542 .sp
543 .RS 4
544 .ie n \{\
545 \h'-04'\(bu\h'+03'\c
546 .\}
547 .el \{\
548 .sp -1
549 .IP \(bu 2.3
550 .\}
551 Eli Schwartz <eschwartz@archlinux\&.org>
552 .RE
553 .sp
554 For additional contributors, use git shortlog \-s on the pacman\&.git repository\&.