From e4e156bf2792dea4b89a9e69032d43bbdcdb78be Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 24 Nov 2013 07:47:22 +0100 Subject: [PATCH] manual: added the global functions section. --- manual.adoc | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/manual.adoc b/manual.adoc index 7ad266a885..a45741db7e 100644 --- a/manual.adoc +++ b/manual.adoc @@ -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 []` + + 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 ` + + 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 ` + + 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 []` + + 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: