SuperScript::Software::build

The build-dist program


Interface

  build-dist opts proj [ version tmpdir ]
where opts is a set of options as listed below, proj is a subdirectory of /package, version is a version number, and tmpdir is a temporary directory name. The temporary directory must not already exist.

Options

Packaging for Distribution

Run from the top-level project directory, build-dist writes a compressed archive containing the project to standard output. It creates tmpdir to hold temporary files, and erases tmpdir when finished. If tmpdir is not supplied as an argument, build-dist uses ./tmp.

Files in the archive have leading path prog-version/ if version is present, and prog/ otherwise. All path components but the last are sticky, to conform with /package conventions.

The file package/dist lists files and directories to include in the output. Files are listed one per line, and the first empty line terminates the list. Anything after the first empty line is ignored. If package/dist does not exist, then build-dist uses BUILD/conf/dist, where BUILD is the package directory for build, e.g. /package/host/superscript.com/prog/build-0.60.

The file package/exclude lists files and directories to exclude from the output. Files are listed one per line, and the first empty line terminates the list. Anything after the first empty line is ignored. If package/exclude does not exist, then build-dist uses BUILD/conf/exclude. This exclusion mechanism makes it easy to apply external version control to project source code.

If version is nonempty, then build-dist substitutes the version for the string VERSION and the package name (e.g. build) for the string PACKAGE. So, for example, if the project file package/version consists of the single line:

  VERSION
then build-dist will substitute version into the file in the archive.

Examples

Create a distribution archive for /package/host/superscript.com/prog/build-0.60:
  build-dist host/superscript.com/prog/build 0.60 /package/tmp.$$ \
    > /package/build-0.60.tar.gz

Create a distribution archive for /package/host/superscript.com/prog/djblib-0.30:

  build-dist -b host/superscript.com/prog/djblib 0.30 /package/tmp.$$ \
    > /package/djblib-0.30.tar.gz

Create a nonversion archive of the build package:

  build-dist -b build > build.tar.gz