Next: , Up: Packaging System   [Contents][Index]

4.1 build

Typically ‘build’ files are shell scripts that run commands to prepare the source code to be installed on the target system. Even though we will be assuming that the ‘build’ file is a POSIX shell script (for portability’s sake), ‘build’ files can be any executable program from binary programs to ‘perl’ scripts.

The contents of a build script do not need to follow a certain rule for the package manager, except for the fact that the user needs the permission to execute the file.

An important advice is to append an ’-e’ to the shebang (#!/bin/sh -e) so that the build script exits on compilation error.

Build is run with three arguments (‘$#’)