Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/doc/PKGBUILD.5.txt
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-15 00:41:59 -0600
committerDan McGee <dan@archlinux.org>2010-12-15 00:41:59 -0600
commit45146dccbb94f14fb56df2999131851ff15e46b9 (patch)
treeb6a16df6b3adc276b84de9d44b58aacd92c4396c /doc/PKGBUILD.5.txt
parentab9c0814d291db840f60073b4e63d58f932e5e64 (diff)
parentba45cb459084a0746e0005345b8c5483834d1ba2 (diff)
Merge branch 'maint'
Diffstat (limited to 'doc/PKGBUILD.5.txt')
-rw-r--r--doc/PKGBUILD.5.txt39
1 files changed, 22 insertions, 17 deletions
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index c85220b8..3d3909ac 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -237,9 +237,11 @@ name. The syntax is: `source=('filename::url')`.
build() Function
----------------
In addition to the above directives, the optional build() bash function usually
-comprises the remainder of the PKGBUILD. This is directly sourced and executed by
-makepkg, so anything that bash or the system has available is available for use
-here. Be sure any exotic commands used are covered by `makedepends`.
+comprises the remainder of the PKGBUILD. This is directly sourced and executed
+by makepkg, so anything that bash or the system has available is available for
+use here. The function is run in `bash -e` mode, meaning any command that exits
+with a non-zero status will cause the function to exit. Be sure any exotic
+commands used are covered by `makedepends`.
All of the above variables such as `pkgname` and `pkgver` are available for use
in the build function. In addition, makepkg defines three variables for your
@@ -263,24 +265,27 @@ the build function.
package() Function
------------------
-An optional package() function can be specified in addition to the build() function.
-This function is run immediately after the build() function. When specified in
-combination with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot
-usage will be limited to running the packaging stage. An existing build() function
+An optional package() function can be specified in addition to the build()
+function. This function is run immediately after the build() function. The
+function is run in `bash -e` mode, meaning any command that exits with a
+non-zero status will cause the function to exit. When specified in combination
+with the fakeroot BUILDENV option in linkman:makepkg.conf[5], fakeroot usage
+will be limited to running the packaging stage. An existing build() function
will be run as the user calling makepkg.
Package Splitting
-----------------
-makepkg supports building multiple packages from a single PKGBUILD. This is achieved
-by assigning an array of package names to the `pkgname` directive. Each split package
-uses a corresponding packaging function with name `package_foo()`, where `foo` is the
-name of the split package.
-
-All options and directives for the split packages default to the global values given
-within the PKGBUILD. However, some of these can be overridden within each split
-package's packaging function. The following variables can be overridden: `pkgver`,
-`pkgrel`, `pkgdesc`, `arch`, `license`, `groups`, `depends`, `optdepends`,
-`provides`, `conflicts`, `replaces`, `backup`, `options`, `install` and `changelog`.
+makepkg supports building multiple packages from a single PKGBUILD. This is
+achieved by assigning an array of package names to the `pkgname` directive.
+Each split package uses a corresponding packaging function with name
+`package_foo()`, where `foo` is the name of the split package.
+
+All options and directives for the split packages default to the global values
+given within the PKGBUILD. However, some of these can be overridden within each
+split package's packaging function. The following variables can be overridden:
+`pkgver`, `pkgrel`, `pkgdesc`, `arch`, `license`, `groups`, `depends`,
+`optdepends`, `provides`, `conflicts`, `replaces`, `backup`, `options`,
+`install` and `changelog`.
An optional global directive is available when building a split package: