summaryrefslogtreecommitdiff
path: root/doc/makepkg.conf.5.txt
blob: be5b809a0a33e83c23f592f3202de37ef2f65fdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
/////
vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
/////
makepkg.conf(5)
===============

Name
----
makepkg.conf - makepkg configuration file


Synopsis
--------
{sysconfdir}/makepkg.conf, ~/.makepkg.conf


Description
-----------
Configuration options for makekpg are stored in makepkg.conf. This file is
sourced, so you can include any special compiler flags you wish to use. This is
helpful for building for different architectures, or with different
optimizations. However, only the variables described below are exported to the
build environment.

NOTE: This does not guarantee that all package Makefiles will use your exported
variables. Some of them are non-standard.

The system-wide configuration file is found in {sysconfdir}/makepkg.conf.
Individual options can be overridden (or added to) on a per user basis in
~/.makepkg.conf.

The default file is fairly well commented, so it may be easiest to simply
follow directions given there for customization.


Options
-------
**DLAGENTS=(**\'protocol::/path/to/command [options]' ...**)**::
	Sets the download agents used to fetch source files specified with a URL in
	the linkman:PKGBUILD[5] file. Options can be specified for each command as
	well, and any protocol can have a download agent. Several examples are provided
	in the default makepkg.conf.
	+
	If present, `%u` will be replaced with the download URL. Otherwise, the
	download URL will be placed on the end of the command. If present, `%o` will
	be replaced with the local filename, plus a ``.part'' extension, which allows
	makepkg to handle resuming file downloads.

**CARCH=**"carch"::
	Specifies your computer architecture; possible values include such things
	as ``i686'', ``x86_64'', ``ppc'', etc. This should be automatically set on
	installation.

**CHOST=**"chost"::
	A string such as ``i686-pc-linux-gnu'', do not touch unless you know what
	you are doing. This can be commented out by most users if desired.

**CPPFLAGS=**"cppflags"::
	Flags used for the C preprocessor; see CFLAGS for more info.

**CFLAGS=**"cflags"::
	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: ``-march=i686 -O2 -pipe''. Another useful option may
	be `-mcpu` in place of `-march`. Read gcc(1) for more details on the wide
	variety of compiler flags available.

**CXXFLAGS=**"cxxflags"::
	Flags used for the C++ compiler; see CFLAGS for more info.

**LDFLAGS=**"ldflags"::
	Flags used for the linker. Several options may be specified with common
	usage resembling ``-Wl,--hash-style=gnu''. Read ld(1) for more details on
	available linker flags.

**MAKEFLAGS=**"makeflags"::
	This is often used to set the number of jobs used, for example, `-j2`.
	Other flags that make accepts can also be passed.

**DEBUG_CFLAGS=**"debug_cflags"::
	Additional compiler flags appended to CFLAGS for use in debugging. Usually
	this would include: ``-g''. Read gcc(1) for more details on the wide
	variety of compiler flags available.

**DEBUG_CXXFLAGS=**"debug_cxxflags"::
	Debug flags used for the C++ compiler; see DEBUG_CFLAGS for more info.

**BUILDENV=(**fakeroot !distcc color !ccache check !sign**)**::
	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 place an ``!'' at the front of the
	option. If an option is specified multiple times, the final value takes
	precedence. Each option works as follows:

	*fakeroot*;;
		Allow building packages as a non-root user. This is highly recommended.

	*distcc*;;
		Use the distributed C/C++/ObjC compiler to spread compilation among
		multiple machines. If this is enabled, `DISTCC_HOSTS` must be specified
		as well.

	*color*;;
		Colorize output messages, making output easier to read.

	*ccache*;;
		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 `!ccache` in the
		PKGBUILD options array.

	*check*;;
		Run the check() function if present in the PKGBUILD. This can be
		enabled or disabled for individual packages through the use of
		makepkg's '\--check' and '\--nocheck' options respectively.

	*sign*;;
		Generate a PGP signature file using GnuPG. This will execute `gpg
		--detach-sign --use-agent` 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 filename of the package with a ``.sig''
		extension.

**DISTCC_HOSTS=**"host1 ..."::
	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
	`MAKEFLAGS`.

