added coding standard
[pacman-ng.git] / doc / makepkg.8.txt
blob9d19e38e8224e661a06d6970fe7a54e072859cbf
1 /////
2 vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
3 /////
4 makepkg(8)
5 ==========
7 Name
8 ----
9 makepkg - package build utility
12 Synopsis
13 --------
14 'makepkg' [options]
17 Description
18 -----------
19 'makepkg' is a script to automate the building of packages. The requirements for
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
22 linkman:PKGBUILD[5] for details on creating your own build scripts.
24 The advantage to a script-based build is that the work is only done once. Once
25 you have the build script for a package, 'makepkg' will do the rest: download and
26 validate source files, check dependencies, configure the build-time settings,
27 build the package, install the package into a temporary root, make
28 customizations, generate meta-info, and package the whole thing up for pacman
29 to use.
31 NOTE: 'makepkg' uses your current locale by default and does not unset it when
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.
36 Options
37 -------
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.
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
46         outdated and not updated with an `arch=('yourarch')` field.
48 *-c, \--clean*::
49         Clean up leftover work files and directories after a successful build.
51 *\--config* <file>::
52         Use an alternate config file instead of the +{sysconfdir}/makepkg.conf+
53         default.
55 *-d, \--nodeps*::
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.
61 *-e, \--noextract*::
62         Do not extract source files or run the prepare() function (if present);
63         use whatever source already exists in the $srcdir/ directory. This is
64         handy if you want to go into $srcdir/ and manually patch or tweak code,
65         then make a package out of the result. Keep in mind that creating a
66         patch may be a better solution to allow others to use your PKGBUILD.
68 *-f, \--force*::
69         makepkg will not build a package if a built package already exists in
70         the `PKGDEST` (set in linkman:makepkg.conf[5]) directory, which may
71         default to the current directory. This allows the built package to be
72         overwritten.
74 *-g, \--geninteg*::
75         For each source file in the source array of PKGBUILD, download the file
76         if required and generate integrity checks. The integrity checks generated
77         are determined by the checks present in the PKGBUILD, falling back to the
78         value of the INTEGRITY_CHECK array in makepkg.conf(5) if these are absent
79         This output can be redirected into your PKGBUILD for source validation
80         using "`makepkg -g >> PKGBUILD`".
82 *--skipinteg*::
83         Do not perform any integrity checks (checksum and PGP) on source files.
85 *\--skipchecksums*::
86         Do not verify checksums of source files.
88 *\--skippgpcheck*::
89         Do not verify PGP signatures of source files.
91 *-h, \--help*::
92         Output syntax and command line options.
94 *--holdver*::
95         When using VCS sources (linkman:PKGBUILD[5]) any currently checked out source
96         will not be updated to the latest revision.
98 *-i, \--install*::
99         Install or upgrade the package after a successful build using
100         linkman:pacman[8].
102 *-L, \--log*::
103         Enable makepkg build logging. This will use the *tee* program to send
104         output of the `build()` function to both the console and to a text file in
105         the build directory named `pkgname-pkgver-pkgrel-arch.log`. As mentioned
106         above, the build log will be localized so you may want to set your locale
107         accordingly if sharing the log output with others.
109 *-m, \--nocolor*::
110         Disable color in output messages.
112 *-o, \--nobuild*::
113         Download and extract files, run the prepare() function, but do not build
114         them. Useful with the '\--noextract' option if you wish to tweak the files
115         in $srcdir/ before building.
117 *-p* <buildscript>::
118         Read the package script `buildscript` instead of the `PKGBUILD` default;
119         see linkman:PKGBUILD[5].
121 *-r, \--rmdeps*::
122         Upon successful build, remove any dependencies installed by makepkg
123         during dependency auto-resolution and installation when using `-s`.
125 *-R, \--repackage*::
126         Repackage contents of the package without rebuilding the package. This
127         is useful if you forgot a depend or install file in your PKGBUILD and
128         the build itself will not change.
130 *-s, \--syncdeps*::
131         Install missing dependencies using pacman. When build-time or run-time
132         dependencies are not found, pacman will try to resolve them. If
133         successful, the missing packages will be downloaded and installed.
135 *-S, \--source*::
136         Do not actually build the package, but build a source-only tarball that
137         does not include sources that can be fetched via a download URL. This is
138         useful for passing a single tarball to another program such as a chroot,
139         remote builder, or a tarball upload. Because integrity checks are verified,
140         all source files of the package need to be present or downloadable.
142 *\--allsource*::
143         Do not actually build the package, but build a source-only tarball that
144         includes all sources, including those that are normally download via
145         makepkg. This is useful for passing a single tarball to another program
146         such as a chroot or remote builder. It will also satisfy requirements of
147         the GPL when distributing binary packages.
149 *\--pkg* <list>::
150         Only build listed packages from a split package. Multiple packages should
151         be comma separated in the list. This option can be specified multiple times.
153 *\--check*::
154         Run the check() function in the PKGBUILD, overriding the setting in
155         linkman:makepkg.conf[5].
157 *\--nocheck*::
158         Do not run the check() function in the PKGBUILD or handle the checkdepends.
160 *\--sign*::
161         Sign the resulting package with gpg, overriding the setting in
162         linkman:makepkg.conf[5].
164 *\--nosign*::
165         Do not create a signature for the built package.
167 *\--key* <key>::
168         Specify a key to use when signing packages, overriding the GPGKEY setting
169         in linkman:makepkg.conf[5]. If not specified in either location, the
170         default key from the keyring will be used.
172 *\--noconfirm*::
173         (Passed to pacman) Prevent pacman from waiting for user input before
174         proceeding with operations.
176 *\--asdeps*::
177         (Passed to pacman) Install packages as non-explicitly installed (used
178         with -i / --install).
180 *\--noprogressbar*::
181         (Passed to pacman) Prevent pacman from displaying a progress bar;
182         useful if you are redirecting makepkg output to file.
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
189 separate utility 'versionpkg'. See linkman:PKGBUILD[5] for details on how to
190 set up a development PKGBUILD.
193 Environment Variables
194 ---------------------
195 *PACMAN*::
196         The command that will be used to check for missing dependencies and to
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'.
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].
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].
209 **PACKAGER=**"John Doe <john@doe.com>"::
210         String to identify the creator of the resulting package. Overrides
211         the corresponding value defined in linkman:makepkg.conf[5].
213 **BUILDDIR=**"/path/to/folder"::
214         Folder where the package will be built. Overrides the corresponding
215         value defined in linkman:makepkg.conf[5].
217 Configuration
218 -------------
219 See linkman:makepkg.conf[5] for more details on configuring makepkg using the
220 'makepkg.conf' file.
223 See Also
224 --------
225 linkman:makepkg.conf[5], linkman:PKGBUILD[5], linkman:pacman[8]
227 include::footer.txt[]