filelist-version

This script contains information regarding how various files should be handled by the Software Build System. It naturally consists of five sections. The  filelist-version  script(s) are automatically sourced by  prepare.sh  script (which, in turn, is sourced by any installation script).

Sourcing  filelist-version  scripts

filelist-version  scripts are sourced sequentially, in order defined by version, up to version provided in  PackageName_VERSION  variable.
For example, if there are files  filelist-A,   filelist-1.0.1,   filelist-1.2.0,  and  filelist-1.3.3,  and  PackageName_VERSION==1.3.0,  the following scripts in the following order will be sourced:

    filelist-A
    filelist-1.0.1
    filelist-1.2.0

The same scripts are sourced if  PackageName_VERSION==1.2.0.  However, if  PackageName_VERSION==1.2.0beta2,  only the first 2 scripts are sourced, as version 1.2.0beta2 is smaller than version 1.2.0.

A” in  filelist-A  is just the smallest version, which ensures that this script always is sourced first.

Usually, new  filelist-version  scripts are added when there are changes in the set of files starting some version. As all previous  filelist-version  are sourced, new  filelist-version  script may contain only definitions of variables that are changed.

For example, if initial version of the package had single executable  xyz  that required wrapper script, and starting version 2.0.0 a new executable  xyz2  appears, the script  filelist-2.0.0  may consist of a single line:

BIN_WRAPPERS="xyz xyz2"

Note that you should not name scripts  filelist-version  along with really installed versions of a package. For example, you may install version 1.5.3 and then version 2.1.5, but still create file  filelist-2.0.0 — this will reflect that any version 2.x.y needs modified filelist.

Specifying files to download from web

Handling hidden files

If the last parameter of dlunits_add is empty — which means store contents of the downloaded archive on the top level of Mercurial repository, without the containing directory PackageName-version — hidden files and contents of hidden directories is NOT stored in Mercurial repository.

However, if it is withdir (directory PackageName-version with all its contents is stored in Mercurial repository), all its contents, including hidden files and directories, is preserved.

Specifying files to copy

Specifying Python-based package

Specifying additional environmental variables

Specifying wrapper scripts

This is done by setting environmental variables:

  • WRAPPER_SCRIPT_PREFIX
  • BIN_WRAPPERS
  • PYTHON_WRAPPERS
  • JAR_WRAPPERS
  • MAN_WRAPPERS
  • HTML_WRAPPERS

The first variable, WRAPPER_SCRIPT_PREFIX, specifies the prefix that is added to each wrapper script name (except when it is explicitly prohibited, see below). This is convenient when a package contains many executables with ambiguous names. The value of this variable should not contain spaces, and (if is not empty) preferably should ends with hyphen or underscore.

The subsequent variables specify various types of wrapper scripts. The value of each variables it a whitespace-separated list of wrapper specifications, and each specification has form:

    [~]name[,[~]alias1[,]][:target]

All elements of wrapper specification except name are optional. The meaning of elements is:

  • ~  says that prefix (specified in WRAPPER_SCRIPT_PREFIX variable) should not be added to the following name or alias. Otherwise,  ${WRAPPER_SCRIPT_PREFIX}name  will be used instead of name (the same for alias).
  • name says that the script  Software/bin/name  will be created.
  • alias1 etc. say that symlinks  alias1 –> name will be created in  Software/bin/  directory.
  • target specifies the target of the wrapper script (see description of wrapper scripts for details). target is not applicable to man wrappers; if given, it is ignored with waring message. In all other cases, if target is omitted, it defaults to name with extension depending on wrapper type (empty for bin and python wrappers,  .jar  for jar wrappers,  .html  for html wrappers). target may be a path relative to $PACKAGE_INSTALL_DIR or simple file name; in the later case, the default path prefix is added: bin/ for bin wrappers, venv/bin/ for python wrappers, jars/ for jar wrappers, and share/doc/html/ for html wrappers.