2 vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
9 makepkg.conf - makepkg configuration file
14 {sysconfdir}/makepkg.conf, ~/.makepkg.conf
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
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.
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.
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.
46 Specifies your computer architecture; possible values include such things
47 as ``i686'', ``x86_64'', ``ppc'', etc. This should be automatically set on
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 **CPPFLAGS=**"cppflags"::
55 Flags used for the C preprocessor; see CFLAGS for more info.
58 Flags used for the C compiler. This is a key part to the use of makepkg.
59 Usually several options are specified, and the most common string resembles
60 something like this: ``-march=i686 -O2 -pipe''. Another useful option may
61 be `-mcpu` in place of `-march`. Read gcc(1) for more details on the wide
62 variety of compiler flags available.
64 **CXXFLAGS=**"cxxflags"::
65 Flags used for the C++ compiler; see CFLAGS for more info.
67 **LDFLAGS=**"ldflags"::
68 Flags used for the linker. Several options may be specified with common
69 usage resembling ``-Wl,--hash-style=gnu''. Read ld(1) for more details on
70 available linker flags.
72 **MAKEFLAGS=**"makeflags"::
73 This is often used to set the number of jobs used, for example, `-j2`.
74 Other flags that make accepts can also be passed.
76 **BUILDENV=(**fakeroot !distcc color !ccache check !sign**)**::
77 This array contains options that affect the build environment, the defaults
78 are shown here. All options should always be left in the array; to enable
79 or disable an option simply remove or place an ``!'' at the front of the
80 option. Each works as follows:
83 Allow building packages as a non-root user. This is highly recommended.
86 Use the distributed C/C++/ObjC compiler to spread compilation among
87 multiple machines. If this is enabled, `DISTCC_HOSTS` must be specified
91 Colorize output messages, making output easier to read.
94 Use ccache to cache compilation by default. This allows for faster
95 compiles if you are continuously recompiling the same packages. It can
96 be disabled for individual packages by placing `!ccache` in the
97 PKGBUILD options array.
100 Run the check() function if present in the PKGBUILD. This can be
101 enabled or disabled for individual packages through the use of
102 makepkg's '\--check' and '\--nocheck' options respectively.
105 Generate a PGP signature file using GnuPG. This will execute `gpg
106 --detach-sign --use-agent` on the built package to generate a detached
107 signature file, using the GPG agent if it is available. The signature
108 file will be the entire filename of the package with a ``.sig''
111 **DISTCC_HOSTS=**"host1 ..."::
112 If using DistCC, this is used to specify a space-delimited list of hosts
113 running in the DistCC cluster. In addition, you will want to modify your
116 **BUILDDIR=**"/path/to/folder"::
117 If this value is not set, packages will by default be built in
118 subdirectories of the directory that makepkg is called from. This
119 option allows setting the build location to another folder.
120 Incorrect use of `$startdir` in a PKGBUILD may cause building with
125 Specify a key to use for gpg signing instead of the default key in the
126 keyring. Can be overridden with makepkg's '\--key' option.
128 **OPTIONS=(**strip docs libtool emptydirs zipman purge !upx**)**::
129 This array contains options that affect the default packaging. They are
130 equivalent to options that can be placed in the PKGBUILD; the defaults are
131 shown here. All options should always be left in the array; to enable or
132 disable an option simply remove or place an ``!'' at the front of the
133 option. Each works as follows:
136 Strip symbols from binaries and libraries. If you frequently use a
137 debugger on programs or libraries, it may be helpful to disable this
141 Save doc directories. If you wish to delete doc directories, specify
142 `!docs` in the array. The directories affected are specified by the
146 Leave libtool (.la) files in packages. Specify `!libtool` to remove
150 Leave empty directories in packages.
153 Compress manual (man and info) pages with gzip. The directories
154 affected are specified by the `MAN_DIRS` variable.
157 Remove files specified by the `PURGE_TARGETS` variable from the
161 Compress binary executable files using UPX. Additional options
162 can be passed to UPX by specifying the `UPXFLAGS` variable.
164 **INTEGRITY_CHECK=(**check1 ...**)**::
165 File integrity checks to use. Multiple checks may be specified; this
166 affects both generation and checking. The current valid options are:
167 `md5`, `sha1`, `sha256`, `sha384`, and `sha512`.
169 **STRIP_BINARIES=**"--strip-all"::
170 Options to be used when stripping binaries. See linkman:strip[1]
173 **STRIP_SHARED=**"--strip-unneeded"::
174 Options to be used when stripping shared libraries. See linkman:strip[1]
177 **STRIP_STATIC=**"--strip-debug"::
178 Options to be used when stripping static libraries. See linkman:strip[1]
181 **MAN_DIRS=(**{usr{,/local}{,/share},opt/*}/{man,info} ...**)**::
182 If `zipman` is specified in the OPTIONS array, this variable will
183 instruct makepkg where to look to compress manual (man and info)
184 pages. If you build packages that are located in opt/, you may need
185 to add the directory to this array. *NOTE:* Do not add the leading
186 slash to the directory name.
188 **DOC_DIRS=(**usr/{,share/}{doc,gtk-doc} ...**)**::
189 If `!docs` is specified in the OPTIONS array, this variable will
190 instruct makepkg where to look to remove docs. If you build packages
191 that are located in opt/, you may need to add the directory to this
192 array. *NOTE:* Do not add the leading slash to the directory name.
194 **PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
195 If `purge` is specified in the OPTIONS array, this variable will
196 instruct makepkg which files to remove from the package. This is
197 useful for index files that are added by multiple packages.
199 **PKGDEST=**"/path/to/folder"::
200 If this value is not set, packages will by default be placed in the
201 current directory (location of the linkman:PKGBUILD[5]). Many people
202 like to keep all their packages in one place so this option allows
203 this behavior. A common location is ``/home/packages''.
205 **SRCDEST=**"/path/to/folder"::
206 If this value is not set, downloaded source files will only be stored
207 in the current directory. Many people like to keep all source files in
208 a central location for easy cleanup, so this path can be set here.
210 **SRCPKGDEST=**"/path/to/folder"::
211 If this value is not set, source package files will be stored in
212 in the current directory. Many people like to keep all source package files
213 in a central location for easy cleanup, so this path can be set here.
215 **PACKAGER=**"John Doe <john@example.com>"::
216 This value is used when querying a package to see who was the builder.
217 It is recommended you change this to your name and email address.
219 **COMPRESSGZ=**"(gzip -c -f -n)", **COMPRESSBZ2=**"(bzip2 -c -f)", **COMPRESSXZ=**"(xz -c -z -)", **COMPRESSZ=**"(compress -c -f)"::
220 Sets the command and options used when compressing compiled or source
221 packages in the named format.
223 **PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
224 Sets the compression used when making compiled or source packages. The
225 current valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, and
227 Do not touch these unless you know what you are doing.
231 linkman:makepkg[8], linkman:pacman[8], linkman:PKGBUILD[5]
233 include::footer.txt[]