<< back to Diet-Router

The build sysytem has been competely rewritten in version 0.3 of Diet-Router. In the following we will refer the directory of the unpacked Diet-Router distribution as ${TOP}.

The build is controlled by the ${TOP}/pkg/ directory which contains one subdirectory for each package ${TOP}/pgk/<pkg-name>. In each package directory you can have the following files:

descr (requires)
This file contains (born-) shell code which sets some variables controlling the package build process:
PKG_SRCDIR
Directory where the unpacked sources are depositet. This must be a relative path to ${TOP}/src.
PKG_SOURCES
Comma seperated list of external sources.
PKG_PATCHES
Comma seperated list of patches to apply. Patches will be applied in this order after getting and unpacking all external sources. It is possible that a patch is an external source!
PKG_INTERACTIVE
Set to "yes", if the build script requires user input.
PKG_RMSOURCE
Set to "yes", if $PKG_SRCDIR can be deleted after build.
PKG_CONFIGOPT
Comma seperated list of configuration variables. If no of this variables is set to "y" in ${TOP}/.config (Menuconfig), this package will be ignored.
sources (optional)
Contains priorised sources for all source in $PKG_SOURCES. Each line contains '<nr> <URI>', where <nr> must start at 1 and must be continuous incremented for each mirror.
md5sums (optional)
List of md5sum output of each external source. Each line shoud be '<src> <sum>'.
build (optional)
Executable (script) to build the package. If $PKG_SRCDIR is not empty, the build will change to that directory immediate before executation. An exitcode of 0 must be returned on succces.
setup (optional)
Executable (script) to configure the package after the build of all(!) packages are successfull. If possible, this script shoud NOT change any user modified files. Please take a look at ${TOP}/scripts/lib.setup and the network-base package for a possibility how to ensure that.
files (optional)
List of files, which will be copied to the target initrd image. Each line consist of '<typ>:<mode>:<uid>:<gid>:<target>:<source>', where
<typ>
defines how <target> will be handled:
f (file)
${TOP}/system/<source> will be copied to /<target>. You may specify f? to tell the mktarget script to siletly ignore this file if <source> does not exists.
d (directory)
/<target> will be created. You may specify d? to tell the mktarget script to siletly ignore the file <source> does not exists.
l (link)
creates a soft link from /<source> to /<target>.
p (pipe)
created a named pipe /<target>
<mode>
filemode if <type> is f,d or p.
<uid>,<gid>
numeric (!) user- and groupid of <target>.
<source>
source path relative to ${TOP}.