1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Add documentation for the prepare() function

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Enjolras 2012-07-28 11:20:11 +02:00 committed by Dan McGee
parent 065b7f863a
commit eb25a18571
2 changed files with 17 additions and 8 deletions

View File

@ -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 recommended to use the bash `local` keyword to scope the variable to inside
the build function. 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 check() Function
---------------- ----------------
An optional check() function can be specified in which a packages test-suite An optional check() function can be specified in which a packages test-suite

View File

@ -59,11 +59,11 @@ Options
installed. installed.
*-e, \--noextract*:: *-e, \--noextract*::
Do not extract source files; use whatever source already exists in the Do not extract source files or run the prepare() function (if present);
src/ directory. This is handy if you want to go into src/ and manually use whatever source already exists in the $srcdir/ directory. This is
patch or tweak code, then make a package out of the result. Keep in mind handy if you want to go into $srcdir/ and manually patch or tweak code,
that creating a patch may be a better solution to allow others to use then make a package out of the result. Keep in mind that creating a
your PKGBUILD. patch may be a better solution to allow others to use your PKGBUILD.
*-f, \--force*:: *-f, \--force*::
makepkg will not build a package if a built package already exists in makepkg will not build a package if a built package already exists in
@ -116,9 +116,9 @@ Options
Disable color in output messages. Disable color in output messages.
*-o, \--nobuild*:: *-o, \--nobuild*::
Download and extract files only, but do not build them. Useful with the Download and extract files, run the prepare() function, but do not build
'\--noextract' option if you wish to tweak the files in src/ before them. Useful with the '\--noextract' option if you wish to tweak the files
building. in $srcdir/ before building.
*-p* <buildscript>:: *-p* <buildscript>::
Read the package script `buildscript` instead of the `PKGBUILD` default; Read the package script `buildscript` instead of the `PKGBUILD` default;