Debian Codegraph @

upstream/debian-unstable/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: 11-11-1111
6 .\" Manual: Pacman Manual
7 .\" Source: Pacman 7.1.0
8 .\" Language: English
9 .\"
10 .TH "MAKEPKG\&.CONF" "5" "11\-11\-1111" "Pacman 7\&.1\&.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 \fBNPROC=\fR""
95 .RS 4
96 Sets the number of processors to use for parallel jobs in makepkg\&. Note: this does not affect parallelization of tasks during ``build()`` and related functions\&.
97 .RE
98 .PP
99 \fBCPPFLAGS=\fR"cppflags"
100 .RS 4
101 Flags used for the C preprocessor; see CFLAGS for more information\&.
102 .RE
103 .PP
104 \fBCFLAGS=\fR"cflags"
105 .RS 4
106 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
107 \-mcpu
108 in place of
109 \-march\&. Read gcc(1) for more details on the wide variety of compiler flags available\&.
110 .RE
111 .PP
112 \fBCXXFLAGS=\fR"cxxflags"
113 .RS 4
114 Flags used for the C++ compiler; see CFLAGS for more info\&.
115 .RE
116 .PP
117 \fBLDFLAGS=\fR"ldflags"
118 .RS 4
119 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\&.
120 .RE
121 .PP
122 \fBLTOFLAGS=\fR"ltoflags"
123 .RS 4
124 Additional compiler and linker flags appended to
125 CFLAGS,
126 CXXFLAGS
127 and
128 LDFLAGS
129 when building with link time optimization\&. If empty, \(lq\-flto\(rq is used\&.
130 .RE
131 .PP
132 \fBMAKEFLAGS=\fR"makeflags"
133 .RS 4
134 This is often used to set the number of jobs used; for example,
135 \-j2\&. Other flags that make accepts can also be passed\&.
136 .RE
137 .PP
138 \fBDEBUG_CFLAGS=\fR"debug_cflags"
139 .RS 4
140 Additional compiler flags appended to
141 CFLAGS
142 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\&.
143 .RE
144 .PP
145 \fBDEBUG_CXXFLAGS=\fR"debug_cxxflags"
146 .RS 4
147 Debug flags used for the C++ compiler; see DEBUG_CFLAGS for more info\&.
148 .RE
149 .PP
150 \fBBUILDENV=(\fR!distcc !color !ccache check !sign\fB)\fR
151 .RS 4
152 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:
153 .PP
154 \fBdistcc\fR
155 .RS 4
156 Use the distributed C/C++/ObjC compiler to spread compilation among multiple machines\&. If this is enabled,
157 DISTCC_HOSTS
158 must be specified as well\&.
159 .RE
160 .PP
161 \fBcolor\fR
162 .RS 4
163 Colorize output messages, making output easier to read\&.
164 .RE
165 .PP
166 \fBccache\fR
167 .RS 4
168 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
169 !ccache
170 in the PKGBUILD options array\&.
171 .RE
172 .PP
173 \fBcheck\fR
174 .RS 4
175 Run the check() function if present in the PKGBUILD\&. This can be enabled or disabled for individual packages through the use of makepkg\(cqs
176 \fI\-\-check\fR
177 and
178 \fI\-\-nocheck\fR
179 options, respectively\&.
180 .RE
181 .PP
182 \fBsign\fR
183 .RS 4
184 Generate a PGP signature file using GnuPG\&. This will execute
185 \fIgpg \-\-detach\-sign\fR
186 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\&.
187 .RE
188 .RE
189 .PP
190 \fBDISTCC_HOSTS=\fR"host1 \&..."
191 .RS 4
192 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
193 MAKEFLAGS\&.
194 .RE
195 .PP
196 \fBBUILDDIR=\fR"/path/to/directory"
197 .RS 4
198 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
199 $startdir
200 in a PKGBUILD may cause building with this option to fail\&.
201 .RE
202 .PP
203 \fBGPGKEY=\fR""
204 .RS 4
205 Specify a key to use for GPG signing instead of the default key in the keyring\&. Can be overridden with makepkg\(cqs
206 \fI\-\-key\fR
207 option\&.
208 .RE
209 .PP
210 \fBOPTIONS=(\fR!strip docs libtool staticlibs emptydirs \&...\fB)\fR
211 .RS 4
212 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:
213 .PP
214 \fBstrip\fR
215 .RS 4
216 Strip symbols from binaries and libraries\&. If you frequently use a debugger on programs or libraries, it may be helpful to disable this option\&.
217 .RE
218 .PP
219 \fBdocs\fR
220 .RS 4
221 Save doc directories\&. If you wish to delete doc directories, specify
222 !docs
223 in the array\&. The directories affected are specified by the
224 DOC_DIRS
225 variable\&.
226 .RE
227 .PP
228 \fBlibtool\fR
229 .RS 4
230 Leave libtool (\&.la) files in packages\&. Specify
231 !libtool
232 to remove them\&.
233 .RE
234 .PP
235 \fBstaticlibs\fR
236 .RS 4
237 Leave static library (\&.a) files in packages\&. Specify
238 !staticlibs
239 to remove them, if they have a shared counterpart\&.
240 .RE
241 .PP
242 \fBemptydirs\fR
243 .RS 4
244 Leave empty directories in packages\&.
245 .RE
246 .PP
247 \fBzipman\fR
248 .RS 4
249 Compress manual (man and info) pages with gzip\&. The directories affected are specified by the
250 MAN_DIRS
251 variable\&.
252 .RE
253 .PP
254 \fBpurge\fR
255 .RS 4
256 Remove files specified by the
257 PURGE_TARGETS
258 variable from the package\&.
259 .RE
260 .PP
261 \fBdebug\fR
262 .RS 4
263 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\&.
264 .RE
265 .PP
266 \fBlto\fR
267 .RS 4
268 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)\&.
269 .RE
270 .PP
271 \fBautodeps\fR
272 .RS 4
273 Enable the automatic addition of libraries to the depends and provides arrays\&. Search library directories are controlled by the LIB_DIRS variable defined below\&.
274 .RE
275 .RE
276 .PP
277 \fBINTEGRITY_CHECK=(\fRcheck1 \&...\fB)\fR
278 .RS 4
279 File integrity checks to use\&. Multiple checks may be specified; this affects both generation and checking\&. The current valid options are:
280 ck,
281 md5,
282 sha1,
283 sha224,
284 sha256,
285 sha384,
286 sha512, and
287 b2\&.
288 .RE
289 .PP
290 \fBSTRIP_BINARIES=\fR"\-\-strip\-all"
291 .RS 4
292 Options to be used when stripping binaries\&. See
293 \fBstrip\fR(1)
294 for details\&.
295 .RE
296 .PP
297 \fBSTRIP_SHARED=\fR"\-\-strip\-unneeded"
298 .RS 4
299 Options to be used when stripping shared libraries or PIE executables\&. See
300 \fBstrip\fR(1)
301 for details\&.
302 .RE
303 .PP
304 \fBSTRIP_STATIC=\fR"\-\-strip\-debug"
305 .RS 4
306 Options to be used when stripping static libraries\&. See
307 \fBstrip\fR(1)
308 for details\&.
309 .RE
310 .PP
311 \fBMAN_DIRS=(\fRusr{,/local}{,/share}/{man,info} \&...\fB)\fR
312 .RS 4
313 If
314 zipman
315 is specified in the
316 OPTIONS
317 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\&.
318 \fBNOTE:\fR
319 Do not add the leading slash to the directory name\&.
320 .RE
321 .PP
322 \fBDOC_DIRS=(\fRusr/{,share/}{doc,gtk\-doc} \&...\fB)\fR
323 .RS 4
324 If
325 !docs
326 is specified in the
327 OPTIONS
328 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\&.
329 \fBNOTE:\fR
330 Do not add the leading slash to the directory name\&.
331 .RE
332 .PP
333 \fBLIB_DIRS=(\fRlib:usr/lib \&...\fB)\fR
334 .RS 4
335 If
336 autodeps
337 is specified in the
338 OPTIONS
339 array, this variable will instruct makepkg where to look to find libraries to add to the
340 provides
341 array\&. The format is "prefix:path", where provides will be added for libraries found in "path" with the specified prefix added\&.
342 .RE
343 .PP
344 \fBPURGE_TARGETS=(\fRusr/{,share}/info/dir \&.podlist *\&.pod\&...\fB)\fR
345 .RS 4
346 If
347 purge
348 is specified in the
349 OPTIONS
350 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\&.
351 .RE
352 .PP
353 \fBDBGSRCDIR=\fR"/usr/src/debug"
354 .RS 4
355 If
356 strip
357 and
358 debug
359 are specified in the
360 OPTIONS
361 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\&.
362 .RE
363 .PP
364 \fBPKGDEST=\fR"/path/to/directory"
365 .RS 4
366 If this value is not set, packages will, by default, be placed in the current directory (location of the
367 \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\&.
368 .RE
369 .PP
370 \fBSRCDEST=\fR"/path/to/directory"
371 .RS 4
372 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\&.
373 .RE
374 .PP
375 \fBSRCPKGDEST=\fR"/path/to/directory"
376 .RS 4
377 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\&.
378 .RE
379 .PP
380 \fBLOGDEST=\fR"/path/to/directory"
381 .RS 4
382 If this value is not set, log files are written to the current directory\&. This centralizes the log location, facilitating cleanup and compression\&.
383 .RE
384 .PP
385 \fBPACKAGER=\fR"John Doe <john@example\&.com>"
386 .RS 4
387 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\&.
388 .RE
389 .PP
390 \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)"
391 .RS 4
392 Sets the command and options used when compressing compiled or source packages in the named format\&.
393 .RE
394 .PP
395 \fBPKGEXT=\fR"\&.pkg\&.tar\&.gz", \fBSRCEXT=\fR"\&.src\&.tar\&.gz"
396 .RS 4
397 Sets the compression used when making compiled or source packages\&. Valid suffixes are
398 \&.pkg
399 or
400 \&.src
401 (for PKGEXT and SRCEXT respectively) followed by one of
402 \&.tar\&.gz,
403 \&.tar\&.bz2,
404 \&.tar\&.xz,
405 \&.tar\&.zst,
406 \&.tar\&.lzo,
407 \&.tar\&.lrz,
408 \&.tar\&.lz4,
409 \&.tar\&.lz
410 and
411 \&.tar\&.Z, or simply
412 \&.tar
413 to disable compression entirely\&.
414 .RE
415 .PP
416 \fBPACMAN_AUTH=()\fR
417 .RS 4
418 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\&.
419
420 If present,
421 %c
422 will be replaced with the shell\-quoted form of the command to run\&. Otherwise, the command to run is appended to the auth command\&.
423 .RE
424 .SH "SEE ALSO"
425 .sp
426 \fBmakepkg\fR(8), \fBpacman\fR(8), \fBPKGBUILD\fR(5)
427 .sp
428 See the pacman website at https://archlinux\&.org/pacman/ for current information on pacman and its related tools\&.
429 .SH "BUGS"
430 .sp
431 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\&.
432 .SH "AUTHORS"
433 .sp
434 Current maintainers:
435 .sp
436 .RS 4
437 .ie n \{\
438 \h'-04'\(bu\h'+03'\c
439 .\}
440 .el \{\
441 .sp -1
442 .IP \(bu 2.3
443 .\}
444 Allan McRae <allan@archlinux\&.org>
445 .RE
446 .sp
447 .RS 4
448 .ie n \{\
449 \h'-04'\(bu\h'+03'\c
450 .\}
451 .el \{\
452 .sp -1
453 .IP \(bu 2.3
454 .\}
455 Andrew Gregory <andrew\&.gregory\&.8@gmail\&.com>
456 .RE
457 .sp
458 .RS 4
459 .ie n \{\
460 \h'-04'\(bu\h'+03'\c
461 .\}
462 .el \{\
463 .sp -1
464 .IP \(bu 2.3
465 .\}
466 Morgan Adamiec <morganamilo@archlinux\&.org>
467 .RE
468 .sp
469 Past major contributors:
470 .sp
471 .RS 4
472 .ie n \{\
473 \h'-04'\(bu\h'+03'\c
474 .\}
475 .el \{\
476 .sp -1
477 .IP \(bu 2.3
478 .\}
479 Judd Vinet <jvinet@zeroflux\&.org>
480 .RE
481 .sp
482 .RS 4
483 .ie n \{\
484 \h'-04'\(bu\h'+03'\c
485 .\}
486 .el \{\
487 .sp -1
488 .IP \(bu 2.3
489 .\}
490 Aurelien Foret <aurelien@archlinux\&.org>
491 .RE
492 .sp
493 .RS 4
494 .ie n \{\
495 \h'-04'\(bu\h'+03'\c
496 .\}
497 .el \{\
498 .sp -1
499 .IP \(bu 2.3
500 .\}
501 Aaron Griffin <aaron@archlinux\&.org>
502 .RE
503 .sp
504 .RS 4
505 .ie n \{\
506 \h'-04'\(bu\h'+03'\c
507 .\}
508 .el \{\
509 .sp -1
510 .IP \(bu 2.3
511 .\}
512 Dan McGee <dan@archlinux\&.org>
513 .RE
514 .sp
515 .RS 4
516 .ie n \{\
517 \h'-04'\(bu\h'+03'\c
518 .\}
519 .el \{\
520 .sp -1
521 .IP \(bu 2.3
522 .\}
523 Xavier Chantry <shiningxc@gmail\&.com>
524 .RE
525 .sp
526 .RS 4
527 .ie n \{\
528 \h'-04'\(bu\h'+03'\c
529 .\}
530 .el \{\
531 .sp -1
532 .IP \(bu 2.3
533 .\}
534 Nagy Gabor <ngaba@bibl\&.u\-szeged\&.hu>
535 .RE
536 .sp
537 .RS 4
538 .ie n \{\
539 \h'-04'\(bu\h'+03'\c
540 .\}
541 .el \{\
542 .sp -1
543 .IP \(bu 2.3
544 .\}
545 Dave Reisner <dreisner@archlinux\&.org>
546 .RE
547 .sp
548 .RS 4
549 .ie n \{\
550 \h'-04'\(bu\h'+03'\c
551 .\}
552 .el \{\
553 .sp -1
554 .IP \(bu 2.3
555 .\}
556 Eli Schwartz <eschwartz@archlinux\&.org>
557 .RE
558 .sp
559 For additional contributors, use git shortlog \-s on the pacman\&.git repository\&.