Table of Contents
The definitions script tells Buildtool several important and basic information about a software package. This information is used in almost all Buildtool modules to determine the package name, its version, its license, etc. Therefore, it must exist in all buildtoolized packages.
The script is located inside the defs, to be placed inside the Generic.bt file (see Chapter 8, Script files). It should only define variable values, hence the name.
When you develop a package, you use a specific Buildtool version. End users may have a different (older) version than you, so they will have problems to compile your program. Therefore, you must tell Buildtool which version you used when creating your program, so it can check if the installed one is good enough to compile the package. See Section 1.3, “Versioning” for more details on how Buildtool versions are handled.
The BT_REQUIRE is used to accomplish this task; it simply contains the version number you used to develop your program.
bt_lint will complain if you don't follow these rules.
The following variables describe the basic details of a package. They should appear in the same order as described here:
The package name. Should be one word, without capitalization and without spaces. The distribution file will take its name from this variable. Must be defined.
The package version number. May be a dotted number (following the usual X.Y convention), a date, or whatever you prefer. Must be defined.
A word indicating the license name of your project. If any of the following names is applicable, use them (instead of changing case, adding spaces, etc.): apache, bsd, lgpl, gplv1, gplv2 (you get the idea). Must be defined.
An email address pointing to the responsible person of the software package. Can be a mailing lists if multiple persons feel responsible of it. Must be defined.
The homepage of the program, if applicable. May be ommited.
A single, short sentence describing the package. Shouldn't start with the A word. Should start with uppercase. Must be defined.
Whitespace separated list of the default distribution files that the bt_dist module (see Chapter 14, Creating distribution files) will build. Defaults to tar.gz. Can be ommited.
A package might require you to always pass some extra arguments to specific modules to work (this is very rare, though). Buildtool can do this job for you, so you do not have to worry about those specific details. Anyway, be careful with this feature. Do not use it if you do not have a good reason to do so.
The following variables are recognized:
Extra arguments to be passed to the bt_config module.
Extra arguments to be passed to the bt_dist module.
Extra arguments to be passed to the bt_doc module.
Extra arguments to be passed to the bt_lint module.
Extra arguments to be passed to the bt_make module.
This section contains an example of a definitions script. Please note how variables are grouped in blocks; follow these conventions when writting your file.
defs() { # Package definitions BT_REQUIRE="0.12" BT_PKG_NAME="exampledefs" BT_PKG_VERSION="0.1" BT_PKG_LICENSE="bsd" BT_PKG_MAINTAINER="somebody@somewhere.org" BT_PKG_HOMEPAGE="http://somewhere.org/" BT_PKG_COMMENT="Example definitions file" }