Reformat into sections for clarity.

This commit is contained in:
Simon Howard 2017-01-07 22:03:17 +01:00
parent 55b05163a9
commit 3582c01cb4

View file

@ -17,17 +17,21 @@ or the system package manager).
If a check module is not installed, the default is to always If a check module is not installed, the default is to always
assume the package is not installed: assume the package is not installed:
* `check_pkgconfig`: invokes `pkg-config` to determine if the package #### check_pkgconfig
is installed. The name of the `pkg-config` .pc file must be provided
as an argument to `check_pkgconfig`; for example: `check_pkgconfig` invokes `pkg-config` to determine if the package
is installed. The name of the `pkg-config` .pc file must be provided
as an argument to `check_pkgconfig`; for example:
```shell ```shell
check_pkgconfig SDL2 check_pkgconfig SDL2
``` ```
* `check_tool`: checks if a particular tool is installed in `$PATH` #### check_tool
to determine if the package is installed. The name of the tool must
be provided as an argument to `check_tool`; for example: `check_tool` checks if a particular tool is installed in `$PATH`
to determine if the package is installed. The name of the tool must
be provided as an argument to `check_tool`; for example:
```shell ```shell
check_tool gnome-terminal check_tool gnome-terminal
@ -37,25 +41,28 @@ check_tool gnome-terminal
Fetch modules specify how to retrieve the package from the Internet: Fetch modules specify how to retrieve the package from the Internet:
* `fetch_download`: downloads the package from a URL specified as #### fetch_download
an argument.
The file to `fetch_download` downloads the package from a URL specified as an argument.
be downloaded is assumed to be a well-formed tar.gz file with all its The file to be downloaded is assumed to be a well-formed tar.gz file with
contents in a directory that matches the package name; if this is not all its contents in a directory that matches the package name; if this is
the case, the variable `$IS_TAR_BOMB` should be set to `true`. not the case, the variable `$IS_TAR_BOMB` should be set to `true`.
Example use:
Example use:
```shell ```shell
fetch_download http://example.com/example-pkg.tar.gz fetch_download http://example.com/example-pkg.tar.gz
IS_TAR_BOMB=true IS_TAR_BOMB=true
``` ```
* `fetch_git`: downloads the package from a Git repository at the URL #### fetch_git
given as an argument.
The branch `master` `fetch_git` downloads the package from a Git repository at the URL
will be checked out by default; this can be overriden by providing given as an argument. The branch `master` will be checked out by
the branch name as a second argument to `fetch_git`. default; this can be overriden by providing the branch name as a second
Example use: argument to `fetch_git`.
Example use:
```shell ```shell
fetch_git http://example.com/example.git my-neato-branch fetch_git http://example.com/example.git my-neato-branch
@ -65,11 +72,14 @@ fetch_git http://example.com/example.git my-neato-branch
Build modules specify how to build the package after it is fetched: Build modules specify how to build the package after it is fetched:
* `build_autotools`: builds the package assuming that it is laid out #### build_autotools
as a standard autotools package (ie. `./configure; make; make install`).
Extra arguments passed to the function will be passed through to `build_autotools` builds the package assuming that it is laid out as a
`configure`. standard autotools package (ie. `./configure; make; make install`).
Example use: Extra arguments passed to the function will be passed through to
`configure`.
Example use:
```shell ```shell
build_autotools --disable-broken-feature build_autotools --disable-broken-feature
@ -103,18 +113,24 @@ the source control repository".
### Other modules and functions ### Other modules and functions
* `dependencies`: Arguments provided to the function are the names #### dependencies
of other packages to install before trying to build this one.
Example use: Arguments provided to the `dependencies` function are the names of other
packages to install before trying to build this one.
Example use:
```shell ```shell
dependencies other-package neato-lib dependencies other-package neato-lib
``` ```
* `package_group`: Specifies that this is not really a package that #### package_group
should be built; rather, it just specifies a number of other packages
to build. `package_group` specifies that this is not really a package that
Example use: should be built; rather, it just specifies a number of other packages
to build.
Example use:
```shell ```shell
# File contains no other lines # File contains no other lines