]>
Commit | Line | Data |
---|---|---|
e412ac19 DM |
1 | ///// |
2 | vim:set ts=4 sw=4 syntax=asciidoc noet: | |
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 | ||
c9189f54 | 51 | *-C, \--cleancache*:: |
c2603924 | 52 | Removes all cached source files from the directory specified in `SRCDEST` |
b3c6bdda | 53 | in linkman:makepkg.conf[5]. |
be0a472c | 54 | |
7d899910 | 55 | *\--config* <file>:: |
aad57cc0 | 56 | Use an alternate config file instead of the +{sysconfdir}/makepkg.conf+ |
5eca2fbd | 57 | default. |
4b183bf9 | 58 | |
c9189f54 | 59 | *-d, \--nodeps*:: |
be0a472c AF |
60 | Do not perform any dependency checks. This will let you override and |
61 | ignore any dependencies required. There is a good chance this option | |
62 | will break the build process if all of the dependencies are not | |
63 | installed. | |
64 | ||
c9189f54 | 65 | *-e, \--noextract*:: |
be0a472c | 66 | Do not extract source files; use whatever source already exists in the |
aea45a8b | 67 | src/ directory. This is handy if you want to go into src/ and manually |
be0a472c AF |
68 | patch or tweak code, then make a package out of the result. Keep in mind |
69 | that creating a patch may be a better solution to allow others to use | |
70 | your PKGBUILD. | |
71 | ||
c9189f54 | 72 | *-f, \--force*:: |
be0a472c | 73 | makepkg will not build a package if a built package already exists in |
c2603924 | 74 | the `PKGDEST` (set in linkman:makepkg.conf[5]) directory, which may |
be0a472c AF |
75 | default to the current directory. This allows the built package to be |
76 | overwritten. | |
77 | ||
11692e0e | 78 | *--forcever*:: |
e93b0a2f DM |
79 | This is a hidden option that should *not* be used unless you really know |
80 | what you are doing. makepkg uses this internally when calling itself to | |
81 | set the new development pkgver of the package. | |
82 | ||
c9189f54 | 83 | *-g, \--geninteg*:: |
be0a472c | 84 | For each source file in the source array of PKGBUILD, download the file |
79987c92 XC |
85 | if required and generate integrity checks. The integrity checks generated |
86 | are determined by the checks present in the PKGBUILD, falling back to the | |
87 | value of the INTEGRITY_CHECK array in makepkg.conf(5) if these are absent | |
88 | This output can be redirected into your PKGBUILD for source validation | |
89 | using "`makepkg -g >> PKGBUILD`". | |
be0a472c | 90 | |
82522dd8 | 91 | *--skipinteg*:: |
2ce444ee | 92 | Do not perform any integrity checks, just print a warning instead. |
82522dd8 | 93 | |
c9189f54 | 94 | *-h, \--help*:: |
be0a472c AF |
95 | Output syntax and command line options. |
96 | ||
e93b0a2f DM |
97 | *\--holdver*:: |
98 | Useful when building development versions of packages. Prevents makepkg | |
99 | from automatically bumping the pkgver to the latest revision number in | |
100 | the package's development tree. | |
101 | ||
c9189f54 DM |
102 | *-i, \--install*:: |
103 | Install or upgrade the package after a successful build using | |
b3c6bdda | 104 | linkman:pacman[8]. |
be0a472c | 105 | |
a7a9f375 DM |
106 | *-L, \--log*:: |
107 | Enable makepkg build logging. This will use the *tee* program to send | |
108 | output of the `build()` function to both the console and to a text file in | |
109 | the build directory named `pkgname-pkgver-pkgrel-arch.log`. As mentioned | |
110 | above, the build log will be localized so you may want to set your locale | |
111 | accordingly if sharing the log output with others. | |
112 | ||
c9189f54 | 113 | *-m, \--nocolor*:: |
be0a472c AF |
114 | Disable color in output messages. |
115 | ||
c9189f54 | 116 | *-o, \--nobuild*:: |
be0a472c | 117 | Download and extract files only, but do not build them. Useful with the |
c9189f54 | 118 | `\--noextract` option if you wish to tweak the files in src/ before |
be0a472c AF |
119 | building. |
120 | ||
7d899910 | 121 | *-p* <buildscript>:: |
aea45a8b | 122 | Read the package script `buildscript` instead of the `PKGBUILD` default; |
b3c6bdda | 123 | see linkman:PKGBUILD[5]. |
be0a472c | 124 | |
c9189f54 | 125 | *-r, \--rmdeps*:: |
be0a472c | 126 | Upon successful build, remove any dependencies installed by makepkg |
89b0a76b | 127 | during dependency auto-resolution and installation when using `-s`. |
be0a472c | 128 | |
c9189f54 | 129 | *-R, \--repackage*:: |
5e32928a AM |
130 | Repackage contents of the package without rebuilding the package. This |
131 | is useful if you forgot a depend or install file in your PKGBUILD and | |
132 | the build itself will not change. | |
be0a472c | 133 | |
c9189f54 | 134 | *-s, \--syncdeps*:: |
aea45a8b SH |
135 | Install missing dependencies using pacman. When build-time or run-time |
136 | dependencies are not found, pacman will try to resolve them. If | |
be0a472c AF |
137 | successful, the missing packages will be downloaded and installed. |
138 | ||
692ea728 DM |
139 | *\--allsource*:: |
140 | Do not actually build the package, but build a source-only tarball that | |
141 | includes all sources, including those that are normally download via | |
142 | makepkg. This is useful for passing a single tarball to another program | |
143 | such as a chroot or remote builder. It will also satisfy requirements of | |
144 | the GPL when distributing binary packages. | |
145 | ||
c9189f54 | 146 | *\--source*:: |
692ea728 DM |
147 | Do not actually build the package, but build a source-only tarball that |
148 | does not include sources that can be fetched via a download URL. This is | |
149 | useful for passing a single tarball to another program such as a chroot, | |
814cd7ae XC |
150 | remote builder, or a tarball upload. Because integrity checks are verified, |
151 | all source files of the package need to be present or downloadable. | |
c9189f54 | 152 | |
7d899910 | 153 | *\--pkg <list>*:: |
f2c9e51e AM |
154 | Only build listed packages from a split package. The use of quotes is |
155 | necessary when specifying multiple packages. e.g. `--pkg "pkg1 pkg3"` | |
156 | ||
0c29eb43 AM |
157 | *\--check*:: |
158 | Run the check() function in the PKGBUILD, overriding the setting in | |
159 | linkman:makepkg.conf[5]. | |
160 | ||
161 | *\--nocheck*:: | |
162 | Do not run the check() function in the PKGBUILD or handle the checkdepends. | |
163 | ||
cb35affd AM |
164 | *\--sign*:: |
165 | Sign the resulting package with gpg, overriding the setting in | |
166 | linkman:makepkg.conf[5]. | |
167 | ||
168 | *\--nosign*:: | |
169 | Do not create a signature for the built package. | |
170 | ||
171 | *\--key* <key>:: | |
4c31bc6e AM |
172 | Specify a key to use when signing packages, overriding the GPGKEY setting |
173 | in linkman:makepkg.conf[5]. If not specified in either location, the | |
174 | default key from the keyring will be used. | |
cb35affd | 175 | |
c9189f54 | 176 | *\--noconfirm*:: |
be0a472c AF |
177 | (Passed to pacman) Prevent pacman from waiting for user input before |
178 | proceeding with operations. | |
179 | ||
c9189f54 | 180 | *\--noprogressbar*:: |
be0a472c AF |
181 | (Passed to pacman) Prevent pacman from displaying a progress bar; |
182 | useful if you are redirecting makepkg output to file. | |
183 | ||
184 | ||
aea45a8b SH |
185 | Additional Features |
186 | ------------------- | |
187 | makepkg supports building development versions of packages without having to | |
188 | manually update the pkgver in the PKGBUILD. This was formerly done using the | |
b3c6bdda | 189 | separate utility 'versionpkg'. See linkman:PKGBUILD[5] for details on how to |
aea45a8b SH |
190 | set up a development PKGBUILD. |
191 | ||
192 | ||
66c6d288 CS |
193 | Environment Variables |
194 | --------------------- | |
195 | *PACMAN*:: | |
196 | The command that will be used to check for missing dependencies and to | |
ccbef232 AM |
197 | install and remove packages. Pacman's -Qq, -Rns, -S, -T, and -U |
198 | operations must be supported by this command. If the variable is not | |
199 | set or empty, makepkg will fall back to `pacman'. | |
66c6d288 | 200 | |
eee61a0b CS |
201 | **PKGDEST=**"/path/to/folder":: |
202 | Folder where the resulting packages will be stored. Overrides the | |
203 | corresponding value defined in linkman:makepkg.conf[5]. | |
204 | ||
205 | **SRCDEST=**"/path/to/folder":: | |
206 | Folder where the downloaded sources will be stored. Overrides the | |
207 | corresponding value defined in linkman:makepkg.conf[5]. | |
208 | ||
66c6d288 | 209 | |
be0a472c AF |
210 | Configuration |
211 | ------------- | |
b3c6bdda | 212 | See linkman:makepkg.conf[5] for more details on configuring makepkg using the |
c9189f54 | 213 | 'makepkg.conf' file. |
be0a472c AF |
214 | |
215 | ||
216 | See Also | |
217 | -------- | |
b3c6bdda | 218 | linkman:makepkg.conf[5], linkman:PKGBUILD[5], linkman:pacman[8] |
be0a472c AF |
219 | |
220 | include::footer.txt[] |