makepkg: quote filenames when extracting
[pacman-ng.git] / doc / makepkg.conf.5.txt
blob704dccc4f855e3a891b5e278c250284b7ba3aa55
1 /////
2 vim:set ts=4 sw=4 syntax=asciidoc noet:
3 /////
4 makepkg.conf(5)
5 ===============
7 Name
8 ----
9 makepkg.conf - makepkg configuration file
12 Synopsis
13 --------
14 {sysconfdir}/makepkg.conf, ~/.makepkg.conf
17 Description
18 -----------
19 Configuration options for makekpg are stored in makepkg.conf. This file is
20 sourced, so you can include any special compiler flags you wish to use. This is
21 helpful for building for different architectures, or with different
22 optimizations. However, only the variables described below are exported to the
23 build environment.
25 NOTE: This does not guarantee that all package Makefiles will use your exported
26 variables. Some of them are non-standard.
28 The default file is fairly well commented, so it may be easiest to simply
29 follow directions given there for customization.
32 Options
33 -------
34 **DLAGENTS=(**\'protocol::/path/to/command [options]' ...**)**::
35         Sets the download agents used to fetch source files specified with a URL in
36         the linkman:PKGBUILD[5] file. Options can be specified for each command as
37         well, and any protocol can have a download agent. Several examples are provided
38         in the default makepkg.conf.
39         +
40         If present, `%u` will be replaced with the download URL. Otherwise, the
41         download URL will be placed on the end of the command. If present, `%o` will
42         be replaced with the local filename, plus a ``.part'' extension, which allows
43         makepkg to handle resuming file downloads.
45 **CARCH=**"carch"::
46         Specifies your computer architecture; possible values include such things
47         as ``i686'', ``x86_64'', ``ppc'', etc. This should be automatically set on
48         installation.
50 **CHOST=**"chost"::
51         A string such as ``i686-pc-linux-gnu'', do not touch unless you know what
52         you are doing. This can be commented out by most users if desired.
54 **CFLAGS=**"cflags"::
55         Flags used for the C compiler. This is a key part to the use of makepkg.
56         Usually several options are specified, and the most common string resembles
57         something like this: ``-march=i686 -O2 -pipe''. Another useful option may
58         be `-mcpu` in place of `-march`. Read gcc(1) for more details on the wide
59         variety of compiler flags available.
61 **CXXFLAGS=**"cxxflags"::
62         Flags used for the C++ compiler; see CFLAGS for more info.
64 **LDFLAGS=**"ldflags"::
65         Flags used for the linker. Several options may be specified with common
66         usage resembling ``-Wl,--hash-style=gnu''. Read ld(1) for more details on
67         available linker flags.
69 **MAKEFLAGS=**"makeflags"::
70         This is often used to set the number of jobs used, for example, `-j2`.
71         Other flags that make accepts can also be passed.
73 **BUILDENV=(**fakeroot !distcc color !ccache**)**::
74         This array contains options that affect the build environment, the defaults
75         are shown here. All options should always be left in the array; to enable
76         or disable an option simply remove or place an ``!'' at the front of the
77         option. Each works as follows:
79         *fakeroot*;;
80                 Allow building packages as a non-root user. This is highly recommended.
82         *distcc*;;
83                 Use the distributed C/C++/ObjC compiler to spread compilation among
84                 multiple machines. If this is enabled, `DISTCC_HOSTS` must be specified
85                 as well.
87         *color*;;
88                 Colorize output messages, making output easier to read.
90         *ccache*;;
91                 Use ccache to cache compilation by default. This allows for faster
92                 compiles if you are continuously recompiling the same packages. It can
93                 be disabled for individual packages by placing `!ccache` in the
94                 PKGBUILD options array.
96 **DISTCC_HOSTS=**"host1 ..."::
97         If using DistCC, this is used to specify a space-delimited list of hosts
98         running in the DistCC cluster. In addition, you will want to modify your
99         `MAKEFLAGS`.
101 **OPTIONS=(**strip !docs libtool emptydirs zipman**)**::
102         This array contains options that affect the default packaging. They are
103         equivalent to options that can be placed in the PKGBUILD; the defaults are
104         shown here. All options should always be left in the array; to enable or
105         disable an option simply remove or place an ``!'' at the front of the
106         option. Each works as follows:
108         *strip*;;
109                 Strip symbols from binaries and libraries. If you frequently use a
110                 debugger on programs or libraries, it may be helpful to disable this
111                 option.
113         *docs*;;
114                 Save doc directories. If you wish to delete doc directories, specify
115                 `!docs` in the array. The directories affected are specified by the
116                 `DOC_DIRS` variable.
118         *libtool*;;
119                 Leave libtool (.la) files in packages. Specify `!libtool` to remove
120                 them.
122         *emptydirs*;;
123                 Leave empty directories in packages.
125         *zipman*;;
126                 Compress manual (man and info) pages with gzip. The directories
127                 affected are specified by the `MAN_DIRS` variable.
129         *purge*;;
130                 Remove files specified by the `PURGE_TARGETS` variable from the
131                 package.
133 **INTEGRITY_CHECK=(**check1 ...**)**::
134         File integrity checks to use. Multiple checks may be specified; this
135         affects both generation and checking. The current valid options are:
136         `md5`, `sha1`, `sha256`, `sha384`, and `sha512`.
138 **MAN_DIRS=(**{usr{,/local}{,/share},opt/*}/{man,info} ...**)**::
139         If `zipman` is specified in the OPTIONS array, this variable will
140         instruct makepkg where to look to compress manual (man and info)
141         pages. If you build packages that are located in opt/, you may need
142         to add the directory to this array. *NOTE:* Do not add the leading
143         slash to the directory name.
145 **DOC_DIRS=(**usr/{,share/}{doc,gtk-doc} ...**)**::
146         If `!docs` is specified in the OPTIONS array, this variable will
147         instruct makepkg where to look to remove docs. If you build packages
148         that are located in opt/, you may need to add the directory to this
149         array. *NOTE:* Do not add the leading slash to the directory name.
151 **STRIP_DIRS=(**bin lib sbin usr/{bin,lib} ...**)**::
152         If `strip` is specified in the OPTIONS array, this variable will
153         instruct makepkg where to look to for files to strip. If you build
154         packages that are located in opt/, you may need to add the directory
155         to this array. *NOTE:* Do not add the leading slash to the directory
156         name.
158 **PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
159         If `purge` is specified in the OPTIONS array, this variable will
160         instruct makepkg which files to remove from the package. This is
161         useful for index files that are added by multiple packages.
163 **PKGDEST=**"/path/to/folder"::
164         If this value is not set, packages will by default be placed in the
165         current directory (location of the linkman:PKGBUILD[5]). Many people
166         like to keep all their packages in one place so this option allows
167         this behavior. A common location is ``/home/packages''.
169 **SRCDEST=**"/path/to/folder"::
170         If this value is not set, downloaded source files will only be stored
171         in the current directory. Many people like to keep all source files in
172         a central location for easy cleanup, so this path can be set here.
174 **PACKAGER=**"John Doe <john@example.com>"::
175         This value is used when querying a package to see who was the builder.
176         It is recommended you change this to your name and email address.
178 *PKGEXT*, *SRCEXT*::
179         Do not touch these unless you know what you are doing.
182 See Also
183 --------
184 linkman:makepkg[8], linkman:pacman[8], linkman:PKGBUILD[5]
186 include::footer.txt[]