The Autopackage API

Build system integration

These functions should be used to (un)build the source code in your specfile's [BuildPrepare] and [BuildUnprepare] sections. So far only Autoconf/Automake is supported.

Variables in this category

$APKG_BUILD_SKIP_CONFIGURE
$APKG_BUILD_SKIP_MAKE

Functions in this category

Name Parameters
prepareBuild [--src SRCDIR]
unprepareBuild

Details

$APKG_BUILD_SKIP_CONFIGURE
When set to 1, prepareBuild() will not run configure. This, in combination with $APKG_BUILD_SKIP_CONFIGURE, is useful if you only want to create a package but not recompile all the source code. If you're not using prepareBuild, your [BuildPrepare] code should respect this variable. See also: $APKG_BUILD_SKIP_MAKE
$APKG_BUILD_SKIP_MAKE
When set to 1, prepareBuild() will not run make. This, in combination with $APKG_BUILD_SKIP_CONFIGURE, is useful if you only want to create a package but not recompile all the source code. If you're not using prepareBuild, your [BuildPrepare] code should respect this variable. See also: $APKG_BUILD_SKIP_CONFIGURE
prepareBuild
Syntax: prepareBuild [--src SRCDIR]
SRCDIR: If your project uses out-of-tree source builds, then specify the source directory here (either an absolute path, or relative to makeinstaller's working directory). The working directory will be used as build directory.
Configure and compile the source code, and install files to a temporary build root directory. That build root directory will be compressed by makeinstaller, which will be the main payload for your package. This function can only be used if your project is using the GNU Autoconf/Automake build system.
Optimization flags will be set, by default it will use "-O2 -march=i586 -mcpu=i686". The output will be supressed, however errors and warnings will be shown.
See also: $APKG_BUILD_SKIP_CONFIGURE and $APKG_BUILD_SKIP_MAKE.
Example:
[BuildPrepare]
prepareBuild --enable-foofeature

unprepareBuild
Syntax: unprepareBuild
Cleanup the temporary build root direcory made by prepareBuild(). You should not call this if you didn't already call prepareBuild().
Example:
[BuildUnprepare]
unprepareBuild