[pacman-dev] [PATCH 2/2] Add documentation for the prepare() function
allan at archlinux.org
Sun Jul 29 03:24:15 EDT 2012
On 28/07/12 19:20, Enjolras wrote:
> I'm a very poor english speaker, don't know if this is ok
Thanks. This was a great start. I altered the text to this and pushed
to my working branch:
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index c49007e..47f9e88 100644
@@ -305,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.
+An optional prepare() function can be specified in which operations
+to be run in order to prepare the sources for building (such as
+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.
An optional check() function can be specified in which a packages
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index ab3c276..9d19e38 100644
@@ -59,11 +59,11 @@ Options
- 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.
makepkg will not build a package if a built package already exists in
@@ -110,9 +110,9 @@ Options
Disable color in output messages.
- 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
+ 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.
Read the package script `buildscript` instead of the `PKGBUILD` default;
More information about the pacman-dev