Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnjolras <0enjolras0@laposte.net>2012-07-28 11:20:11 +0200
committerDan McGee <dan@archlinux.org>2012-08-01 09:18:06 -0500
commiteb25a18571d97c20046784f7c8a9815dc40512c7 (patch)
treee8f0b98e16f48b4db36dd29380a9dc8864e89a24
parent065b7f863a25dac3699c23258b986312f4caac1c (diff)
Add documentation for the prepare() function
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--doc/PKGBUILD.5.txt9
-rw-r--r--doc/makepkg.8.txt16
2 files changed, 17 insertions, 8 deletions
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index 404a55ca..062b1ab6 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -296,6 +296,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
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index b96d7689..c24e89e3 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.txt
@@ -59,11 +59,11 @@ Options
installed.
*-e, \--noextract*::
- Do not extract source files; use whatever source already exists in the
- src/ directory. This is handy if you want to go into src/ 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.
+ 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.
*-f, \--force*::
makepkg will not build a package if a built package already exists in
@@ -116,9 +116,9 @@ Options
Disable color in output messages.
*-o, \--nobuild*::
- Download and extract files only, but do not build them. Useful with the
- '\--noextract' option if you wish to tweak the files in src/ before
- building.
+ 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.
*-p* <buildscript>::
Read the package script `buildscript` instead of the `PKGBUILD` default;