rev |
line source |
pankso@21
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
pankso@21
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
pankso@21
|
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
pankso@21
|
4 <head>
|
pankso@21
|
5 <title>SliTaz Cookbook (en) - Wok & Tools</title>
|
pankso@21
|
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
|
pankso@21
|
7 <meta name="description" content="slitaz English cookbook" />
|
pankso@21
|
8 <meta name="expires" content="never" />
|
MikeDSmith25@117
|
9 <meta name="modified" content="2008-07-16 21:45:00" />
|
pankso@21
|
10 <meta name="publisher" content="www.slitaz.org" />
|
pankso@21
|
11 <meta name="author" content="Christophe Lincoln, Paul Issot"/>
|
pankso@21
|
12 <link rel="shortcut icon" href="favicon.ico" />
|
pankso@21
|
13 <link rel="stylesheet" type="text/css" href="book.css" />
|
pankso@21
|
14 </head>
|
pankso@21
|
15 <body bgcolor="#ffffff">
|
pankso@21
|
16
|
pankso@21
|
17 <!-- Header and quick navigation -->
|
pankso@21
|
18 <div id="header">
|
pankso@21
|
19 <div align="right" id="quicknav">
|
pankso@21
|
20 <a name="top"></a>
|
pankso@21
|
21 <a href="receipts.html">Receipts</a> |
|
pankso@21
|
22 <a href="index.html">Table of contents</a>
|
pankso@21
|
23 </div>
|
pankso@21
|
24 <h1><font color="#3E1220">SliTaz Cookbook (en)</font></h1>
|
pankso@21
|
25 </div>
|
pankso@21
|
26
|
pankso@21
|
27 <!-- Content. -->
|
pankso@21
|
28 <div id="content">
|
pankso@21
|
29 <div class="content-right"></div>
|
pankso@21
|
30
|
pankso@21
|
31 <h2><font color="#DF8F06">Wok & Tools</font></h2>
|
pankso@21
|
32
|
pankso@21
|
33 <ul>
|
paul@29
|
34 <li><a href="#tazwok">Overview.</a></li>
|
pankso@21
|
35 <li><a href="#wok">Wok tools.</a></li>
|
pankso@21
|
36 <li><a href="#cook">Compile and generate packages.</a></li>
|
pankso@21
|
37 <li><a href="#opts">Options during compilation of package.</a></li>
|
pankso@21
|
38 <li><a href="#files">Files included or excluded packages.</a></li>
|
pankso@21
|
39 <li><a href="#categories">Categories of packages.</a></li>
|
pankso@21
|
40 <li><a href="#woktree">Structure of packages in the wok.</a></li>
|
pankso@21
|
41 <li><a href="#pkgtree">Structure of tazpkg package.</a></li>
|
pankso@21
|
42 <li><a href="receipts.html">Receipts.</a></li>
|
pankso@21
|
43 </ul>
|
pankso@21
|
44
|
pankso@21
|
45 <a name="tazwok"></a>
|
paul@29
|
46 <h3>Overview - Tazwok and the wok</h3>
|
pankso@21
|
47 <p>
|
pankso@21
|
48 The idea is to use a directory (wok) containing all the available packages, each package contains
|
pankso@21
|
49 at least one receipt to download, unpack, compile and generate the binary package. To operate,
|
pankso@21
|
50 tazwok also needs to create a directory to store downloaded sources ($SOURCES_REPOSITORY) and a
|
pankso@21
|
51 repository of generated packages ($PACKAGES_REPOSITORY), these values can be configured using the
|
pankso@21
|
52 <code>/etc/tazwok.conf</code> file.
|
pankso@21
|
53 </p>
|
pankso@21
|
54
|
pankso@21
|
55 <a name="wok"></a>
|
pankso@21
|
56 <h3><font color="#6c0023">Wok tools</font></h3>
|
pankso@21
|
57 <p>
|
pankso@21
|
58 To begin, tazwok must already be installed
|
pankso@21
|
59 on the system and the main development tools (binutils, compiler, libraries-dev, make) must be downloaded.
|
paul@29
|
60 On Slitaz you need to install the meta-package <code>slitaz-toolchain</code>:
|
pankso@21
|
61 </p>
|
pankso@21
|
62 <pre> # tazpkg recharge
|
pankso@21
|
63 # tazpkg get-install slitaz-toolchain
|
pankso@21
|
64 </pre>
|
pankso@21
|
65 <h4>Get the wok</h4>
|
pankso@21
|
66 <p>
|
pankso@21
|
67 Before working it is necessary to recover the wok from the Mercurial repositories or an archive of
|
pankso@21
|
68 the primary mirror (TuxFamily). Example using SliTaz to be built in <code>/home/slitaz</code>:
|
pankso@21
|
69 </p>
|
pankso@21
|
70 <pre> $ hg clone http://hg.slitaz.org/wok/ /home/slitaz/wok
|
pankso@21
|
71 </pre>
|
pankso@21
|
72 <p>
|
pankso@21
|
73 The archives are also available from the URL:
|
pankso@21
|
74 <a href="ftp://download.tuxfamily.org/slitaz/wok/">ftp://download.tuxfamily.org/slitaz/wok/</a>.
|
pankso@21
|
75 Just take the latest version from the cooking or undigest directories. Before compiling your first package,
|
pankso@21
|
76 tazwok must know where to look for the files. By default the path is <code>/home/slitaz/wok</code>,
|
pankso@21
|
77 you can change this or rename the wok you want to download. To view/check tazwok paths that will be used
|
pankso@21
|
78 and the number of packages in the wok, you can use the tazwok command <code>stats</code>:
|
pankso@21
|
79 </p>
|
pankso@21
|
80 <pre> # tazwok stats
|
pankso@21
|
81 </pre>
|
pankso@21
|
82
|
pankso@21
|
83 <a name="cook"></a>
|
pankso@21
|
84 <h3>Compile and generate packages</h3>
|
pankso@21
|
85 <p>
|
pankso@21
|
86 Configure, compile, strip.., The way SliTaz generates a package can be put into a single command.
|
pankso@21
|
87 To avoid frustration, it is advisable to begin to build your package without changing it's receipt or seeking
|
pankso@21
|
88 dependancies. M4 is an ideal candidate for your first <code>cook</code>:
|
pankso@21
|
89 </p>
|
pankso@21
|
90 <pre> # tazwok cook m4
|
pankso@21
|
91 </pre>
|
pankso@21
|
92 <p>
|
pankso@21
|
93 Once the work is finished, the package is located in the directory specified by the configuration file
|
pankso@21
|
94 (default <code>/home/slitaz/packages</code>). If all went well, you can install the package on the host system
|
paul@29
|
95 or use it to generate a LiveCD distribution via tazlito. To create a new package you can use <code>new-tree</code>
|
pankso@21
|
96 with the option <code>--interactive</code> and read the documentation on the options provided by the
|
pankso@21
|
97 <a href="receipts.html">receipt</a>.
|
pankso@21
|
98 </p>
|
pankso@21
|
99 <h4>Cook-list - List of cooking</h4>
|
pankso@21
|
100 <p>
|
pankso@21
|
101 To compile several packages with a single command, you can use a cooking list. There are example lists in
|
pankso@21
|
102 <code>usr/share/examples/tazwok/cooklists</code> on SliTaz, these are just text files with a package put on every line.
|
pankso@21
|
103 Cook-list example using mypkgs.cooklist:
|
pankso@21
|
104 </p>
|
pankso@21
|
105 <pre> # tazwok cook-list mypkgs.cooklist
|
pankso@21
|
106 </pre>
|
pankso@21
|
107
|
pankso@21
|
108 <a name="opts"></a>
|
pankso@21
|
109 <h3>Options during compilation of package</h3>
|
pankso@21
|
110 <p>
|
paul@29
|
111 You are free to use any options you want, it is necessary to respect the FSH, the docs in <code>/usr/share/doc</code>
|
pankso@21
|
112 and follow the Freedesktop standards (.desktop). Then it's just a question of choice, for example you can disable
|
pankso@21
|
113 support for XML, have smaller binaries for PHP and get rid of libxml2, but in the case of PHP, it's not worth the
|
pankso@21
|
114 cost in terms of loss of functionality. If you have any doubts, look at the receipts and compiler options in
|
pankso@21
|
115 <code>compile_rules</code>.
|
pankso@21
|
116 </p>
|
pankso@21
|
117 <h4>Optimization</h4>
|
pankso@21
|
118 <p>
|
pankso@21
|
119 The official SliTaz packages are optimized for i486, the optimization arguments used to configure are specified in
|
pankso@21
|
120 <code>/etc/tazwok.conf</code> and can be called via the variable <code>$CONFIGURE_ARGS</code>.
|
pankso@21
|
121 If you want to compile a package with different arguments, you can modify the tazwok configuration file:
|
pankso@21
|
122 </p>
|
pankso@21
|
123 <pre class="script">CONFIGURE_ARGS="--build=i486-pc-linux-gnu --host=i486-pc-linux-gnu"
|
pankso@21
|
124 </pre>
|
pankso@21
|
125
|
pankso@21
|
126 <a name="files"></a>
|
pankso@21
|
127 <h3>Files included or excluded packages</h3>
|
pankso@21
|
128 <p>
|
pankso@21
|
129 Generally the base packages contain no man, info, doc or static libraries, we have to create them via a package-doc
|
paul@29
|
130 or a package-dev. Note that SliTaz is not intending to use the man or info command, so there's no manual or GNU
|
pankso@21
|
131 info file. The creation of packages containing docs is really optional, especially if the material is in English
|
pankso@21
|
132 (I say). By contrast a piece of text on the package in the Handbook is more appreciated.
|
pankso@21
|
133 </p>
|
pankso@21
|
134 <p>
|
pankso@21
|
135 In terms of configuration, whenever possible, the aim is to offer basic configuration files to run the package
|
pankso@21
|
136 directly. In the case of the web server LightTPD package, SliTaz supplies configuration files and startup scripts
|
paul@153
|
137 located in /etc/init.d (documented in the Handbook). For a new package, you are free to choose its default
|
pankso@21
|
138 configuration depending on what you think is easiest for the end user. On SliTaz you have <code>/usr/share/examples</code>
|
pankso@21
|
139 for example configurations and other kinds of useful infomation.
|
pankso@21
|
140 </p>
|
pankso@21
|
141
|
pankso@21
|
142 <a name="categories"></a>
|
pankso@21
|
143 <h3>Categories of packages</h3>
|
pankso@21
|
144 <p>
|
paul@29
|
145 The categories of packages exist only for informational purposes and are not fixed, the idea is to classify
|
pankso@21
|
146 packages so that a web page can be generated each night recovering data in the package receipt. For the short term, place
|
pankso@21
|
147 developement packages in 'devel', Xorg in 'x-window' and the variety of new packages in 'extra'
|
pankso@21
|
148 </p>
|
pankso@21
|
149
|
pankso@21
|
150 <a name="woktree"></a>
|
pankso@21
|
151 <h3>Structure of a package in the wok</h3>
|
pankso@21
|
152 <p>
|
paul@29
|
153 The structure of the packages in the wok should always be respected so that tazwok can find the correct files and directories.
|
pankso@21
|
154 Possible contents of a package (note the directory taz/ is created at time of cooking):
|
pankso@21
|
155 </p>
|
pankso@21
|
156 <ul>
|
pankso@21
|
157 <li><code>stuff/</code> : The material used to configure, compile and generate the package
|
pankso@21
|
158 (patch(es), Makefile, pseudo fs, etc).</li>
|
pankso@21
|
159 <li><code>taz/</code> : Directory tree containing the package tazpkg generated, the compressed package is stored
|
pankso@21
|
160 in the directory specified by $PACKAGES_REPOSITORY in the tazwok configuraton file.</li>
|
pankso@21
|
161 <li><code>receipt</code> : The receipt (see
|
pankso@21
|
162 <a href="receipts.html">receipts</a>).</li>
|
pankso@21
|
163 <li><code>description.txt</code> : (optional) The description of the package is copied to the root of the tazpkg
|
MikeDSmith25@117
|
164 package. Once installed, tazpkg knows how do deal with this file via 'tazpkg desc pkgname'.</li>
|
pankso@21
|
165 </ul>
|
pankso@21
|
166
|
pankso@21
|
167 <a name="pkgtree"></a>
|
pankso@21
|
168 <h3>Structure of a tazpkg package </h3>
|
pankso@21
|
169 <p>
|
pankso@21
|
170 The SliTaz packages are cpio archives containing files and a filesystem compressed with gzip:
|
pankso@21
|
171 </p>
|
pankso@21
|
172 <ul>
|
pankso@21
|
173 <li><code>fs/</code> : Pseudo filesystem containing all the files to install.</li>
|
pankso@21
|
174 <li><code>receipt</code> : The receipt (see receipt.txt).</li>
|
pankso@21
|
175 <li><code>files.list</code> : A list of files in the package.</li>
|
pankso@21
|
176 <li><code>description.txt</code> : The description of the package (optional).</li>
|
pankso@21
|
177 </ul>
|
pankso@21
|
178
|
pankso@21
|
179 <!-- End of content -->
|
pankso@21
|
180 </div>
|
pankso@21
|
181
|
pankso@21
|
182 <!-- Footer. -->
|
pankso@21
|
183 <div id="footer">
|
pankso@21
|
184 <div class="footer-right"></div>
|
pankso@21
|
185 <a href="#top">Top of the page</a> |
|
pankso@21
|
186 <a href="index.html">Table of contents</a>
|
pankso@21
|
187 </div>
|
pankso@21
|
188
|
pankso@21
|
189 <div id="copy">
|
pankso@21
|
190 Copyright © 2008 <a href="http://www.slitaz.org/en/">SliTaz</a> -
|
pankso@21
|
191 <a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>;<br />
|
pankso@21
|
192 Documentation is under
|
pankso@21
|
193 <a href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License</a>
|
pankso@21
|
194 and code is <a href="http://validator.w3.org/">valid xHTML 1.0</a>.
|
pankso@21
|
195 </div>
|
pankso@21
|
196
|
pankso@21
|
197 </body>
|
pankso@21
|
198 </html>
|
pankso@21
|
199
|