]>
Commit | Line | Data |
---|---|---|
e412ac19 | 1 | ///// |
cd8747ba | 2 | vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us: |
e412ac19 | 3 | ///// |
be0a472c AF |
4 | makepkg(8) |
5 | ========== | |
6 | ||
7 | Name | |
8 | ---- | |
9 | makepkg - package build utility | |
10 | ||
11 | ||
12 | Synopsis | |
13 | -------- | |
c3ae2092 | 14 | 'makepkg' [options] |
be0a472c AF |
15 | |
16 | ||
17 | Description | |
18 | ----------- | |
c3ae2092 | 19 | 'makepkg' is a script to automate the building of packages. The requirements for |
889fccd5 DM |
20 | using the script are a build-capable \*nix platform and a custom build script |
21 | for each package you wish to build (known as a PKGBUILD). See | |
b3c6bdda | 22 | linkman:PKGBUILD[5] for details on creating your own build scripts. |
be0a472c AF |
23 | |
24 | The advantage to a script-based build is that the work is only done once. Once | |
c3ae2092 | 25 | you have the build script for a package, 'makepkg' will do the rest: download and |
be0a472c AF |
26 | validate source files, check dependencies, configure the build-time settings, |
27 | build the package, install the package into a temporary root, make | |
c9189f54 DM |
28 | customizations, generate meta-info, and package the whole thing up for pacman |
29 | to use. | |
be0a472c | 30 | |
c3ae2092 | 31 | NOTE: 'makepkg' uses your current locale by default and does not unset it when |
a7a9f375 DM |
32 | building packages. If you wish to share your build output with others when |
33 | seeking help or for other purposes, you may wish to run "`LC_ALL=C makepkg`" so | |
34 | your logs and output are not localized. | |
35 | ||
be0a472c AF |
36 | Options |
37 | ------- | |
e93b0a2f DM |
38 | *\--asroot*:: |
39 | Allow makepkg to run as root. This is for security purposes as it is | |
40 | normally dangerous to do so. This will also disable use of fakeroot and | |
41 | sudo. | |
42 | ||
c9189f54 DM |
43 | *-A, \--ignorearch*:: |
44 | Ignore a missing or incomplete arch field in the build script. This is | |
45 | for rebuilding packages from source when the PKGBUILD may be slightly | |
e37ecbe8 | 46 | outdated and not updated with an `arch=('yourarch')` field. |
c9189f54 | 47 | |
c9189f54 | 48 | *-c, \--clean*:: |
be0a472c AF |
49 | Clean up leftover work files and directories after a successful build. |
50 | ||
7d899910 | 51 | *\--config* <file>:: |
aad57cc0 | 52 | Use an alternate config file instead of the +{sysconfdir}/makepkg.conf+ |
5eca2fbd | 53 | default. |
4b183bf9 | 54 | |
c9189f54 | 55 | *-d, \--nodeps*:: |
be0a472c AF |
56 | Do not perform any dependency checks. This will let you override and |
57 | ignore any dependencies required. There is a good chance this option | |
58 | will break the build process if all of the dependencies are not | |
59 | installed. | |
60 | ||
c9189f54 | 61 | *-e, \--noextract*:: |
be0a472c | 62 | Do not extract source files; use whatever source already exists in the |
aea45a8b | 63 | src/ directory. This is handy if you want to go into src/ and manually |
be0a472c AF |
64 | patch or tweak code, then make a package out of the result. Keep in mind |
65 | that creating a patch may be a better solution to allow others to use | |
66 | your PKGBUILD. | |
67 | ||
c9189f54 | 68 | *-f, \--force*:: |
be0a472c | 69 | makepkg will not build a package if a built package already exists in |
c2603924 | 70 | the `PKGDEST` (set in linkman:makepkg.conf[5]) directory, which may |
be0a472c AF |
71 | default to the current directory. This allows the built package to be |
72 | overwritten. | |
73 | ||
11692e0e | 74 | *--forcever*:: |
e93b0a2f DM |
75 | This is a hidden option that should *not* be used unless you really know |
76 | what you are doing. makepkg uses this internally when calling itself to | |
77 | set the new development pkgver of the package. | |
78 | ||
c9189f54 | 79 | *-g, \--geninteg*:: |
be0a472c | 80 | For each source file in the source array of PKGBUILD, download the file |
79987c92 XC |
81 | if required and generate integrity checks. The integrity checks generated |
82 | are determined by the checks present in the PKGBUILD, falling back to the | |
83 | value of the INTEGRITY_CHECK array in makepkg.conf(5) if these are absent | |
84 | This output can be redirected into your PKGBUILD for source validation | |
85 | using "`makepkg -g >> PKGBUILD`". | |
be0a472c | 86 | |
82522dd8 | 87 | *--skipinteg*:: |
2b3405e0 AM |
88 | Do not perform any integrity checks (checksum and PGP) on source files. |
89 | ||
90 | *\--skipchecksums*:: | |
91 | Do not verify checksums of source files. | |
82522dd8 | 92 | |
94f61c5b | 93 | *\--skippgpcheck*:: |
2b3405e0 | 94 | Do not verify PGP signatures of source files. |
94f61c5b | 95 | |
c9189f54 | 96 | *-h, \--help*:: |
be0a472c AF |
97 | Output syntax and command line options. |
98 | ||
e93b0a2f DM |
99 | *\--holdver*:: |
100 | Useful when building development versions of packages. Prevents makepkg | |
101 | from automatically bumping the pkgver to the latest revision number in | |
102 | the package's development tree. | |
103 | ||
c9189f54 DM |
104 | *-i, \--install*:: |
105 | Install or upgrade the package after a successful build using | |
b3c6bdda | 106 | linkman:pacman[8]. |
be0a472c | 107 | |
a7a9f375 DM |
108 | *-L, \--log*:: |
109 | Enable makepkg build logging. This will use the *tee* program to send | |
110 | output of the `build()` function to both the console and to a text file in | |
111 | the build directory named `pkgname-pkgver-pkgrel-arch.log`. As mentioned | |
112 | above, the build log will be localized so you may want to set your locale | |
113 | accordingly if sharing the log output with others. | |
114 | ||
c9189f54 | 115 | *-m, \--nocolor*:: |
be0a472c AF |
116 | Disable color in output messages. |
117 | ||
c9189f54 | 118 | *-o, \--nobuild*:: |
be0a472c | 119 | Download and extract files only, but do not build them. Useful with the |
24f4f982 | 120 | '\--noextract' option if you wish to tweak the files in src/ before |
be0a472c AF |
121 | building. |
122 | ||
7d899910 | 123 | *-p* <buildscript>:: |
aea45a8b | 124 | Read the package script `buildscript` instead of the `PKGBUILD` default; |
b3c6bdda | 125 | see linkman:PKGBUILD[5]. |
be0a472c | 126 | |
c9189f54 | 127 | *-r, \--rmdeps*:: |
be0a472c | 128 | Upon successful build, remove any dependencies installed by makepkg |
89b0a76b | 129 | during dependency auto-resolution and installation when using `-s`. |
be0a472c | 130 | |
c9189f54 | 131 | *-R, \--repackage*:: |
5e32928a AM |
132 | Repackage contents of the package without rebuilding the package. This |
133 | is useful if you forgot a depend or install file in your PKGBUILD and | |
134 | the build itself will not change. | |
be0a472c | 135 | |
c9189f54 | 136 | *-s, \--syncdeps*:: |
aea45a8b SH |
137 | Install missing dependencies using pacman. When build-time or run-time |
138 | dependencies are not found, pacman will try to resolve them. If | |
be0a472c AF |
139 | successful, the missing packages will be downloaded and installed. |
140 | ||
4a7f3bbc SL |
141 | *-S, \--source*:: |
142 | Do not actually build the package, but build a source-only tarball that | |
143 | does not include sources that can be fetched via a download URL. This is | |
144 | useful for passing a single tarball to another program such as a chroot, | |
145 | remote builder, or a tarball upload. Because integrity checks are verified, | |
146 | all source files of the package need to be present or downloadable. | |
147 | ||
692ea728 DM |
148 | *\--allsource*:: |
149 | Do not actually build the package, but build a source-only tarball that | |
150 | includes all sources, including those that are normally download via | |
151 | makepkg. This is useful for passing a single tarball to another program | |
152 | such as a chroot or remote builder. It will also satisfy requirements of | |
153 | the GPL when distributing binary packages. | |
154 | ||
7d899910 | 155 | *\--pkg <list>*:: |
d85c7186 | 156 | Only build listed packages from a split package. Multiple packages should |
3f9cf847 | 157 | be comma separated in the list. This option can be specified multiple times. |
f2c9e51e | 158 | |
0c29eb43 AM |
159 | *\--check*:: |
160 | Run the check() function in the PKGBUILD, overriding the setting in | |
161 | linkman:makepkg.conf[5]. | |
162 | ||
163 | *\--nocheck*:: | |
164 | Do not run the check() function in the PKGBUILD or handle the checkdepends. | |
165 | ||
cb35affd AM |
166 | *\--sign*:: |
167 | Sign the resulting package with gpg, overriding the setting in | |
168 | linkman:makepkg.conf[5]. | |
169 | ||
170 | *\--nosign*:: | |
171 | Do not create a signature for the built package. | |
172 | ||
173 | *\--key* <key>:: | |
4c31bc6e AM |
174 | Specify a key to use when signing packages, overriding the GPGKEY setting |
175 | in linkman:makepkg.conf[5]. If not specified in either location, the | |
176 | default key from the keyring will be used. | |
cb35affd | 177 | |
c9189f54 | 178 | *\--noconfirm*:: |
be0a472c AF |
179 | (Passed to pacman) Prevent pacman from waiting for user input before |
180 | proceeding with operations. | |
181 | ||
c9189f54 | 182 | *\--noprogressbar*:: |
be0a472c AF |
183 | (Passed to pacman) Prevent pacman from displaying a progress bar; |
184 | useful if you are redirecting makepkg output to file. | |
185 | ||
186 | ||
aea45a8b SH |
187 | Additional Features |
188 | ------------------- | |
189 | makepkg supports building development versions of packages without having to | |
190 | manually update the pkgver in the PKGBUILD. This was formerly done using the | |
b3c6bdda | 191 | separate utility 'versionpkg'. See linkman:PKGBUILD[5] for details on how to |
aea45a8b SH |
192 | set up a development PKGBUILD. |
193 | ||
194 | ||
66c6d288 CS |
195 | Environment Variables |
196 | --------------------- | |
197 | *PACMAN*:: | |
198 | The command that will be used to check for missing dependencies and to | |
ccbef232 AM |
199 | install and remove packages. Pacman's -Qq, -Rns, -S, -T, and -U |
200 | operations must be supported by this command. If the variable is not | |
201 | set or empty, makepkg will fall back to `pacman'. | |
66c6d288 | 202 | |
eee61a0b CS |
203 | **PKGDEST=**"/path/to/folder":: |
204 | Folder where the resulting packages will be stored. Overrides the | |
205 | corresponding value defined in linkman:makepkg.conf[5]. | |
206 | ||
207 | **SRCDEST=**"/path/to/folder":: | |
208 | Folder where the downloaded sources will be stored. Overrides the | |
209 | corresponding value defined in linkman:makepkg.conf[5]. | |
210 | ||
5ba8b83b PS |
211 | **PACKAGER=**"John Doe <john@doe.com>":: |
212 | String to identify the creator of the resulting package. Overrides | |
213 | the corresponding value defined in linkman:makepkg.conf[5]. | |
214 | ||
508b360c AM |
215 | **BUILDDIR=**"/path/to/folder":: |
216 | Folder where the package will be built. Overrides the corresponding | |
217 | value defined in linkman:makepkg.conf[5]. | |
66c6d288 | 218 | |
be0a472c AF |
219 | Configuration |
220 | ------------- | |
b3c6bdda | 221 | See linkman:makepkg.conf[5] for more details on configuring makepkg using the |
c9189f54 | 222 | 'makepkg.conf' file. |
be0a472c AF |
223 | |
224 | ||
225 | See Also | |
226 | -------- | |
b3c6bdda | 227 | linkman:makepkg.conf[5], linkman:PKGBUILD[5], linkman:pacman[8] |
be0a472c AF |
228 | |
229 | include::footer.txt[] |