website rev 260

en: Update receipts (Ckbk)
author Paul Issott <paul@slitaz.org>
date Tue Jan 27 19:51:26 2009 +0000 (2009-01-27)
parents d89426dcc181
children ddf2f49d6713
files en/doc/cookbook/receipts.html en/doc/cookbook/wok-tools.html
line diff
     1.1 --- a/en/doc/cookbook/receipts.html	Sun Jan 25 11:45:39 2009 +0000
     1.2 +++ b/en/doc/cookbook/receipts.html	Tue Jan 27 19:51:26 2009 +0000
     1.3 @@ -33,9 +33,9 @@
     1.4  
     1.5  <p>
     1.6  This document describes the opportunities offered by the receipt used by 
     1.7 -Tazwok to compile and generate packages for SliTaz and tazpkg through 
     1.8 +Tazwok to compile and generate packages for SliTaz and Tazpkg through 
     1.9  <a href="wok-tools.html">The wok and tools</a>. The receipt for a package is 
    1.10 -also used by tazpkg to install/uninstall and provide information about a 
    1.11 +also used by Tazpkg to install/uninstall and provide information about a 
    1.12  .tazpkg package. Each receipt begins with a comment in English:
    1.13  </p>
    1.14  <pre class="script">
    1.15 @@ -61,12 +61,12 @@
    1.16  <p>
    1.17  Tazwok also knows how to use various optional variables. It can, for example, 
    1.18  use the name of another source package. There are also variables that are 
    1.19 -used by tazpkg to manage dependencies or provide information about the package.
    1.20 +used by Tazpkg to manage dependencies or provide information about the package.
    1.21  </p>
    1.22  <p>
    1.23  <code>$DEPENDS</code>: Set dependencies, there may be several dependencies 
    1.24  seperated by a space or on several lines. This variable is used mainly by 
    1.25 -tazpkg when installing the package and tazwok to build large packages such 
    1.26 +Tazpkg when installing the package and Tazwok to build large packages such 
    1.27  as Xorg. Example for Clex which depends on ncurses:
    1.28  </p>
    1.29  <pre class="script">
    1.30 @@ -74,7 +74,7 @@
    1.31  </pre>
    1.32  <p>
    1.33  <code>$BUILD_DEPENDS</code>: Set compilation dependencies, again seperated 
    1.34 -by a space or several lines. This variable is used by tazwok during the 
    1.35 +by a space or several lines. This variable is used by Tazwok during the 
    1.36  cooking of a package. Example:
    1.37  </p>
    1.38  <pre class="script">
    1.39 @@ -92,7 +92,7 @@
    1.40  <p>
    1.41  <code>$WEB_SITE</code> : The official website of the package. It may be that 
    1.42  some libraries have no website, in this case, there is no need to specify a 
    1.43 -URL. Note tazwok and tazpkg both expect to find a URL with the complete HTTP:
    1.44 +URL. Note Tazwok and Tazpkg both expect to find a URL with the complete HTTP:
    1.45  </p>
    1.46  <pre class="script">
    1.47  WEB_SITE="http://www.clex.sk/"
    1.48 @@ -100,7 +100,7 @@
    1.49  <p>
    1.50  <code>$WGET_URL</code> : URL to download the source file. In general the 
    1.51  variable $TARBALL should be used to facilitate the updating of the package
    1.52 -without changing the $VERSION. Using a configuration file, tazwok also 
    1.53 +without changing the $VERSION. Using a configuration file, Tazwok also 
    1.54  configures by default 3 mirrors: $GNU_MIRROR for the GNU mirror, $SF_MIRROR 
    1.55  for SourceForge and XORG_MIRROR for mirroring the graphical server Xorg. 
    1.56  Example for Clex:
    1.57 @@ -109,25 +109,56 @@
    1.58  WGET_URL="http://www.clex.sk/download/$TARBALL"
    1.59  </pre>
    1.60  <p>
    1.61 +<code>$CONFIG_FILES</code> : Some packages provide customized 
    1.62 +configuration files. The $CONFIG_FILES variable provides a list of these 
    1.63 +files that can be saved by the 'tazpkg repack-config' command. 
    1.64 +These files are not overwritten when reinstalling the package if they already
    1.65 +exist and the package can be successfully recreated with 'tazpkg repack', 
    1.66 +(even if they have been modified since). Netatalk for example:
    1.67 +</p>
    1.68 +<pre class="script"> CONFIG_FILES="/etc/netatalk/AppleVolumes.* /etc/netatalk/*.conf"
    1.69 +</pre>
    1.70 +<p>
    1.71  <code>$WANTED</code> : SliTaz packages normally depend on the compilation of 
    1.72  a source package. Sometimes the receipt of a package requires no compilation 
    1.73  of rules, then $WANTED is used to copy files from the source of another 
    1.74  package by using the variable $ src.
    1.75  </p>
    1.76  <p>
    1.77 -<code>$SOURCE</code> : It may be that the tazpkg package name differs from 
    1.78 -the name of the source package. Example for Xorg packages, the name of tazpkg 
    1.79 +<code>$SOURCE</code> : It may be that the Tazpkg package name differs from 
    1.80 +the name of the source package. Example for Xorg packages, the name of Tazpkg 
    1.81  library X11 is 'xorg-libX11' and the name of the package source is libX11. 
    1.82  $SOURCE allows you to use the variables $src and $_pkg during the cooking of 
    1.83  a package. It should be noted that in the case of libX11, the name of the 
    1.84  source archive becomes $SOURCE-$VERSION.tar.gz.
    1.85  </p>
    1.86  
    1.87 +<h3>Variables automatically generated by Tazwok</h3>
    1.88 +<p>
    1.89 +Certain factors are known only during the cooking of
    1.90 +a package or after the package has been cooked. Tazwok
    1.91 +will add them to the receipt automatically.
    1.92 +</p>
    1.93 +<p>
    1.94 +<code>$PACKED_SIZE</code> : Tazpkg file size.
    1.95 +</p>
    1.96 +<p>
    1.97 +<code>$UNPACKED_SIZE</code> : Space taken up by the package after
    1.98 +installation.
    1.99 +</p>
   1.100 +<p>
   1.101 +<code>$EXTRAVERSION</code> : Some packages have 2 different versions. 
   1.102 +This is in case of modules added to the Linux kernel, such as squashfs, 
   1.103 +because the module depends on the version of the kernel with which it was 
   1.104 +compiled. In this case $EXTRAVERSION contains the kernel version and Tazwok 
   1.105 +determines the module from the contents of /lib/modules.
   1.106 +</p>
   1.107 +
   1.108  <h3>Variables used in functions</h3>
   1.109  <p>
   1.110  Tazwok configures several variables that facilitate the compilation and 
   1.111 -construction of tazpkg packages. These variables are controlled automatically
   1.112 -by tazwok using the information contained in the receipt; they can be used
   1.113 +construction of Tazpkg packages. These variables are controlled automatically
   1.114 +by Tazwok using the information contained in the receipt; they can be used
   1.115  by the functions compile_rules and genpkg_rules described in the chapter 
   1.116  Functions.
   1.117  </p>
   1.118 @@ -137,7 +168,7 @@
   1.119  <p>
   1.120  <code>$_pkg</code> : Defines the path to the compiled binaries installed via 
   1.121  'make DESTDIR=$PWD/_pkg install'. This variable is used to copy the generated 
   1.122 -files and create tazpkg packages.
   1.123 +files and create Tazpkg packages.
   1.124  </p>
   1.125  <p>
   1.126  <code>$fs</code> : Defines the path to the pseudo filesystem (fs) in each 
   1.127 @@ -163,7 +194,7 @@
   1.128  <p>
   1.129  To compile a package you can use the variable $src to move (cd) in the 
   1.130  directory of sources and use $CONFIGURE_ARGS to include arguments from the 
   1.131 -tazwok configuration file. To build the package you usually launch 'make' 
   1.132 +Tazwok configuration file. To build the package you usually launch 'make' 
   1.133  without any arguments, and to install the package into the directory _pkg, 
   1.134  it is necessary to use the command 'make DESTDIR=$PWD/_pkg install'. Generic
   1.135  example:
   1.136 @@ -197,8 +228,8 @@
   1.137  </pre>
   1.138  <h4>pre_install() and post_install()</h4>
   1.139  <p>
   1.140 -These 2 functions are initiated by tazpkg when installing the package. They 
   1.141 -must be defined before generating the .tazpkg package with tazwok. If no rules 
   1.142 +These 2 functions are initiated by Tazpkg when installing the package. They 
   1.143 +must be defined before generating the .tazpkg package with Tazwok. If no rules 
   1.144  are given for these functions, they have no raison d'etre and can be removed.
   1.145  Example using echo to display some text (no function should be empty):
   1.146  </p>
   1.147 @@ -213,6 +244,17 @@
   1.148  	echo "Processing post-install commands..."
   1.149  }
   1.150  </pre>
   1.151 +<h4>clean_wok()</h4>
   1.152 +<p>
   1.153 +This function helps to define additional commands to be run when cleaning the wok, 
   1.154 +it is useful to delete files or directories that are not supported by Tazwok.
   1.155 +</p>
   1.156 +<pre class="script"># clean commands for Tazwok.
   1.157 +clean_wok()
   1.158 +{
   1.159 +	rm -rf $WOK/$PACKAGE/vim71
   1.160 +}
   1.161 +</pre>
   1.162  
   1.163  <!-- End of content -->
   1.164  </div>
     2.1 --- a/en/doc/cookbook/wok-tools.html	Sun Jan 25 11:45:39 2009 +0000
     2.2 +++ b/en/doc/cookbook/wok-tools.html	Tue Jan 27 19:51:26 2009 +0000
     2.3 @@ -38,7 +38,7 @@
     2.4  	<li><a href="#files">Files included or excluded packages.</a></li>
     2.5  	<li><a href="#categories">Categories of packages.</a></li>
     2.6  	<li><a href="#woktree">Structure of packages in the wok.</a></li>
     2.7 -	<li><a href="#pkgtree">Structure of tazpkg package.</a></li>
     2.8 +	<li><a href="#pkgtree">Structure of Tazpkg package.</a></li>
     2.9  	<li><a href="receipts.html">Receipts.</a></li>
    2.10  </ul>
    2.11  
    2.12 @@ -63,7 +63,7 @@
    2.13  <p>
    2.14  The idea is to use a directory (wok) containing all the available packages, each package contains 
    2.15  at least one receipt to download, unpack, compile and generate the binary package. To operate,
    2.16 -tazwok also needs to create a directory to store downloaded sources ($SOURCES_REPOSITORY) and a
    2.17 +Tazwok also needs to create a directory to store downloaded sources ($SOURCES_REPOSITORY) and a
    2.18  repository of generated packages ($PACKAGES_REPOSITORY), these values can be configured using the
    2.19  <code>/etc/tazwok.conf</code> file.
    2.20  </p>
    2.21 @@ -71,7 +71,7 @@
    2.22  <a name="wok"></a>
    2.23  <h3><font color="#6c0023">Wok tools</font></h3>
    2.24  <p>
    2.25 -To begin, tazwok must already be installed
    2.26 +To begin, Tazwok must already be installed
    2.27  on the system and the main development tools (binutils, compiler, libraries-dev, make) must be downloaded.
    2.28  On Slitaz you need to install the meta-package <code>slitaz-toolchain</code>:
    2.29  </p>
    2.30 @@ -94,9 +94,9 @@
    2.31  The archives are also available from the URL: 
    2.32  <a href="ftp://download.tuxfamily.org/slitaz/wok/">ftp://download.tuxfamily.org/slitaz/wok/</a>.
    2.33  Just take the latest version from the cooking or undigest directories. Before compiling your first package,
    2.34 -tazwok must know where to look for the files. By default the path is <code>/home/slitaz/wok</code>,
    2.35 -you can change this or rename the wok you want to download. To view/check tazwok paths that will be used 
    2.36 -and the number of packages in the wok, you can use the tazwok command <code>stats</code>:
    2.37 +Tazwok must know where to look for the files. By default the path is <code>/home/slitaz/wok</code>,
    2.38 +you can change this or rename the wok you want to download. To view/check Tazwok paths that will be used 
    2.39 +and the number of packages in the wok, you can use the Tazwok command <code>stats</code>:
    2.40  </p>
    2.41  <pre> # tazwok stats
    2.42  </pre>
    2.43 @@ -113,7 +113,7 @@
    2.44  <p>
    2.45  Once the work is finished, the package is located in the directory specified by the configuration file
    2.46  (default <code>/home/slitaz/packages</code>). If all went well, you can install the package on the host system
    2.47 -or use it to generate a LiveCD distribution via tazlito. To create a new package you can use <code>new-tree</code> 
    2.48 +or use it to generate a LiveCD distribution via Tazlito. To create a new package you can use <code>new-tree</code> 
    2.49  with the option <code>--interactive</code> and read the documentation on the options provided by the
    2.50  <a href="receipts.html">receipt</a>.
    2.51  </p>
    2.52 @@ -139,7 +139,7 @@
    2.53  <p>
    2.54  The official SliTaz packages are optimized for i486, the optimization arguments used to configure are specified in
    2.55  <code>/etc/tazwok.conf</code> and can be called via the variable <code>$CONFIGURE_ARGS</code>. 
    2.56 -If you want to compile a package with different arguments, you can modify the tazwok configuration file:
    2.57 +If you want to compile a package with different arguments, you can modify the Tazwok configuration file:
    2.58  </p>
    2.59  <pre class="script">CONFIGURE_ARGS="--build=i486-pc-linux-gnu --host=i486-pc-linux-gnu"
    2.60  </pre>
    2.61 @@ -171,22 +171,22 @@
    2.62  <a name="woktree"></a>
    2.63  <h3>Structure of a package in the wok</h3>
    2.64  <p>
    2.65 -The structure of the packages in the wok should always be respected so that tazwok can find the correct files and directories.
    2.66 +The structure of the packages in the wok should always be respected so that Tazwok can find the correct files and directories.
    2.67  Possible contents of a package (note the directory taz/ is created at time of cooking):
    2.68  </p>
    2.69  <ul>
    2.70  	<li><code>stuff/</code> : The material used to configure, compile and generate the package
    2.71  	 (patch(es), Makefile, pseudo fs, etc).</li>
    2.72 -	<li><code>taz/</code> : Directory tree containing the package tazpkg generated, the compressed package is stored
    2.73 -	in the directory specified by $PACKAGES_REPOSITORY in the tazwok configuraton file.</li>
    2.74 +	<li><code>taz/</code> : Directory tree containing the package Tazpkg generated, the compressed package is stored
    2.75 +	in the directory specified by $PACKAGES_REPOSITORY in the Tazwok configuraton file.</li>
    2.76  	<li><code>receipt</code> : The receipt (see 
    2.77  	<a href="receipts.html">receipts</a>).</li>
    2.78 -	<li><code>description.txt</code> : (optional) The description of the package is copied to the root of the tazpkg
    2.79 -	package. Once installed, tazpkg knows how do deal with this file via 'tazpkg desc pkgname'.</li>
    2.80 +	<li><code>description.txt</code> : (optional) The description of the package is copied to the root of the Tazpkg
    2.81 +	package. Once installed, Tazpkg knows how do deal with this file via 'tazpkg desc pkgname'.</li>
    2.82  </ul>
    2.83  
    2.84  <a name="pkgtree"></a>
    2.85 -<h3>Structure of a tazpkg package </h3>
    2.86 +<h3>Structure of a Tazpkg package </h3>
    2.87  <p>
    2.88  The SliTaz packages are cpio archives containing files and a filesystem compressed with gzip:
    2.89  </p>