# HG changeset patch # User Paul Issott # Date 1233085886 0 # Node ID c4560318bd052303f298c5c4626b6dfc9b2f6a78 # Parent d89426dcc1810395445c55a404afa6b09286bbb5 en: Update receipts (Ckbk) diff -r d89426dcc181 -r c4560318bd05 en/doc/cookbook/receipts.html --- a/en/doc/cookbook/receipts.html Sun Jan 25 11:45:39 2009 +0000 +++ b/en/doc/cookbook/receipts.html Tue Jan 27 19:51:26 2009 +0000 @@ -33,9 +33,9 @@

This document describes the opportunities offered by the receipt used by -Tazwok to compile and generate packages for SliTaz and tazpkg through +Tazwok to compile and generate packages for SliTaz and Tazpkg through The wok and tools. The receipt for a package is -also used by tazpkg to install/uninstall and provide information about a +also used by Tazpkg to install/uninstall and provide information about a .tazpkg package. Each receipt begins with a comment in English:

@@ -61,12 +61,12 @@
 

Tazwok also knows how to use various optional variables. It can, for example, use the name of another source package. There are also variables that are -used by tazpkg to manage dependencies or provide information about the package. +used by Tazpkg to manage dependencies or provide information about the package.

$DEPENDS: Set dependencies, there may be several dependencies seperated by a space or on several lines. This variable is used mainly by -tazpkg when installing the package and tazwok to build large packages such +Tazpkg when installing the package and Tazwok to build large packages such as Xorg. Example for Clex which depends on ncurses:

@@ -74,7 +74,7 @@
 

$BUILD_DEPENDS: Set compilation dependencies, again seperated -by a space or several lines. This variable is used by tazwok during the +by a space or several lines. This variable is used by Tazwok during the cooking of a package. Example:

@@ -92,7 +92,7 @@
 

$WEB_SITE : The official website of the package. It may be that some libraries have no website, in this case, there is no need to specify a -URL. Note tazwok and tazpkg both expect to find a URL with the complete HTTP: +URL. Note Tazwok and Tazpkg both expect to find a URL with the complete HTTP:

 WEB_SITE="http://www.clex.sk/"
@@ -100,7 +100,7 @@
 

$WGET_URL : URL to download the source file. In general the variable $TARBALL should be used to facilitate the updating of the package -without changing the $VERSION. Using a configuration file, tazwok also +without changing the $VERSION. Using a configuration file, Tazwok also configures by default 3 mirrors: $GNU_MIRROR for the GNU mirror, $SF_MIRROR for SourceForge and XORG_MIRROR for mirroring the graphical server Xorg. Example for Clex: @@ -109,25 +109,56 @@ WGET_URL="http://www.clex.sk/download/$TARBALL"

+$CONFIG_FILES : Some packages provide customized +configuration files. The $CONFIG_FILES variable provides a list of these +files that can be saved by the 'tazpkg repack-config' command. +These files are not overwritten when reinstalling the package if they already +exist and the package can be successfully recreated with 'tazpkg repack', +(even if they have been modified since). Netatalk for example: +

+
 CONFIG_FILES="/etc/netatalk/AppleVolumes.* /etc/netatalk/*.conf"
+
+

$WANTED : SliTaz packages normally depend on the compilation of a source package. Sometimes the receipt of a package requires no compilation of rules, then $WANTED is used to copy files from the source of another package by using the variable $ src.

-$SOURCE : It may be that the tazpkg package name differs from -the name of the source package. Example for Xorg packages, the name of tazpkg +$SOURCE : It may be that the Tazpkg package name differs from +the name of the source package. Example for Xorg packages, the name of Tazpkg library X11 is 'xorg-libX11' and the name of the package source is libX11. $SOURCE allows you to use the variables $src and $_pkg during the cooking of a package. It should be noted that in the case of libX11, the name of the source archive becomes $SOURCE-$VERSION.tar.gz.

+

Variables automatically generated by Tazwok

+

+Certain factors are known only during the cooking of +a package or after the package has been cooked. Tazwok +will add them to the receipt automatically. +

+

+$PACKED_SIZE : Tazpkg file size. +

+

+$UNPACKED_SIZE : Space taken up by the package after +installation. +

+

+$EXTRAVERSION : Some packages have 2 different versions. +This is in case of modules added to the Linux kernel, such as squashfs, +because the module depends on the version of the kernel with which it was +compiled. In this case $EXTRAVERSION contains the kernel version and Tazwok +determines the module from the contents of /lib/modules. +

+

Variables used in functions

Tazwok configures several variables that facilitate the compilation and -construction of tazpkg packages. These variables are controlled automatically -by tazwok using the information contained in the receipt; they can be used +construction of Tazpkg packages. These variables are controlled automatically +by Tazwok using the information contained in the receipt; they can be used by the functions compile_rules and genpkg_rules described in the chapter Functions.

@@ -137,7 +168,7 @@

$_pkg : Defines the path to the compiled binaries installed via 'make DESTDIR=$PWD/_pkg install'. This variable is used to copy the generated -files and create tazpkg packages. +files and create Tazpkg packages.

$fs : Defines the path to the pseudo filesystem (fs) in each @@ -163,7 +194,7 @@

To compile a package you can use the variable $src to move (cd) in the directory of sources and use $CONFIGURE_ARGS to include arguments from the -tazwok configuration file. To build the package you usually launch 'make' +Tazwok configuration file. To build the package you usually launch 'make' without any arguments, and to install the package into the directory _pkg, it is necessary to use the command 'make DESTDIR=$PWD/_pkg install'. Generic example: @@ -197,8 +228,8 @@

pre_install() and post_install()

-These 2 functions are initiated by tazpkg when installing the package. They -must be defined before generating the .tazpkg package with tazwok. If no rules +These 2 functions are initiated by Tazpkg when installing the package. They +must be defined before generating the .tazpkg package with Tazwok. If no rules are given for these functions, they have no raison d'etre and can be removed. Example using echo to display some text (no function should be empty):

@@ -213,6 +244,17 @@ echo "Processing post-install commands..." }
+

clean_wok()

+

+This function helps to define additional commands to be run when cleaning the wok, +it is useful to delete files or directories that are not supported by Tazwok. +

+
# clean commands for Tazwok.
+clean_wok()
+{
+	rm -rf $WOK/$PACKAGE/vim71
+}
+
diff -r d89426dcc181 -r c4560318bd05 en/doc/cookbook/wok-tools.html --- a/en/doc/cookbook/wok-tools.html Sun Jan 25 11:45:39 2009 +0000 +++ b/en/doc/cookbook/wok-tools.html Tue Jan 27 19:51:26 2009 +0000 @@ -38,7 +38,7 @@
  • Files included or excluded packages.
  • Categories of packages.
  • Structure of packages in the wok.
  • -
  • Structure of tazpkg package.
  • +
  • Structure of Tazpkg package.
  • Receipts.
  • @@ -63,7 +63,7 @@

    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 +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.

    @@ -71,7 +71,7 @@

    Wok tools

    -To begin, tazwok must already be installed +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:

    @@ -94,9 +94,9 @@ 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 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
     
    @@ -113,7 +113,7 @@

    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 +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.

    @@ -139,7 +139,7 @@

    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: +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"
     
    @@ -171,22 +171,22 @@

    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. +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

    +

    Structure of a Tazpkg package

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