website diff en/doc/cookbook/receipts.html @ 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 9e30e64c8198
children 0bc764c2ffaf
line diff
     1.1 --- a/en/doc/cookbook/receipts.html	Sat Jul 19 16:23:18 2008 +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>