tukbuild is a tool for building packages for Slackware and some Slackware-based distributions. tukbuild is no longer developed, but it should still work as is on recent Slackware versions.
tukbuild was written, because the traditional SlackBuild scripts duplicate commonly needed things like stripping binaries into every SlackBuild, which make things more cumbersome and more prone to errors. TukBuild files use shared functions from the tukbuild tool, so the actual build script files contain only the package-specific definitions and commands.
- Automatically create and delete temporary directories. There is an option to leave the temporary files in place too.
- Compress man pages and info files automatically. This includes making man page symlinks to point to the compressed files, and converting man pages containing only ".so" commands to symlinks.
- Strip binaries unless told otherwise.
- Many packages don't need any special permissions for files, so it is easy to reset all files and directories to be owned by root:root and permissions to 0755 or 0644.
- Possibility to create and install a temporary package in the middle of packaging process eases combining small source packages into a single package.
- Building is aborted if any command fails. This makes it more likely that errors don't go undetected.
- Can download source packages and verify their MD5 or SHA-1 hash.
- Package description can be put into a text file without prefixing every line with the package name. tukbuild checks the line count and line lengths, and then creates proper slack-desc from it.
- Single build script can be used to create multiple packages, so that a big package (e.g. GCC) can be split nicely.
tukbuild version 2.39
There is no documentation other than the comments in the tukbuild tool, which are worth reading when learning to use tukbuild. There are also a couple of example files left from the days of the Tukaani distribution, which should give you a good idea of the basics of TukBuild files.