**BUILDDIR=**"/path/to/folder"::
	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 folder.
	Incorrect use of `$startdir` in a PKGBUILD may cause building with
	this option to fail.


**GPGKEY=**""::
	Specify a key to use for gpg signing instead of the default key in the
	keyring. Can be overridden with makepkg's '\--key' option.

**OPTIONS=(**strip docs libtool staticlibs emptydirs zipman purge !upx**)**::
	This array contains options that affect the 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 place an ``!'' at the front of the
	option. If an option is specified multiple times, the final value takes
	precedence. Each option works as follows:

	*strip*;;
		Strip symbols from binaries and libraries. If you frequently use a
		debugger on programs or libraries, it may be helpful to disable this
		option.

	*docs*;;
		Save doc directories. If you wish to delete doc directories, specify
		`!docs` in the array. The directories affected are specified by the
		`DOC_DIRS` variable.

	*libtool*;;
		Leave libtool (.la) files in packages. Specify `!libtool` to remove
		them.

	*staticlibs*;;
		Leave static library (.a) files in packages. Specify `!staticlibs` to
		remove them.

	*emptydirs*;;
		Leave empty directories in packages.

	*zipman*;;
		Compress manual (man and info) pages with gzip. The directories
		affected are specified by the `MAN_DIRS` variable.

	*purge*;;
		Remove files specified by the `PURGE_TARGETS` variable from the
		package.

	*upx*;;
		Compress binary executable files using UPX.  Additional options
		can be passed to UPX by specifying the `UPXFLAGS` variable.

	*debug*;;
		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 `strip'.

**INTEGRITY_CHECK=(**check1 ...**)**::
	File integrity checks to use. Multiple checks may be specified; this
	affects both generation and checking. The current valid options are:
	`md5`, `sha1`, `sha256`, `sha384`, and `sha512`.

**STRIP_BINARIES=**"--strip-all"::
	Options to be used when stripping binaries. See linkman:strip[1]
	for details.

**STRIP_SHARED=**"--strip-unneeded"::
	Options to be used when stripping shared libraries. See linkman:strip[1]
	for details.

**STRIP_STATIC=**"--strip-debug"::
	Options to be used when stripping static libraries. See  linkman:strip[1]
	for details.

**MAN_DIRS=(**{usr{,/local}{,/share},opt/*}/{man,info} ...**)**::
	If `zipman` is specified in the OPTIONS 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. *NOTE:* Do not add the leading
	slash to the directory name.

**DOC_DIRS=(**usr/{,share/}{doc,gtk-doc} ...**)**::
	If `!docs` is specified in the OPTIONS 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. *NOTE:* Do not add the leading slash to the directory name.

**PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**::
	If `purge` is specified in the OPTIONS 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.

**PKGDEST=**"/path/to/folder"::
	If this value is not set, packages will by default be placed in the
	current directory (location of the linkman:PKGBUILD[5]). Many people
	like to keep all their packages in one place so this option allows
	this behavior. A common location is ``/home/packages''.

**SRCDEST=**"/path/to/folder"::
	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.

**SRCPKGDEST=**"/path/to/folder"::
	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.

**LOGDEST=**"/path/to/folder"::
	If this value is not set, log files are written to the current
	directory. This centralizes the log location, facilitating cleanup
	and compression.

**PACKAGER=**"John Doe <john@example.com>"::
	This value is used when querying a package to see who was the builder.
	It is recommended you change this to your name and email address.

**COMPRESSGZ=**"(gzip -c -f -n)"::
**COMPRESSBZ2=**"(bzip2 -c -f)"::
**COMPRESSXZ=**"(xz -c -z -)"::
**COMPRESSLZO**"(lzop -q)"::
**COMPRESSLRZ=**"(lrzip -q)"::
**COMPRESSZ=**"(compress -c -f)"::
	Sets the command and options used when compressing compiled or source
	packages in the named format.

**PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
	Sets the compression used when making compiled or source packages. The
	current valid suffixes are `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`,
	`.tar.lzo`, `.tar.lrz` and `.tar.Z`.
	Do not touch these unless you know what you are doing.

See Also
--------
linkman:makepkg[8], linkman:pacman[8], linkman:PKGBUILD[5]

include::footer.txt[]