2 vim:set ts=4 sw=4 syntax=asciidoc noet:
9 makepkg - package build utility
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 manlink: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
31 makeworld can be used to rebuild an entire package group or the entire build
32 tree. See `makeworld \--help` for syntax.
37 Ignore a missing or incomplete arch field in the build script. This is
38 for rebuilding packages from source when the PKGBUILD may be slightly
39 outdated and not updated with an `$$arch=('yourarch')$$` field.
42 Build missing dependencies from source. When makepkg finds missing
43 build-time or run-time dependencies, it will look for the dependencies'
44 PKGBUILD files under ABSROOT (set in makepkg.conf). If it finds them it
45 will call makepkg to build and install the missing dependencies. The
46 child calls will be made with the `-b` and `-i` options.
49 Clean up leftover work files and directories after a successful build.
52 Removes all cached source files from the directory specified in SRCDEST
53 in manlink:makepkg.conf[5].
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
62 Do not extract source files; use whatever source already exists in the
63 src/ directory. This is handy if you want to go into src/ and manually
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
69 makepkg will not build a package if a built package already exists in
70 the PKGDEST (set in manlink:makepkg.conf[5]) directory, which may
71 default to the current directory. This allows the built package to be
75 For each source file in the source array of PKGBUILD, download the file
76 if required and generate integrity checks. The integrity checks
77 generated are determined by the value of the INTEGRITY_CHECK array in
78 manlink:makepkg.conf[5]. This output can be redirected into your
79 PKGBUILD for source validation (`makepkg -g >> PKGBUILD`).
82 Output syntax and command line options.
85 Install or upgrade the package after a successful build using
89 Disable color in output messages.
92 Download and extract files only, but do not build them. Useful with the
93 `\--noextract` option if you wish to tweak the files in src/ before
96 *-p* <`buildscript`>::
97 Read the package script `buildscript` instead of the `PKGBUILD` default;
98 see manlink:PKGBUILD[5].
101 Upon successful build, remove any dependencies installed by makepkg
102 during dependency auto-resolution (using `-b` or `-s`).
105 Repackage contents of pkg/ without rebuilding the package. This is
106 useful if you forgot a depend or install file in your PKGBUILD and the
107 build itself will not change.
110 Install missing dependencies using pacman. When build-time or run-time
111 dependencies are not found, pacman will try to resolve them. If
112 successful, the missing packages will be downloaded and installed.
115 Allow makepkg to run as root. This is for security purposes as it is
116 normally dangerous to do so. This will also disable use of fakeroot and
120 Do not actually build the package, but build a source-only tarball. This
121 is useful for passing a single tarball to another program such as a
122 chroot, remote builder, or an AUR upload.
125 (Passed to pacman) Prevent pacman from waiting for user input before
126 proceeding with operations.
129 (Passed to pacman) Prevent pacman from displaying a progress bar;
130 useful if you are redirecting makepkg output to file.
135 makepkg supports building development versions of packages without having to
136 manually update the pkgver in the PKGBUILD. This was formerly done using the
137 separate utility 'versionpkg'. See manlink:PKGBUILD[5] for details on how to
138 set up a development PKGBUILD.
143 See manlink:makepkg.conf[5] for more details on configuring makepkg using the
149 manlink:makepkg.conf[5], manlink:PKGBUILD[5], manlink:pacman[8]
151 include::footer.txt[]