manual: added the global functions section.

This commit is contained in:
Juan RP 2013-11-24 07:47:22 +01:00
parent b52a95e875
commit e4e156bf27

View file

@ -36,7 +36,6 @@ license="GPL-3"
homepage="http://www.foo.org"
distfiles="http://www.foo.org/foo-${version}.tar.gz"
checksum="fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
# end of source section
## package section
foo_package() {
@ -90,6 +89,39 @@ Building a package consist of the following phases:
successfully, the phase will be skipped later (unless its work directory
`${wrksrc}` is removed with `xbps-src clean`).
Global functions
----------------
The following functions are defined by `xbps-src` and can be used on any template:
*vinstall()*::
`vinstall <file> <mode> <targetdir> [<name>]`
Installs `file` with the specified `mode` into `targetdir` in `$DESTDIR`
(if called from a `source section`) or `$PKGDESTDIR` (if called from a `package section`).
The optional 4th argument can be used to change the `file name`.
*vcopy()*::
`vcopy <pattern> <targetdir>`
Copies resursively all files in `pattern` to `targetdir` on `$DESTDIR`
(if called from a `source section`) or `$PKGDESTDIR` (if called from a `package section`).
*vmove()*::
`vmove <pattern>`
Moves `pattern` to the specified directory in `$DESTDIR`
This function moves all files from `files` to the same directory in `$DESTDIR`
(if called from a `source section`) or `$PKGDESTDIR` (if called from a `package section`).
*vmkdir()*::
`vmkdir <directory> [<mode>]`
Creates a directory in `$DESTDIR` (if called from a `source section`) or
$PKGDESTDIR` (if called from a `package section`). The 2nd optional argument
sets the mode of the directory.
NOTE: shell wildcards must be properly quoted.
Global variables
----------------
The following variables are defined by `xbps-src` and can be used on any template: