Wok & Tools

Overview - Tazwok and the wok

The idea is to use a directory (wok) containing all the available packages, each package contains at least one receipt to download, unpack, compile and generate the binary package. To operate, tazwok also needs to create a directory to store downloaded sources ($SOURCES_REPOSITORY) and a repository of generated packages ($PACKAGES_REPOSITORY), these values can be configured using the /etc/tazwok.conf file.

Wok tools

To begin, tazwok must already be installed on the system and the main development tools (binutils, compiler, libraries-dev, make) must be downloaded. On Slitaz you need to install the meta-package slitaz-toolchain:

 # tazpkg recharge
 # tazpkg get-install slitaz-toolchain

Get the wok

Before working it is necessary to recover the wok from the Mercurial repositories or an archive of the primary mirror (TuxFamily). Example using SliTaz to be built in /home/slitaz:

 $ hg clone http://hg.slitaz.org/wok/ /home/slitaz/wok

The archives are also available from the URL: ftp://download.tuxfamily.org/slitaz/wok/. Just take the latest version from the cooking or undigest directories. Before compiling your first package, tazwok must know where to look for the files. By default the path is /home/slitaz/wok, you can change this or rename the wok you want to download. To view/check tazwok paths that will be used and the number of packages in the wok, you can use the tazwok command stats:

 # tazwok stats

Compile and generate packages

Configure, compile, strip.., The way SliTaz generates a package can be put into a single command. To avoid frustration, it is advisable to begin to build your package without changing it's receipt or seeking dependancies. M4 is an ideal candidate for your first cook:

 # tazwok cook m4

Once the work is finished, the package is located in the directory specified by the configuration file (default /home/slitaz/packages). If all went well, you can install the package on the host system or use it to generate a LiveCD distribution via tazlito. To create a new package you can use new-tree with the option --interactive and read the documentation on the options provided by the receipt.

Cook-list - List of cooking

To compile several packages with a single command, you can use a cooking list. There are example lists in usr/share/examples/tazwok/cooklists on SliTaz, these are just text files with a package put on every line. Cook-list example using mypkgs.cooklist:

 # tazwok cook-list mypkgs.cooklist

Options during compilation of package

You are free to use any options you want, it is necessary to respect the FSH, the docs in /usr/share/doc and follow the Freedesktop standards (.desktop). Then it's just a question of choice, for example you can disable support for XML, have smaller binaries for PHP and get rid of libxml2, but in the case of PHP, it's not worth the cost in terms of loss of functionality. If you have any doubts, look at the receipts and compiler options in compile_rules.

Optimization

The official SliTaz packages are optimized for i486, the optimization arguments used to configure are specified in /etc/tazwok.conf and can be called via the variable $CONFIGURE_ARGS. If you want to compile a package with different arguments, you can modify the tazwok configuration file:

CONFIGURE_ARGS="--build=i486-pc-linux-gnu --host=i486-pc-linux-gnu"

Files included or excluded packages

Generally the base packages contain no man, info, doc or static libraries, we have to create them via a package-doc or a package-dev. Note that SliTaz is not intending to use the man or info command, so there's no manual or GNU info file. The creation of packages containing docs is really optional, especially if the material is in English (I say). By contrast a piece of text on the package in the Handbook is more appreciated.

In terms of configuration, whenever possible, the aim is to offer basic configuration files to run the package directly. In the case of the web server LightTPD package, SliTaz supplies configuration files and startup scripts located in /etc/init.d (documented in the Handbook). For a new package, you are free to choose it's default configuration depending on what you think is easiest for the end user. On SliTaz you have /usr/share/examples for example configurations and other kinds of useful infomation.

Categories of packages

The categories of packages exist only for informational purposes and are not fixed, the idea is to classify packages so that a web page can be generated each night recovering data in the package receipt. For the short term, place developement packages in 'devel', Xorg in 'x-window' and the variety of new packages in 'extra'

Structure of a package in the wok

The structure of the packages in the wok should always be respected so that tazwok can find the correct files and directories. Possible contents of a package (note the directory taz/ is created at time of cooking):

Structure of a tazpkg package

The SliTaz packages are cpio archives containing files and a filesystem compressed with gzip:

Copyright © 2008 SliTaz - GNU General Public License;
Documentation is under GNU Free Documentation License and code is valid xHTML 1.0.