manual: added the global functions section.
This commit is contained in:
parent
b52a95e875
commit
e4e156bf27
1 changed files with 33 additions and 1 deletions
34
manual.adoc
34
manual.adoc
|
@ -36,7 +36,6 @@ license="GPL-3"
|
||||||
homepage="http://www.foo.org"
|
homepage="http://www.foo.org"
|
||||||
distfiles="http://www.foo.org/foo-${version}.tar.gz"
|
distfiles="http://www.foo.org/foo-${version}.tar.gz"
|
||||||
checksum="fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
|
checksum="fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff"
|
||||||
# end of source section
|
|
||||||
|
|
||||||
## package section
|
## package section
|
||||||
foo_package() {
|
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
|
successfully, the phase will be skipped later (unless its work directory
|
||||||
`${wrksrc}` is removed with `xbps-src clean`).
|
`${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
|
Global variables
|
||||||
----------------
|
----------------
|
||||||
The following variables are defined by `xbps-src` and can be used on any template:
|
The following variables are defined by `xbps-src` and can be used on any template:
|
||||||
|
|
Loading…
Reference in a new issue