summaryrefslogtreecommitdiffstats
path: root/doc/PKGBUILD.5.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/PKGBUILD.5.txt')
-rw-r--r--doc/PKGBUILD.5.txt130
1 files changed, 60 insertions, 70 deletions
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index ffbb69bd..47f9e884 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -47,6 +47,11 @@ similar to `$_basekernver`.
*pkgver*::
The version of the software as released from the author (e.g., '2.7.1').
The variable is not allowed to contain colons or hyphens.
++
+The `pkgver` variable can be automatically updated by providing a `pkgver()` function
+in the PKGBUILD that outputs the new package version. This is run after downloading
+and extracting the sources so can use those files in determining the new `pkgver`.
+This is most useful when used with sources from version control systems (see below).
*pkgrel*::
This is the release number specific to the Arch Linux release. This
@@ -109,6 +114,10 @@ It is also possible to change the name of the downloaded file, which is helpful
with weird URLs and for handling multiple source files with the same
name. The syntax is: `source=('filename::url')`.
+
+makepkg also supports building developmental versions of packages using sources
+downloaded from version control systems (VCS). For more information, see
+<<VCS,Using VCS Sources>> below.
++
Files in the source array with extensions `.sig`, `.sign` or `.asc` are recognized by
makepkg as PGP signatures and will be automatically used to verify the integrity
of the corresponding source file.
@@ -121,9 +130,10 @@ of the corresponding source file.
*md5sums (array)*::
This array contains an MD5 hash for every source file specified in the
source array (in the same order). makepkg will use this to verify source
- file integrity during subsequent builds. To easily generate md5sums, run
- `makepkg -g >> PKGBUILD`. If desired, move the md5sums line to an
- appropriate location.
+ file integrity during subsequent builds. If 'SKIP' is put in the array
+ in place of a normal hash, the integrity check for that source file will
+ be skipped. To easily generate md5sums, run ``makepkg -g >> PKGBUILD''.
+ If desired, move the md5sums line to an appropriate location.
*sha1sums, sha256sums, sha384sums, sha512sums (arrays)*::
Alternative integrity checks that makepkg supports; these all behave
@@ -253,10 +263,10 @@ A normal sync or upgrade will not use its value.
with distcc.
*buildflags*;;
- Allow the use of user-specific buildflags (CFLAGS, CXXFLAGS, LDFLAGS)
- during build as specified in linkman:makepkg.conf[5]. More useful in
- its negative form `!buildflags` with select packages that have problems
- building with custom buildflags.
+ Allow the use of user-specific buildflags (CPPFLAGS, CFLAGS, CXXFLAGS,
+ LDFLAGS) during build as specified in linkman:makepkg.conf[5]. More
+ useful in its negative form `!buildflags` with select packages that
+ have problems building with custom buildflags.
*makeflags*;;
Allow the use of user-specific makeflags during build as specified
@@ -295,6 +305,15 @@ If you create any variables of your own in the build function, it is
recommended to use the bash `local` keyword to scope the variable to inside
the build function.
+prepare() Function
+------------------
+An optional prepare() function can be specified in which operations that are
+to be run in order to prepare the sources for building (such as patching) are
+performed. This function is run after the source extraction and before the
+build() function and is skipped when source extraction is skipped. The
+function is run in `bash -e` mode, meaning any command that exits with a
+non-zero status will cause the function to exit.
+
check() Function
----------------
An optional check() function can be specified in which a packages test-suite
@@ -323,9 +342,9 @@ Each split package uses a corresponding packaging function with name
All options and directives for the split packages default to the global values
given in the PKGBUILD. Nevertheless, the following ones can be overridden within
each split package's packaging function:
-`pkgver`, `pkgrel`, `epoch`, `pkgdesc`, `arch`, `license`, `groups`, `depends`,
-`optdepends`, `provides`, `conflicts`, `replaces`, `backup`, `options`,
-`install` and `changelog`.
+`pkgver`, `pkgrel`, `epoch`, `pkgdesc`, `arch`, `url`, `license`, `groups`,
+`depends`, `optdepends`, `provides`, `conflicts`, `replaces`, `backup`,
+`options`, `install` and `changelog`.
An optional global directive is available when building a split package:
@@ -382,69 +401,40 @@ The install script does not need to be specified in the source array. A
template install file is available in '{pkgdatadir}' as 'proto.install' for
reference with all of the available functions defined.
+Using VCS Sources[[VCS]]
+------------------------
+Building a developmental version of a package using sources from a version control
+system (VCS) is enabled by specifying the source in the form
+`source=('folder::url#fragment')`. Currently makepkg supports the `git`, `hg` and
+`svn` protocols.
-Development Directives
-----------------------
-makepkg supports building development versions of packages without having to
-manually update the pkgver in the PKGBUILD. This was formerly done using the
-separate utility 'versionpkg'. In order to utilize this functionality, your
-PKGBUILD must use correct variable names depending on the SCM being fetched
-from (e.g., 'makepkg-git', 'mplayer-svn').
-
-*CVS*::
- The generated pkgver will be the date the package is built.
-
- *_cvsroot*;;
- The root of the CVS repository.
-
- *_cvsmod*;;
- The CVS module to fetch.
-
-*SVN*::
- The generated pkgver will be the latest SVN revision number.
-
- *_svntrunk*;;
- The trunk of the SVN repository.
-
- *_svnmod*;;
- The SVN module to fetch.
+The source URL is divided into three components:
-*Git*::
- The generated pkgver will be the date the package is built.
-
- *_gitroot*;;
- The URL (all protocols supported) to the GIT repository.
-
- *_gitname*;;
- GIT tag or branch to use.
-
-*Mercurial*::
- The generated pkgver will be the hg tip revision number.
-
- *_hgroot*;;
- The URL of the mercurial repository.
-
- *_hgrepo*;;
- The repository to follow.
-
-*Darcs*::
- The generated pkgver will be the date the package is built.
-
- *_darcstrunk*;;
- URL to the repository trunk.
-
- *_darcsmod*;;
- Darcs module to use.
-
-*Bazaar*::
- The generated pkgver will be the latest Bazaar revision number (revno).
-
- *_bzrtrunk*;;
- URL to the bazaar repository.
-
- *_bzrmod*;;
- Bazaar module to use.
+*folder*::
+ (optional) Specifies an alternate folder name for makepkg to download the VCS
+ source into.
+*url*::
+ The url to the VCS repo. This must include the the vcs in the URL protocol for
+ makepkg to recognize this as a VCS source. If the protocol does not include
+ the VCS name, it can be added by prefixing the URL with `vcs+`. For example,
+ using a git repository over `http` would have a source URL in the form
+ `git+http://...`.
+
+*fragment*::
+ (optional) Allows specifying a revision number or branch for makepkg to checkout
+ from the VCS. For example, to checkout a given revision, the source line would
+ have the format `source=(url#revision=123)`. The available fragments depends on
+ the VCS being used:
+
+ *git*;;
+ branch, commit, tag
+
+ *hg*;;
+ branch, revision, tag
+
+ *svn*;;
+ revision
Example
-------