website rev 21

Add the first 2 page to the English Cookbook (Thanks Paul!)
author Christophe Lincoln <pankso@slitaz.org>
date Sat Apr 12 03:04:41 2008 +0200 (2008-04-12)
parents 2c4b45efa647
children eaea1e0302dc
files devel/index.html en/devel/index.html en/doc/cookbook/book.css en/doc/cookbook/favicon.ico en/doc/cookbook/images/css/Thumbs.db en/doc/cookbook/images/css/content-tl.png en/doc/cookbook/images/css/content-tr.png en/doc/cookbook/images/css/footer-bl.png en/doc/cookbook/images/css/footer-br.png en/doc/cookbook/images/css/header.png en/doc/cookbook/index.html en/doc/cookbook/receipts.html en/doc/cookbook/template.html en/doc/cookbook/wok-tools.html en/doc/index.html
line diff
     1.1 --- a/devel/index.html	Fri Apr 11 21:57:21 2008 +0000
     1.2 +++ b/devel/index.html	Sat Apr 12 03:04:41 2008 +0200
     1.3 @@ -75,9 +75,9 @@
     1.4      <li><a href="../doc/cookbook/wok-tools.html">Wok &amp; Tools</a> -
     1.5      La doc au sujet de l'utilisation du wok et des outils SliTaz pour
     1.6      développeurs.</li>
     1.7 -    <li>Mercurial repositories : <a href="http://hg.slitaz.org" >hg.slitaz.org</a></li>
     1.8 -    <li>Scratchpad : <a href="http://wiki.slitaz.org/">wiki.slitaz.org</a></li>
     1.9 -    <li>Stats : <a href="http://stats.download.tuxfamily.org/slitaz/"
    1.10 +    <li>Mercurial repositories: <a href="http://hg.slitaz.org" >hg.slitaz.org</a></li>
    1.11 +    <li>Scratchpad: <a href="http://wiki.slitaz.org/">wiki.slitaz.org</a></li>
    1.12 +    <li>Stats: <a href="http://stats.download.tuxfamily.org/slitaz/"
    1.13      >Téléchargements sur TuxFamily.</a></li>
    1.14  </ul>
    1.15  
     2.1 --- a/en/devel/index.html	Fri Apr 11 21:57:21 2008 +0000
     2.2 +++ b/en/devel/index.html	Sat Apr 12 03:04:41 2008 +0200
     2.3 @@ -9,7 +9,7 @@
     2.4      <meta name="robots" content="index, follow, all" />
     2.5      <meta name="revisit-after" content="7 days" />
     2.6      <meta name="expires" content="never" />
     2.7 -    <meta name="modified" content="2008-03-25 23:30:00" />
     2.8 +    <meta name="modified" content="2008-04-12 23:30:00" />
     2.9      <meta name="author" content="Christophe Lincoln"/>
    2.10      <meta name="publisher" content="www.slitaz.org" />
    2.11      <link rel="shortcut icon" href="../../favicon.ico" />
    2.12 @@ -65,6 +65,10 @@
    2.13  	<li><a href="#repos">Mercurial repositories.</a></li>
    2.14  	<li><a href="#pkgs">Tazpkg packages.</a></li>
    2.15  	<li><a href="#website">Website Management.</a></li>
    2.16 +	<li><a href="../mailing-list.html">Mailing List.</a></li>
    2.17 +	<li><a href="../doc/cookbook/wok-tools.html">Wok &amp; Tools.</a></li>
    2.18 +	<li>Hg repositories: <a href="http://hg.slitaz.org" >hg.slitaz.org</a></li>
    2.19 +    <li>Scratchpad: <a href="http://wiki.slitaz.org/">wiki.slitaz.org</a></li>
    2.20  </ul>
    2.21  
    2.22  <p>
    2.23 @@ -142,8 +146,8 @@
    2.24  <p>
    2.25  The packages tazpkg in SliTaz are automatically created via Tazwok and a 
    2.26  receipt in the wok, the Cookbook describes the 
    2.27 -<a href="http://www.slitaz.org/doc/cookbook/wok-tools.html">use of tools (fr)</a> 
    2.28 -and the format <a href="http://www.slitaz.org/doc/cookbook/receipts.html">receipts (fr)</a>,
    2.29 +<a href="../doc/cookbook/wok-tools.html">use of tools</a> 
    2.30 +and the format <a href="../doc/cookbook/receipts.html">receipts</a>,
    2.31  These are required reading before we begin.
    2.32  </p>
    2.33  <p>
    2.34 @@ -161,7 +165,7 @@
    2.35  work doesn't already exist in the wok indigest provided by the primary SliTaz
    2.36  mirror. Don't forget that the members of the list are there to help you
    2.37  and that the documentation of the 
    2.38 -<a href="http://www.slitaz.org/doc/cookbook/wok-tools.html">wok and tools (fr)</a> 
    2.39 +<a href="../doc/cookbook/wok-tools.html">wok and tools</a> 
    2.40  exists to help you get started.
    2.41  </p>
    2.42  
    2.43 @@ -214,7 +218,7 @@
    2.44  <!-- Start of footer and copy notice -->
    2.45  <div id="copy">
    2.46  <p>
    2.47 -Last modification : 2008-03-25 23:30:00 -
    2.48 +Last modification : 2008-04-12 23:30:00 -
    2.49  <a href="#top">Top of the page</a>
    2.50  </p>
    2.51  <p>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/en/doc/cookbook/book.css	Sat Apr 12 03:04:41 2008 +0200
     3.3 @@ -0,0 +1,170 @@
     3.4 +/* 
     3.5 +	CSS style for SliTaz GNU/Linux *book.
     3.6 +	Pankso 2007 - www.slitaz.org
     3.7 +*/
     3.8 +
     3.9 +body {
    3.10 +	font: 13px sans-serif, vernada, arial;
    3.11 +	background: #222222;
    3.12 +	margin: 0;
    3.13 +	padding-bottom: 100%;
    3.14 +}
    3.15 +
    3.16 +#header {
    3.17 +	background: #BFB06B url(images/css/header.png) repeat-x top;
    3.18 +	color: black;
    3.19 +	height: 50px;
    3.20 +	border-top: 1px solid black;
    3.21 +	border-bottom: 1px solid black;
    3.22 +}
    3.23 +#quicknav {
    3.24 +	margin-right: 6px;
    3.25 +	text-align: right;
    3.26 +	font-size: 12px;
    3.27 +	}
    3.28 +#quicknav {
    3.29 +	margin-right: 6px;
    3.30 +}
    3.31 +
    3.32 +#quicknav a {
    3.33 +	background: inherit;
    3.34 +	color: #222222;
    3.35 +}
    3.36 +
    3.37 +#quicknav a:hover {
    3.38 +	background: inherit;
    3.39 +	color: #EDEDED;
    3.40 +}
    3.41 +
    3.42 +/*  content. */
    3.43 +
    3.44 +#content {
    3.45 +	background: white url(images/css/content-tl.png) no-repeat top left;
    3.46 +	color: black;
    3.47 +	padding: 20px;
    3.48 +	margin: 30px 50px 0px 50px;
    3.49 +	width: auto;
    3.50 +	text-align: justify;
    3.51 +}
    3.52 +
    3.53 +#content li {
    3.54 +	line-height: 1.5em;
    3.55 +	text-align: left;
    3.56 +}
    3.57 +
    3.58 +/*  Footer. */
    3.59 +
    3.60 +#footer {
    3.61 +	font-size: 11px;
    3.62 +	font-weight: bold;
    3.63 +	background: #eaeaea url(images/css/footer-bl.png) no-repeat bottom left;
    3.64 +	color: black;
    3.65 +	height: 20px;
    3.66 +	padding: 6px 0px 0px 10px;
    3.67 +	margin: 0px 50px 0px 50px;
    3.68 +	width: auto;
    3.69 +	text-align: center ;
    3.70 +}
    3.71 +
    3.72 +#footer a {
    3.73 +	text-decoration: none;
    3.74 +	background: #eaeaea;
    3.75 +	color: #3E1220;
    3.76 +}
    3.77 +
    3.78 +#footer a:hover {
    3.79 +	background: #eaeaea;
    3.80 +	color: #DF8F06;
    3.81 +}
    3.82 +
    3.83 +/* Legal informations */
    3.84 +
    3.85 +#copy {
    3.86 +	font-size: 11px ;
    3.87 +	text-align: center ;
    3.88 +	background: transparent;
    3.89 +	color: #a8a8a8;
    3.90 +	padding-top: 20px;
    3.91 +}
    3.92 +
    3.93 +#copy a {
    3.94 +	background: inherit;
    3.95 +	color: #a8a8a8;
    3.96 +}
    3.97 +
    3.98 +#copy a:hover {
    3.99 +	background: inherit;
   3.100 +	color: #EDEDED;
   3.101 +}
   3.102 +
   3.103 +/* Div for round corners. */
   3.104 +
   3.105 +.content-right, .footer-right {
   3.106 +	width: 16px;
   3.107 +	color: white;
   3.108 +	background-color: #333333;
   3.109 +}
   3.110 +.content-right {
   3.111 +	background: url(images/css/content-tr.png) no-repeat top right;
   3.112 +	height: 16px;
   3.113 +	right: 50px;
   3.114 +	top: 82px;
   3.115 +	position: absolute;
   3.116 +}
   3.117 +
   3.118 +.footer-right {
   3.119 +	background: url(images/css/footer-br.png) no-repeat bottom right;
   3.120 +	height: 20px;
   3.121 +	float: right;
   3.122 +}
   3.123 +
   3.124 +/* General HTML entities for  content. */
   3.125 +
   3.126 +h1 {
   3.127 +	margin: 0px 0px 0px 16px;
   3.128 +}
   3.129 +
   3.130 +h2 {
   3.131 +	margin: 12px 0;
   3.132 +	color: #484B7C;
   3.133 +	background: white;
   3.134 +}
   3.135 +
   3.136 +h3 {
   3.137 +	font-weight: bold;
   3.138 +	color: #6c0023;
   3.139 +	background: white;
   3.140 +}
   3.141 +
   3.142 +a {
   3.143 +	text-decoration: underline;
   3.144 +}
   3.145 +a:hover {
   3.146 +	text-decoration: none;
   3.147 +}
   3.148 +
   3.149 +pre {
   3.150 +	padding: 5px;
   3.151 +	color: black;
   3.152 +	background: #e1e0b0;
   3.153 +}
   3.154 +pre.script {
   3.155 +	padding: 10px;
   3.156 +	color: black;
   3.157 +	background: #e8e8e8;
   3.158 +	border: 1px inset #333333;
   3.159 +}
   3.160 +
   3.161 +code {
   3.162 +	font-size: 12px;
   3.163 +	color: #669900;
   3.164 +	background: transparent;
   3.165 +}
   3.166 +
   3.167 +li {
   3.168 +	line-height: 1.4em;
   3.169 +}
   3.170 +
   3.171 +hr {
   3.172 +	border: 0pt none;
   3.173 +}
     4.1 Binary file en/doc/cookbook/favicon.ico has changed
     5.1 Binary file en/doc/cookbook/images/css/Thumbs.db has changed
     6.1 Binary file en/doc/cookbook/images/css/content-tl.png has changed
     7.1 Binary file en/doc/cookbook/images/css/content-tr.png has changed
     8.1 Binary file en/doc/cookbook/images/css/footer-bl.png has changed
     9.1 Binary file en/doc/cookbook/images/css/footer-br.png has changed
    10.1 Binary file en/doc/cookbook/images/css/header.png has changed
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/en/doc/cookbook/index.html	Sat Apr 12 03:04:41 2008 +0200
    11.3 @@ -0,0 +1,57 @@
    11.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    11.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    11.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    11.7 +<head>
    11.8 +    <title>SliTaz Cookbook (en)</title>
    11.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   11.10 +    <meta name="description" content="slitaz English cookbook" />
   11.11 +    <meta name="expires" content="never" />
   11.12 +    <meta name="modified" content="2008-02-26 18:30:00" />
   11.13 +    <meta name="publisher" content="www.slitaz.org" />
   11.14 +    <meta name="author" content="Christophe Lincoln"/>
   11.15 +    <link rel="shortcut icon" href="favicon.ico" />
   11.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   11.17 +</head>
   11.18 +<body bgcolor="#ffffff">
   11.19 +
   11.20 +<!-- Header and quick navigation -->
   11.21 +<div id="header">
   11.22 +<div align="right" id="quicknav">
   11.23 +    <a name="top"></a>
   11.24 +    <a href="http://www.slitaz.org/en/doc/">Website documentation</a>
   11.25 +</div>
   11.26 +<h1><font color="#3E1220">SliTaz Cookbook (en)</font></h1>
   11.27 +</div>
   11.28 +
   11.29 +<!-- Content. -->
   11.30 +<div id="content">
   11.31 +<div class="content-right"></div>
   11.32 +
   11.33 +<h2><font color="#DF8F06">Developers documenation</font></h2>
   11.34 +
   11.35 +<ul>
   11.36 +	<li><a href="wok-tools.html">Wok &amp; Tools.</a></li>
   11.37 +	<li><a href="receipts.html">Receipts.</a></li>
   11.38 +</ul>
   11.39 +
   11.40 +
   11.41 +<!-- End of content -->
   11.42 +</div>
   11.43 +
   11.44 +<!-- Footer. -->
   11.45 +<div id="footer">
   11.46 +	<div class="footer-right"></div>
   11.47 +	<a href="#top">Top of the page</a> | 
   11.48 +	<a href="index.html">Table of contents</a>
   11.49 +</div>
   11.50 +
   11.51 +<div id="copy">
   11.52 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   11.53 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   11.54 +    Documentation is under
   11.55 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   11.56 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   11.57 +</div>
   11.58 +
   11.59 +</body>
   11.60 +</html>
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/en/doc/cookbook/receipts.html	Sat Apr 12 03:04:41 2008 +0200
    12.3 @@ -0,0 +1,236 @@
    12.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    12.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    12.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    12.7 +<head>
    12.8 +    <title>SliTaz Cookbook (en) - Receipts</title>
    12.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   12.10 +    <meta name="description" content="slitaz English cookbook" />
   12.11 +    <meta name="expires" content="never" />
   12.12 +    <meta name="modified" content="2008-02-26 18:30:00" />
   12.13 +    <meta name="publisher" content="www.slitaz.org" />
   12.14 +    <meta name="author" content="Christophe Lincoln"/>
   12.15 +    <link rel="shortcut icon" href="favicon.ico" />
   12.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   12.17 +</head>
   12.18 +<body bgcolor="#ffffff">
   12.19 +
   12.20 +<!-- Header and quick navigation -->
   12.21 +<div id="header">
   12.22 +<div align="right" id="quicknav">
   12.23 +    <a name="top"></a>
   12.24 +    <a href="wok-tools.html">Wok &amp; Tools.</a> |
   12.25 +    <a href="index.html">Table of contents</a>
   12.26 +</div>
   12.27 +<h1><font color="#3E1220">SliTaz Cookbook (en)</font></h1>
   12.28 +</div>
   12.29 +
   12.30 +<!-- Content. -->
   12.31 +<div id="content">
   12.32 +<div class="content-right"></div>
   12.33 +
   12.34 +
   12.35 +<h2><font color="#df8f06">Receipts</font></h2>
   12.36 +
   12.37 +<p>
   12.38 +This document describes the opportunities offered by the receipt used by 
   12.39 +Tazwok to compile and generate packages for SliTaz and tazpkg through 
   12.40 +<a href="wok-tools.html">The wok and tools</a>. The receipt for a package is 
   12.41 +also used by tazpkg to install/uninstall and provide information about a 
   12.42 +.tazpkg package. Each receipt begins with a comment in English:
   12.43 +</p>
   12.44 +<pre class="script">
   12.45 +# SliTaz package receipt.
   12.46 +</pre>
   12.47 +
   12.48 +<h3>Variables</h3>
   12.49 +<p>
   12.50 +The first 5 variables should always be present and defined. They respectively 
   12.51 +configure the package ($PACKAGE), it's version, it's category, a short 
   12.52 +description and the name of the maintainer. Example for the package, file 
   12.53 +manager Clex:
   12.54 +</p>
   12.55 +<pre class="script">
   12.56 +PACKAGE="clex"
   12.57 +VERSION="3.16"
   12.58 +CATEGORY="base-apps"
   12.59 +SHORT_DESC="Text mode file manager."
   12.60 +MAINTAINER="pankso@slitaz.org"
   12.61 +</pre>
   12.62 +
   12.63 +<h3>Variables (optional)</h3>
   12.64 +<p>
   12.65 +Tazwok also knows how to use various optional variables, it can for example 
   12.66 +use the name of another source package. There are also variables that are 
   12.67 +used by tazpkg to manage dependencies or provide information about the package.
   12.68 +</p>
   12.69 +<p>
   12.70 +<code>$DEPENDS</code>: Set dependencies, there may be several dependencies 
   12.71 +seperated by a space or on several lines. This variable is used mainly by 
   12.72 +tazpkg when installing the package and tazwok to build large packages such 
   12.73 +as Xorg. Example for Clex which depends on ncurses:
   12.74 +</p>
   12.75 +<pre class="script">
   12.76 +DEPENDS="ncurses"
   12.77 +</pre>
   12.78 +<p>
   12.79 +<code>$BUILD_DEPENDS</code>: Set compilation dependencies, again seperated 
   12.80 +by a space or several lines. This variable is used by tazwok during the 
   12.81 +cooking of a package. Example:
   12.82 +</p>
   12.83 +<pre class="script">
   12.84 +BUILD_DEPENDS="ncurses-dev"
   12.85 +</pre>
   12.86 +<p>
   12.87 +<code>$TARBALL</code> : The archive is a source with the extension (tar.gz, 
   12.88 +tgz or tar.bz2). In general, the variables $PACKAGE and $VERSION are used to 
   12.89 +just change the extension, it helps to upgrade the package without changing 
   12.90 +the $VERSION variable. Generic example (see also $SOURCE example):
   12.91 +</p>
   12.92 +<pre class="script">
   12.93 +TARBALL="$PACKAGE-$VERSION.tar.gz"
   12.94 +</pre>
   12.95 +<p>
   12.96 +<code>$WEB_SITE</code> : The official website of the package. It may be that 
   12.97 +some libraries have no website, in this case, there is no need to specify a 
   12.98 +URL. Note tazwok and tazpkg both expect to find a URL with the complete HTTP:
   12.99 +</p>
  12.100 +<pre class="script">
  12.101 +WEB_SITE="http://www.clex.sk/"
  12.102 +</pre>
  12.103 +<p>
  12.104 +<code>$WGET_URL</code> : URL to download the source file. In general the 
  12.105 +variable $TARBALL should be used to facilitate the updating of the package
  12.106 +without changing the $VERSION. Using a configuration file, tazwok also 
  12.107 +configures by default 3 mirrors: $GNU_MIRROR for the GNU mirror, $SF_MIRROR 
  12.108 +for SourceForge and XORG_MIRROR for mirroring the graphical server Xorg. 
  12.109 +Example for Clex:
  12.110 +</p>
  12.111 +<pre class="script">
  12.112 +WGET_URL="http://www.clex.sk/download/$TARBALL"
  12.113 +</pre>
  12.114 +<p>
  12.115 +<code>$WANTED</code> : SliTaz packages normally depend on the compilation of 
  12.116 +a source package. Sometimes the receipt of a package requires no compilation 
  12.117 +of rules, then $WANTED is used to copy files from the source of another 
  12.118 +package by using the variable $ src.
  12.119 +</p>
  12.120 +<p>
  12.121 +<code>$SOURCE</code> : It may be that the tazpkg package name differs from 
  12.122 +the name of the source package. Example for Xorg packages, the name of tazpkg 
  12.123 +library X11 is 'xorg-libX11' and the name of the package source is libX11. 
  12.124 +$SOURCE allows you to use the variables $src and $_pkg during the cooking of 
  12.125 +a package. It should be noted that in the case of libX11, the name of the 
  12.126 +source archive becomes $SOURCE-$VERSION.tar.gz.
  12.127 +</p>
  12.128 +
  12.129 +<h3>Variables used in functions</h3>
  12.130 +<p>
  12.131 +Tazwok configures several variables that facilitate the compilation and 
  12.132 +construction of tazpkg packages. These variables are controlled automatically
  12.133 +by tazwok using the information contained in the receipt; they can be used
  12.134 +by the functions compile_rules and genpkg_rules described in the chapter 
  12.135 +Functions.
  12.136 +</p>
  12.137 +<p>
  12.138 +<code>$src</code> : Defines the path to the directory of unarchived sources.
  12.139 +</p>
  12.140 +<p>
  12.141 +<code>$_pkg</code> : Defines the path to the binary compiles installed via 
  12.142 +'make DESTDIR=$PWD/_pkg install'. This variable is used to copy the generated 
  12.143 +files and create tazpkg packages.
  12.144 +</p>
  12.145 +<p>
  12.146 +<code>$fs</code> : Defines the path to the pseudo filesystem (fs) in each 
  12.147 +package. The 'fs' of the package corresponds to the root of the system, a bit
  12.148 +like Clex will for example in $fs/usr/bin/clex, note the need to create the 
  12.149 +necessary directories via function genpkg_rules() before copying the files.
  12.150 +</p>
  12.151 +<p>
  12.152 +<code>$CONFIGURE_ARGS</code> : This variable is defined in the Tazwok 
  12.153 +configuration file (tazwok.conf), it allows you to specify generic optimization
  12.154 +arguments during construction of a package. Default is the i486 architecture.
  12.155 +</p>
  12.156 +
  12.157 +<h3>Functions</h3>
  12.158 +<p>
  12.159 +A receipt may contain 4 functions. Tazwok knows how to deal with functions 
  12.160 +containing compilation rules (compile_rules) and rules used to generate a 
  12.161 +package (genpkg_rules). These functions may contain all sorts of GNU/Linux 
  12.162 +standard commands, such as sed, awk, patch and variables automatically 
  12.163 +configured.
  12.164 +</p>
  12.165 +<h4>compile_rules()</h4>
  12.166 +<p>
  12.167 +To compile a package you can use the variable $src to move (cd) in the 
  12.168 +directory of sources and use $CONFIGURE_ARGS to include arguments from the 
  12.169 +tazwok configuration file. To build the package you usually launch 'make' 
  12.170 +without any arguments and to install the package into the directory _pkg, 
  12.171 +it is necessary to use the command 'make DESTDIR=$PWD/_pkg install'. Generic
  12.172 +example:
  12.173 +</p>
  12.174 +<pre class="script">
  12.175 +# Rules to configure and make the package.
  12.176 +compile_rules()
  12.177 +{
  12.178 +	cd $src
  12.179 +	./configure --prefix=/usr --infodir=/usr/share/info \
  12.180 +	--mandir=/usr/share/man $CONFIGURE_ARGS
  12.181 +	make
  12.182 +	make DESTDIR=$PWD/_pkg install
  12.183 +}
  12.184 +</pre>
  12.185 +<h4>genpkg_rules()</h4>
  12.186 +<p>
  12.187 +To generate a tazkg package we must specify commands in the function 
  12.188 +<code>genpkg_rules</code>. In this example we create a psuedo directory 
  12.189 +<code>usr/</code> in the filesystem of the package, copy the whole 
  12.190 +binary(s) and finally use strip to clean the files:
  12.191 +</p>
  12.192 +<pre class="script">
  12.193 +# Rules to gen a SliTaz package suitable for Tazpkg.
  12.194 +genpkg_rules()
  12.195 +{
  12.196 +	mkdir -p $fs/usr
  12.197 +	cp -a $_pkg/usr/bin $fs/usr
  12.198 +	strip -s $fs/usr/bin/*
  12.199 +}
  12.200 +</pre>
  12.201 +<h4>pre_install() and post_install()</h4>
  12.202 +<p>
  12.203 +These 2 functions are initiated by tazpkg when installing the package. They 
  12.204 +must be defined before generating the .tazpkg package with tazwok. If no rules 
  12.205 +are given for these functions, they have no raison d'etre and can be removed.
  12.206 +Example using echo to display some text (no function should be empty).
  12.207 +</p>
  12.208 +<pre class="script">
  12.209 +# Pre and post install commands for Tazpkg.
  12.210 +pre_install()
  12.211 +{
  12.212 +	echo "Processing pre-install commands..."
  12.213 +}
  12.214 +post_install()
  12.215 +{
  12.216 +	echo "Processing post-install commands..."
  12.217 +}
  12.218 +</pre>
  12.219 +
  12.220 +<!-- End of content -->
  12.221 +</div>
  12.222 +
  12.223 +<!-- Footer. -->
  12.224 +<div id="footer">
  12.225 +	<div class="footer-right"></div>
  12.226 +	<a href="#top">Top of the page</a> | 
  12.227 +	<a href="index.html">Table of contents</a>
  12.228 +</div>
  12.229 +
  12.230 +<div id="copy">
  12.231 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
  12.232 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
  12.233 +    Documentation is under
  12.234 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
  12.235 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
  12.236 +</div>
  12.237 +
  12.238 +</body>
  12.239 +</html>
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/en/doc/cookbook/template.html	Sat Apr 12 03:04:41 2008 +0200
    13.3 @@ -0,0 +1,57 @@
    13.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    13.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    13.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    13.7 +<head>
    13.8 +    <title>SliTaz Cookbook (en) - Template</title>
    13.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   13.10 +    <meta name="description" content="slitaz English cookbook" />
   13.11 +    <meta name="expires" content="never" />
   13.12 +    <meta name="modified" content="2008-02-26 18:30:00" />
   13.13 +    <meta name="publisher" content="www.slitaz.org" />
   13.14 +    <meta name="author" content="Christophe Lincoln"/>
   13.15 +    <link rel="shortcut icon" href="favicon.ico" />
   13.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   13.17 +</head>
   13.18 +<body bgcolor="#ffffff">
   13.19 +
   13.20 +<!-- Header and quick navigation -->
   13.21 +<div id="header">
   13.22 +<div align="right" id="quicknav">
   13.23 +    <a name="top"></a>
   13.24 +    <a href="http://www.slitaz.org/en/">www.slitaz.org/en</a> |
   13.25 +    <a href="index.html">Table of contents</a>
   13.26 +</div>
   13.27 +<h1><font color="#3E1220">SliTaz Cookbook (en)</font></h1>
   13.28 +</div>
   13.29 +
   13.30 +<!-- Content. -->
   13.31 +<div id="content">
   13.32 +<div class="content-right"></div>
   13.33 +
   13.34 +<h2><font color="#DF8F06">Template</font></h2>
   13.35 +
   13.36 +<p>
   13.37 +CONTENT
   13.38 +</p>
   13.39 +
   13.40 +
   13.41 +<!-- End of content -->
   13.42 +</div>
   13.43 +
   13.44 +<!-- Footer. -->
   13.45 +<div id="footer">
   13.46 +	<div class="footer-right"></div>
   13.47 +	<a href="#top">Top of the page</a> | 
   13.48 +	<a href="index.html">Table of contents</a>
   13.49 +</div>
   13.50 +
   13.51 +<div id="copy">
   13.52 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
   13.53 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
   13.54 +    Documentation is under
   13.55 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
   13.56 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
   13.57 +</div>
   13.58 +
   13.59 +</body>
   13.60 +</html>
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/en/doc/cookbook/wok-tools.html	Sat Apr 12 03:04:41 2008 +0200
    14.3 @@ -0,0 +1,199 @@
    14.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    14.5 +    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    14.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    14.7 +<head>
    14.8 +    <title>SliTaz Cookbook (en) - Wok &amp; Tools</title>
    14.9 +    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
   14.10 +    <meta name="description" content="slitaz English cookbook" />
   14.11 +    <meta name="expires" content="never" />
   14.12 +    <meta name="modified" content="2008-02-26 18:30:00" />
   14.13 +    <meta name="publisher" content="www.slitaz.org" />
   14.14 +    <meta name="author" content="Christophe Lincoln, Paul Issot"/>
   14.15 +    <link rel="shortcut icon" href="favicon.ico" />
   14.16 +    <link rel="stylesheet" type="text/css" href="book.css" />
   14.17 +</head>
   14.18 +<body bgcolor="#ffffff">
   14.19 +
   14.20 +<!-- Header and quick navigation -->
   14.21 +<div id="header">
   14.22 +<div align="right" id="quicknav">
   14.23 +    <a name="top"></a>
   14.24 +    <a href="receipts.html">Receipts</a> |
   14.25 +    <a href="index.html">Table of contents</a>
   14.26 +</div>
   14.27 +<h1><font color="#3E1220">SliTaz Cookbook (en)</font></h1>
   14.28 +</div>
   14.29 +
   14.30 +<!-- Content. -->
   14.31 +<div id="content">
   14.32 +<div class="content-right"></div>
   14.33 +
   14.34 +<h2><font color="#DF8F06">Wok &amp; Tools</font></h2>
   14.35 +
   14.36 +<ul>
   14.37 +	<li><a href="#tazwok">Tazwok and the wok.</a></li>
   14.38 +	<li><a href="#wok">Wok tools.</a></li>
   14.39 +	<li><a href="#cook">Compile and generate packages.</a></li>
   14.40 +	<li><a href="#opts">Options during compilation of package.</a></li>
   14.41 +	<li><a href="#files">Files included or excluded packages.</a></li>
   14.42 +	<li><a href="#categories">Categories of packages.</a></li>
   14.43 +	<li><a href="#woktree">Structure of packages in the wok.</a></li>
   14.44 +	<li><a href="#pkgtree">Structure of tazpkg package.</a></li>
   14.45 +	<li><a href="receipts.html">Receipts.</a></li>
   14.46 +</ul>
   14.47 +
   14.48 +<a name="tazwok"></a>
   14.49 +<h3>Tazwok and the wok</h3>
   14.50 +<p>
   14.51 +The idea is to use a directory (wok) containing all the available packages, each package contains 
   14.52 +at least one receipt to download, unpack, compile and generate the binary package. To operate,
   14.53 +tazwok also needs to create a directory to store downloaded sources ($SOURCES_REPOSITORY) and a
   14.54 +repository of generated packages ($PACKAGES_REPOSITORY), these values can be configured using the
   14.55 +<code>/etc/tazwok.conf</code> file.
   14.56 +</p>
   14.57 +
   14.58 +<a name="wok"></a>
   14.59 +<h3><font color="#6c0023">Wok tools</font></h3>
   14.60 +<p>
   14.61 +To begin, tazwok must already be installed
   14.62 +on the system and the main development tools (binutils, compiler, libraries-dev, make) must be downloaded.
   14.63 +On Slitaz you have to install the meta-package <code>slitaz-toolchain</code>:
   14.64 +</p>
   14.65 +<pre> # tazpkg recharge
   14.66 + # tazpkg get-install slitaz-toolchain
   14.67 +</pre>
   14.68 +<h4>Get the wok</h4>
   14.69 +<p>
   14.70 +Before working it is necessary to recover the wok from the Mercurial repositories or an archive of
   14.71 +the primary mirror (TuxFamily). Example using SliTaz to be built in <code>/home/slitaz</code>:
   14.72 +</p>
   14.73 +<pre> $ hg clone http://hg.slitaz.org/wok/ /home/slitaz/wok
   14.74 +</pre>
   14.75 +<p>
   14.76 +The archives are also available from the URL: 
   14.77 +<a href="ftp://download.tuxfamily.org/slitaz/wok/">ftp://download.tuxfamily.org/slitaz/wok/</a>.
   14.78 +Just take the latest version from the cooking or undigest directories. Before compiling your first package,
   14.79 +tazwok must know where to look for the files. By default the path is <code>/home/slitaz/wok</code>,
   14.80 +you can change this or rename the wok you want to download. To view/check tazwok paths that will be used 
   14.81 +and the number of packages in the wok, you can use the tazwok command <code>stats</code>:
   14.82 +</p>
   14.83 +<pre> # tazwok stats
   14.84 +</pre>
   14.85 +
   14.86 +<a name="cook"></a>
   14.87 +<h3>Compile and generate packages</h3>
   14.88 +<p>
   14.89 +Configure, compile, strip.., The way SliTaz generates a package can be put into a single command.
   14.90 +To avoid frustration, it is advisable to begin to build your package without changing it's receipt or seeking
   14.91 +dependancies. M4 is an ideal candidate for your first <code>cook</code>:
   14.92 +</p>
   14.93 +<pre> # tazwok cook m4
   14.94 +</pre>
   14.95 +<p>
   14.96 +Once the work is finished, the package is located in the directory specified by the configuration file
   14.97 +(default <code>/home/slitaz/packages</code>). If all went well, you can install the package on the host system
   14.98 +or use it to generate a LiveCD distribution via tazlito. To create a new package you can use  <code>new-tree</code> 
   14.99 +with the option <code>--interactive</code> and read the documentation on the options provided by the
  14.100 +<a href="receipts.html">receipt</a>.
  14.101 +</p>
  14.102 +<h4>Cook-list - List of cooking</h4>
  14.103 +<p>
  14.104 +To compile several packages with a single command, you can use a cooking list. There are example lists in
  14.105 +<code>usr/share/examples/tazwok/cooklists</code> on SliTaz, these are just text files with a package put on every line.
  14.106 +Cook-list example using mypkgs.cooklist:
  14.107 +</p>
  14.108 +<pre> # tazwok cook-list mypkgs.cooklist
  14.109 +</pre>
  14.110 +
  14.111 +<a name="opts"></a>
  14.112 +<h3>Options during compilation of package</h3>
  14.113 +<p>
  14.114 +You are free to use any options you want, it is necessary to respect the FSH, the docs in /usr/share/doc for example
  14.115 +and follow the Freedesktop standards (.desktop). Then it's just a question of choice, for example you can disable 
  14.116 +support for XML, have smaller binaries for PHP and get rid of libxml2, but in the case of PHP, it's not worth the
  14.117 +cost in terms of loss of functionality. If you have any doubts, look at the receipts and compiler options in
  14.118 +<code>compile_rules</code>.
  14.119 +</p>
  14.120 +<h4>Optimization</h4>
  14.121 +<p>
  14.122 +The official SliTaz packages are optimized for i486, the optimization arguments used to configure are specified in
  14.123 +<code>/etc/tazwok.conf</code> and can be called via the variable <code>$CONFIGURE_ARGS</code>. 
  14.124 +If you want to compile a package with different arguments, you can modify the tazwok configuration file:
  14.125 +</p>
  14.126 +<pre class="script">CONFIGURE_ARGS="--build=i486-pc-linux-gnu --host=i486-pc-linux-gnu"
  14.127 +</pre>
  14.128 +
  14.129 +<a name="files"></a>
  14.130 +<h3>Files included or excluded packages</h3>
  14.131 +<p>
  14.132 +Generally the base packages contain no man, info, doc or static libraries, we have to create them via a package-doc
  14.133 +or a package-dev. Note that SliTaz is not proposing to use the man command or info, so there's no manual or GNU
  14.134 +info file. The creation of packages containing docs is really optional, especially if the material is in English
  14.135 +(I say). By contrast a piece of text on the package in the Handbook is more appreciated.
  14.136 +</p>
  14.137 +<p>
  14.138 +In terms of configuration, whenever possible, the aim is to offer basic configuration files to run the package 
  14.139 +directly. In the case of the web server LightTPD package, SliTaz supplies configuration files and startup scripts
  14.140 +located in /etc/init.d (documented in the Handbook). For a new package, you are free to choose it's default 
  14.141 +configuration depending on what you think is easiest for the end user. On SliTaz you have <code>/usr/share/examples</code>
  14.142 +for example configurations and other kinds of useful infomation.
  14.143 +</p>
  14.144 +
  14.145 +<a name="categories"></a>
  14.146 +<h3>Categories of packages</h3>
  14.147 +<p>
  14.148 +The categories of packages exist only for informational purposes and are not fixed. the idea is to classify
  14.149 +packages so that a web page can be generated each night recovering data in the package receipt. For the short term, place
  14.150 +developement packages in 'devel', Xorg in 'x-window' and the variety of new packages in 'extra'
  14.151 +</p>
  14.152 +
  14.153 +<a name="woktree"></a>
  14.154 +<h3>Structure of a package in the wok</h3>
  14.155 +<p>
  14.156 +The structure of the packages in the wok should be respected so that tazwok can find the correct files and directories.
  14.157 +Possible contents of a package (note the directory taz/ is created at time of cooking):
  14.158 +</p>
  14.159 +<ul>
  14.160 +	<li><code>stuff/</code> : The material used to configure, compile and generate the package
  14.161 +	 (patch(es), Makefile, pseudo fs, etc).</li>
  14.162 +	<li><code>taz/</code> : Directory tree containing the package tazpkg generated, the compressed package is stored
  14.163 +	in the directory specified by $PACKAGES_REPOSITORY in the tazwok configuraton file.</li>
  14.164 +	<li><code>receipt</code> : The receipt (see 
  14.165 +	<a href="receipts.html">receipts</a>).</li>
  14.166 +	<li><code>description.txt</code> : (optional) The description of the package is copied to the root of the tazpkg
  14.167 +	package. Once installed tazpkg knows how do deal with this file via 'tazpkg desc pkgname'.</li>
  14.168 +</ul>
  14.169 +
  14.170 +<a name="pkgtree"></a>
  14.171 +<h3>Structure of a tazpkg package </h3>
  14.172 +<p>
  14.173 +The SliTaz packages are cpio archives containing files and a filesystem compressed with gzip:
  14.174 +</p>
  14.175 +<ul>
  14.176 +	<li><code>fs/</code> : Pseudo filesystem containing all the files to install.</li>
  14.177 +	<li><code>receipt</code> : The receipt (see receipt.txt).</li>
  14.178 +	<li><code>files.list</code> : A list of files in the package.</li>
  14.179 +	<li><code>description.txt</code> : The description of the package (optional).</li>
  14.180 +</ul>
  14.181 +
  14.182 +<!-- End of content -->
  14.183 +</div>
  14.184 +
  14.185 +<!-- Footer. -->
  14.186 +<div id="footer">
  14.187 +	<div class="footer-right"></div>
  14.188 +	<a href="#top">Top of the page</a> | 
  14.189 +	<a href="index.html">Table of contents</a>
  14.190 +</div>
  14.191 +
  14.192 +<div id="copy">
  14.193 +    Copyright &copy; 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
  14.194 +    <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
  14.195 +    Documentation is under
  14.196 +    <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
  14.197 +    and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
  14.198 +</div>
  14.199 +
  14.200 +</body>
  14.201 +</html>
  14.202 +
    15.1 --- a/en/doc/index.html	Fri Apr 11 21:57:21 2008 +0000
    15.2 +++ b/en/doc/index.html	Sat Apr 12 03:04:41 2008 +0200
    15.3 @@ -66,11 +66,15 @@
    15.4  <a name="content"></a>
    15.5  
    15.6  <h1><font color="#3e1220">English documentation</font></h1>
    15.7 -<h2><font color="#df8f06">Handbook and manuals</font></h2>
    15.8 +<h2><font color="#df8f06">Books and manuals</font></h2>
    15.9  
   15.10  <ul>
   15.11 -	<li><a href="handbook/">Handbook</a> - SliTaz Handbook. LiveCD usage,
   15.12 -	packages manager, system administration or specific instructions.</li>
   15.13 +	<li><a href="handbook/">Handbook</a> - SliTaz Handbook. LiveCD usage
   15.14 +	and options, Tazpkg packages manager, system or network administration
   15.15 +	and specific instructions such as installing new fonts.</li>
   15.16 +	<li><a href="cookbook/">Cookbook</a> - SliTaz Cookbook give instruction
   15.17 +	on how to use Tazwok with the wok and information about the packages
   15.18 +	receipts.</li>
   15.19  	<li><a href="manuals/tazusb.en.html">TazUSB manual</a> -  SliTaz LiveUSB
   15.20  	utility.</li>
   15.21  	<li>Users speaking English can get support and ask for new texts on the