Buildtool usage

Options

usage: ./buildtool.pl command [pkgname]|[srcname] [...]

commands:
describe [pkgname]|[srcname]      shows description lines of package
[-f] source [pkgname]|[srcname]   downloads, unpacks and patches
                                  the wanted package/source
[-f] build [pkgname]|[srcname]    the same as source, but builds
                                  and installs sources/packages also
[-f] clean [pkgname]|[srcname]    make a 'make clean' in srcdir
[-f] dlclean [pkgname]|[srcname]  remove everything from dldir
[-f] srcclean [pkgname]|[srcname] make a 'make srcclean' in srcdir
distclean                         remove everything
maketar                           make a tar for distribution

The -f switch allows you to force building sourcing and cleaning
even if it seems the packages/sources are already installed or cleaned.

Getting information about the sources that can be built

Buildtool can only build sources/packages that it has a configuration for (see the next chapter on how to create such a configuration). To get a listing about the sources that are configured for buildtool type

 ./buildtool.pl describe

This will give you a list (and a short description) of all sources/packages that can be built. An example output looks like this:

 ./buildtool.pl describe
 
 The following packages and sources are available:
 
 Sources:
 ---------------------------------------------------------
 openssh          openssh
 tcp_wrappers     Wietse Venema's TCP wrappers library
 helloworld       classical example
 openssl          Secure Sockets Layer and cryptography 
                  libraries and tools
 zlib             zLib shared libraries
 linux            kernel source only package
 
 Packages:
 ---------------------------------------------------------
 buildenv         this holds everything to build cross build env
 kernel           kernel pseudo package

The difference between sources and packages

You might be a bit confused why in the above output there are Sources and Packages. The main reason for having sources and packages separately is that there are some sources out there that produce programs used in several packages. Or in other words, it sometimes makes sense to just build the sources (like util-linux for example) only once and create several packages out of the resulting binaries.

Downloading the sources for a package

Running

./buildtool.pl source somepackageName

will cause the sources of somepackageName to be downloaded (and before that, all its dependencies, if there are any that haven't been downloaded yet). After that, the makefile buildtool.mk for this source is executed for target source. This has the effect that the sources will be extracted, and patches (if there are any) are applied.

If all this is completed without error, the sources of somepackageName are ready to be compiled.

Compiling the sources for a package

Running

./buildtool.pl build somepackageName

will cause buildtool to actually compile the source and install it to the build directory (and all its dependencies). After this is completed successfully, all binaries required for the lrp package (linked against uClibc) reside in the build directory.