2007-07-06 16:54:18 -04:00
|
|
|
/////
|
2011-06-22 12:06:34 -04:00
|
|
|
vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
|
2007-07-06 16:54:18 -04:00
|
|
|
/////
|
2007-07-02 19:22:01 -04:00
|
|
|
makepkg(8)
|
|
|
|
==========
|
|
|
|
|
|
|
|
Name
|
|
|
|
----
|
|
|
|
makepkg - package build utility
|
|
|
|
|
|
|
|
|
|
|
|
Synopsis
|
|
|
|
--------
|
2013-08-21 11:16:44 -04:00
|
|
|
'makepkg' [options] [ENVVAR=value] [ENVVAR+=value] ...
|
2007-07-02 19:22:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
-----------
|
2011-03-27 22:27:15 -04:00
|
|
|
'makepkg' is a script to automate the building of packages. The requirements for
|
2013-04-28 22:00:17 -04:00
|
|
|
using the script are a build-capable *nix platform and a custom build script
|
2007-11-09 00:38:32 -05:00
|
|
|
for each package you wish to build (known as a PKGBUILD). See
|
2007-12-29 01:24:15 -05:00
|
|
|
linkman:PKGBUILD[5] for details on creating your own build scripts.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
|
|
|
The advantage to a script-based build is that the work is only done once. Once
|
2011-03-27 22:27:15 -04:00
|
|
|
you have the build script for a package, 'makepkg' will do the rest: download and
|
2007-07-02 19:22:01 -04:00
|
|
|
validate source files, check dependencies, configure the build-time settings,
|
|
|
|
build the package, install the package into a temporary root, make
|
2007-07-16 12:57:02 -04:00
|
|
|
customizations, generate meta-info, and package the whole thing up for pacman
|
|
|
|
to use.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2011-03-27 22:27:15 -04:00
|
|
|
NOTE: 'makepkg' uses your current locale by default and does not unset it when
|
2008-02-05 19:23:18 -05:00
|
|
|
building packages. If you wish to share your build output with others when
|
|
|
|
seeking help or for other purposes, you may wish to run "`LC_ALL=C makepkg`" so
|
|
|
|
your logs and output are not localized.
|
|
|
|
|
2014-08-07 00:43:19 -04:00
|
|
|
|
2007-07-02 19:22:01 -04:00
|
|
|
Options
|
|
|
|
-------
|
2007-07-16 12:57:02 -04:00
|
|
|
*-A, \--ignorearch*::
|
|
|
|
Ignore a missing or incomplete arch field in the build script. This is
|
|
|
|
for rebuilding packages from source when the PKGBUILD may be slightly
|
2009-04-11 12:14:28 -04:00
|
|
|
outdated and not updated with an `arch=('yourarch')` field.
|
2007-07-16 12:57:02 -04:00
|
|
|
|
|
|
|
*-c, \--clean*::
|
2007-07-02 19:22:01 -04:00
|
|
|
Clean up leftover work files and directories after a successful build.
|
|
|
|
|
2011-03-23 02:43:58 -04:00
|
|
|
*\--config* <file>::
|
2014-08-07 00:43:20 -04:00
|
|
|
Use an alternate configuration file instead of the +{sysconfdir}/makepkg.conf+
|
2011-03-23 02:28:58 -04:00
|
|
|
default.
|
2008-08-07 11:08:33 -04:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-d, \--nodeps*::
|
2007-07-02 19:22:01 -04:00
|
|
|
Do not perform any dependency checks. This will let you override and
|
|
|
|
ignore any dependencies required. There is a good chance this option
|
|
|
|
will break the build process if all of the dependencies are not
|
|
|
|
installed.
|
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-e, \--noextract*::
|
2016-02-17 02:11:38 -05:00
|
|
|
Do not extract source files or run the prepare() function (if present);
|
|
|
|
use whatever source already exists in the $srcdir/ directory. This is
|
|
|
|
handy if you want to go into $srcdir/ and manually patch or tweak code,
|
|
|
|
then make a package out of the result. Keep in mind that creating a
|
|
|
|
patch may be a better solution to allow others to use your PKGBUILD.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2013-02-23 07:08:44 -05:00
|
|
|
*\--verifysource*::
|
|
|
|
For each source file in the source array of PKGBUILD, download the file
|
|
|
|
if required and perform the integrity checks. No extraction or build is
|
2014-06-29 09:23:09 -04:00
|
|
|
performed. Dependencies specified in the PKGBUILD will not be handled
|
2014-10-18 08:38:53 -04:00
|
|
|
unless `--syncdeps` is used. Useful for performing subsequent offline
|
2014-06-29 09:23:09 -04:00
|
|
|
builds.
|
2013-02-23 07:08:44 -05:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-f, \--force*::
|
2007-07-02 19:22:01 -04:00
|
|
|
makepkg will not build a package if a built package already exists in
|
2008-01-02 21:43:15 -05:00
|
|
|
the `PKGDEST` (set in linkman:makepkg.conf[5]) directory, which may
|
2007-07-02 19:22:01 -04:00
|
|
|
default to the current directory. This allows the built package to be
|
|
|
|
overwritten.
|
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-g, \--geninteg*::
|
2007-07-02 19:22:01 -04:00
|
|
|
For each source file in the source array of PKGBUILD, download the file
|
2009-10-14 14:07:28 -04:00
|
|
|
if required and generate integrity checks. The integrity checks generated
|
|
|
|
are determined by the checks present in the PKGBUILD, falling back to the
|
|
|
|
value of the INTEGRITY_CHECK array in makepkg.conf(5) if these are absent
|
|
|
|
This output can be redirected into your PKGBUILD for source validation
|
|
|
|
using "`makepkg -g >> PKGBUILD`".
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2009-08-10 09:50:53 -04:00
|
|
|
*--skipinteg*::
|
2011-07-16 08:42:32 -04:00
|
|
|
Do not perform any integrity checks (checksum and PGP) on source files.
|
|
|
|
|
|
|
|
*\--skipchecksums*::
|
|
|
|
Do not verify checksums of source files.
|
2009-08-10 09:50:53 -04:00
|
|
|
|
2011-07-06 07:02:19 -04:00
|
|
|
*\--skippgpcheck*::
|
2011-07-16 08:42:32 -04:00
|
|
|
Do not verify PGP signatures of source files.
|
2011-07-06 07:02:19 -04:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-h, \--help*::
|
2007-07-02 19:22:01 -04:00
|
|
|
Output syntax and command line options.
|
|
|
|
|
2012-07-23 03:00:35 -04:00
|
|
|
*--holdver*::
|
|
|
|
When using VCS sources (linkman:PKGBUILD[5]) any currently checked out source
|
|
|
|
will not be updated to the latest revision.
|
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-i, \--install*::
|
|
|
|
Install or upgrade the package after a successful build using
|
2007-12-29 01:24:15 -05:00
|
|
|
linkman:pacman[8].
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2008-02-05 19:23:18 -05:00
|
|
|
*-L, \--log*::
|
2015-12-04 01:47:08 -05:00
|
|
|
Enable logging. This will use the *tee* program to send the output of each
|
|
|
|
of the PKGBUILD functions to both the console and to a text file in the
|
|
|
|
build directory named `pkgbase-pkgver-pkgrel-arch-<function>.log`.
|
|
|
|
As mentioned above, the logs will be localized so you may want to set your
|
|
|
|
locale accordingly if sharing the log output with others.
|
2008-02-05 19:23:18 -05:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-m, \--nocolor*::
|
2007-07-02 19:22:01 -04:00
|
|
|
Disable color in output messages.
|
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-o, \--nobuild*::
|
2012-07-28 05:20:11 -04:00
|
|
|
Download and extract files, run the prepare() function, but do not build
|
|
|
|
them. Useful with the '\--noextract' option if you wish to tweak the files
|
|
|
|
in $srcdir/ before building.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2011-03-23 02:43:58 -04:00
|
|
|
*-p* <buildscript>::
|
2007-10-29 23:25:30 -04:00
|
|
|
Read the package script `buildscript` instead of the `PKGBUILD` default;
|
2014-05-24 23:53:19 -04:00
|
|
|
see linkman:PKGBUILD[5]. The `buildscript` must be located in the directory
|
|
|
|
makepkg is called from.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-r, \--rmdeps*::
|
2007-07-02 19:22:01 -04:00
|
|
|
Upon successful build, remove any dependencies installed by makepkg
|
2008-12-10 20:23:34 -05:00
|
|
|
during dependency auto-resolution and installation when using `-s`.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-R, \--repackage*::
|
2009-05-10 11:16:51 -04:00
|
|
|
Repackage contents of the package without rebuilding the package. This
|
2014-08-07 00:43:20 -04:00
|
|
|
is useful if you forgot, for example, a dependency or install file in your
|
2013-10-02 23:37:24 -04:00
|
|
|
PKGBUILD and the build itself will not change.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*-s, \--syncdeps*::
|
2007-10-29 23:25:30 -04:00
|
|
|
Install missing dependencies using pacman. When build-time or run-time
|
|
|
|
dependencies are not found, pacman will try to resolve them. If
|
2007-07-02 19:22:01 -04:00
|
|
|
successful, the missing packages will be downloaded and installed.
|
|
|
|
|
2011-08-18 06:46:19 -04:00
|
|
|
*-S, \--source*::
|
|
|
|
Do not actually build the package, but build a source-only tarball that
|
|
|
|
does not include sources that can be fetched via a download URL. This is
|
|
|
|
useful for passing a single tarball to another program such as a chroot,
|
|
|
|
remote builder, or a tarball upload. Because integrity checks are verified,
|
|
|
|
all source files of the package need to be present or downloadable.
|
|
|
|
|
2013-04-28 21:49:01 -04:00
|
|
|
*-V, \--version*::
|
|
|
|
Display version information.
|
|
|
|
|
2013-10-04 09:57:08 -04:00
|
|
|
*-C, \--cleanbuild*::
|
|
|
|
Remove the $srcdir before building the package.
|
|
|
|
|
2008-07-30 22:53:02 -04:00
|
|
|
*\--allsource*::
|
|
|
|
Do not actually build the package, but build a source-only tarball that
|
2014-03-01 14:51:09 -05:00
|
|
|
includes all sources, including those that are normally downloaded via
|
2008-07-30 22:53:02 -04:00
|
|
|
makepkg. This is useful for passing a single tarball to another program
|
|
|
|
such as a chroot or remote builder. It will also satisfy requirements of
|
|
|
|
the GPL when distributing binary packages.
|
2009-10-22 00:40:03 -04:00
|
|
|
|
2010-12-15 09:06:43 -05:00
|
|
|
*\--check*::
|
|
|
|
Run the check() function in the PKGBUILD, overriding the setting in
|
|
|
|
linkman:makepkg.conf[5].
|
|
|
|
|
2014-03-03 14:29:54 -05:00
|
|
|
*\--noarchive*::
|
|
|
|
Do not create the archive at the end of the build process. This can be
|
|
|
|
useful to test the package() function or if your target distribution does
|
|
|
|
not use pacman.
|
|
|
|
|
2010-12-15 09:06:43 -05:00
|
|
|
*\--nocheck*::
|
|
|
|
Do not run the check() function in the PKGBUILD or handle the checkdepends.
|
|
|
|
|
2013-04-28 22:42:22 -04:00
|
|
|
*\--noprepare*::
|
|
|
|
Do not run the prepare() function in the PKGBUILD.
|
|
|
|
|
2011-04-17 08:17:24 -04:00
|
|
|
*\--sign*::
|
|
|
|
Sign the resulting package with gpg, overriding the setting in
|
|
|
|
linkman:makepkg.conf[5].
|
|
|
|
|
|
|
|
*\--nosign*::
|
|
|
|
Do not create a signature for the built package.
|
|
|
|
|
|
|
|
*\--key* <key>::
|
2011-04-17 08:38:35 -04:00
|
|
|
Specify a key to use when signing packages, overriding the GPGKEY setting
|
|
|
|
in linkman:makepkg.conf[5]. If not specified in either location, the
|
|
|
|
default key from the keyring will be used.
|
2011-04-17 08:17:24 -04:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*\--noconfirm*::
|
2007-07-02 19:22:01 -04:00
|
|
|
(Passed to pacman) Prevent pacman from waiting for user input before
|
|
|
|
proceeding with operations.
|
|
|
|
|
2012-11-19 19:51:06 -05:00
|
|
|
*\--needed*::
|
|
|
|
(Passed to pacman) Tell pacman not to reinstall a target if it is already
|
2014-08-07 00:43:20 -04:00
|
|
|
up-to-date. (used with '-i' / '\--install').
|
2012-11-19 19:51:06 -05:00
|
|
|
|
2012-07-09 01:55:58 -04:00
|
|
|
*\--asdeps*::
|
|
|
|
(Passed to pacman) Install packages as non-explicitly installed (used
|
2014-08-07 00:43:20 -04:00
|
|
|
with '-i' / '\--install').
|
2012-07-09 01:55:58 -04:00
|
|
|
|
2007-07-16 12:57:02 -04:00
|
|
|
*\--noprogressbar*::
|
2007-07-02 19:22:01 -04:00
|
|
|
(Passed to pacman) Prevent pacman from displaying a progress bar;
|
|
|
|
useful if you are redirecting makepkg output to file.
|
|
|
|
|
2015-03-20 20:19:57 -04:00
|
|
|
*\--packagelist*::
|
|
|
|
List the packages that would be produced without building. Listed
|
|
|
|
package names do not include PKGEXT.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
2015-05-25 17:46:37 -04:00
|
|
|
*\--printsrcinfo*::
|
|
|
|
Generate and print the SRCINFO file to stdout.
|
|
|
|
|
2007-10-29 23:25:30 -04:00
|
|
|
Additional Features
|
|
|
|
-------------------
|
|
|
|
makepkg supports building development versions of packages without having to
|
|
|
|
manually update the pkgver in the PKGBUILD. This was formerly done using the
|
2007-12-29 01:24:15 -05:00
|
|
|
separate utility 'versionpkg'. See linkman:PKGBUILD[5] for details on how to
|
2007-10-29 23:25:30 -04:00
|
|
|
set up a development PKGBUILD.
|
|
|
|
|
|
|
|
|
2009-12-02 13:04:32 -05:00
|
|
|
Environment Variables
|
|
|
|
---------------------
|
2013-10-15 08:00:41 -04:00
|
|
|
**PACMAN**::
|
2009-12-02 13:04:32 -05:00
|
|
|
The command that will be used to check for missing dependencies and to
|
2014-08-07 00:43:20 -04:00
|
|
|
install and remove packages. Pacman's '-Qq', '-Rns', '-S', '-T', and '-U'
|
2009-10-23 01:30:47 -04:00
|
|
|
operations must be supported by this command. If the variable is not
|
|
|
|
set or empty, makepkg will fall back to `pacman'.
|
2009-12-02 13:04:32 -05:00
|
|
|
|
2014-11-04 08:10:23 -05:00
|
|
|
**MAKEPKG_CONF=**"/path/to/file"::
|
2013-10-15 08:00:41 -04:00
|
|
|
Use an alternate config file instead of the +{sysconfdir}/makepkg.conf+
|
|
|
|
default.
|
|
|
|
|
2014-01-28 06:37:00 -05:00
|
|
|
**PKGDEST=**"/path/to/directory"::
|
|
|
|
Directory where the resulting packages will be stored. Overrides the
|
2009-12-04 11:49:54 -05:00
|
|
|
corresponding value defined in linkman:makepkg.conf[5].
|
|
|
|
|
2014-01-28 06:37:00 -05:00
|
|
|
**SRCDEST=**"/path/to/directory"::
|
|
|
|
Directory where the downloaded sources will be stored. Overrides the
|
2009-12-04 11:49:54 -05:00
|
|
|
corresponding value defined in linkman:makepkg.conf[5].
|
|
|
|
|
2014-01-28 06:37:00 -05:00
|
|
|
**SRCPKGDEST=**"/path/to/directory"::
|
|
|
|
Directory where source package files will be stored. Overrides the
|
2013-10-15 08:00:41 -04:00
|
|
|
corresponding value defined in linkman:makepkg.conf[5].
|
|
|
|
|
2014-01-28 06:37:00 -05:00
|
|
|
**LOGDEST=**"/path/to/directory"::
|
|
|
|
Directory where generated log files will be stored. Overrides the
|
2013-10-15 08:00:41 -04:00
|
|
|
corresponding value defined in linkman:makepkg.conf[5].
|
|
|
|
|
2011-10-31 21:00:47 -04:00
|
|
|
**PACKAGER=**"John Doe <john@doe.com>"::
|
|
|
|
String to identify the creator of the resulting package. Overrides
|
|
|
|
the corresponding value defined in linkman:makepkg.conf[5].
|
|
|
|
|
2014-01-28 06:37:00 -05:00
|
|
|
**BUILDDIR=**"/path/to/directory"::
|
|
|
|
Directory where the package will be built. Overrides the corresponding
|
2011-06-15 00:32:42 -04:00
|
|
|
value defined in linkman:makepkg.conf[5].
|
2009-12-02 13:04:32 -05:00
|
|
|
|
2013-04-29 19:10:08 -04:00
|
|
|
**CARCH=**"(i686|x86_64)"::
|
|
|
|
Force build for a specific architecture. Useful for cross-compiling.
|
|
|
|
Overrides the corresponding value defined in linkman:makepkg.conf[5].
|
|
|
|
|
2013-10-15 08:00:41 -04:00
|
|
|
**PKGEXT=**".pkg.tar.gz", **SRCEXT=**".src.tar.gz"::
|
|
|
|
Sets the compression used when making compiled or source packages.
|
|
|
|
Overrides the corresponding value defined in linkman:makepkg.conf[5].
|
|
|
|
|
2014-01-28 06:37:00 -05:00
|
|
|
**GNUPGHOME=**"/path/to/directory"::
|
|
|
|
Directory where the gpg keyring for signing the built package is stored.
|
2013-10-15 07:29:23 -04:00
|
|
|
|
|
|
|
**GPGKEY=**"keyid"::
|
|
|
|
Specify a key to use when signing packages, overriding the GPGKEY setting
|
|
|
|
in linkman:makepkg.conf[5]
|
|
|
|
|
2014-08-07 00:43:19 -04:00
|
|
|
|
2007-07-02 19:22:01 -04:00
|
|
|
Configuration
|
|
|
|
-------------
|
2007-12-29 01:24:15 -05:00
|
|
|
See linkman:makepkg.conf[5] for more details on configuring makepkg using the
|
2007-07-16 12:57:02 -04:00
|
|
|
'makepkg.conf' file.
|
2007-07-02 19:22:01 -04:00
|
|
|
|
|
|
|
|
|
|
|
See Also
|
|
|
|
--------
|
2007-12-29 01:24:15 -05:00
|
|
|
linkman:makepkg.conf[5], linkman:PKGBUILD[5], linkman:pacman[8]
|
2007-07-02 19:22:01 -04:00
|
|
|
|
|
|
|
include::footer.txt[]
|