website view en/devel/index.php @ rev 777

en: add Headlines menu entry on all pages
author Christophe Lincoln <pankso@slitaz.org>
date Sat Mar 26 16:06:14 2011 +0100 (2011-03-26)
parents 09e244f811b0
children 66af1eb0ed3d
line source
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <head>
5 <title>SliTaz - Developers corner</title>
6 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
7 <meta name="description" content="SliTaz GNU/Linux project information overview" />
8 <meta name="keywords" lang="en" content="about slitaz, gnu, linux, mini distro, livecd" />
9 <meta name="robots" content="index, follow, all" />
10 <meta name="modified" content="<?php echo (date( "Y-m-d H:i:s", getlastmod())); ?>" />
11 <meta name="author" content="Christophe Lincoln"/>
12 <link rel="shortcut icon" href="../../favicon.ico" />
13 <link rel="stylesheet" type="text/css" href="../../slitaz.css" />
14 </head>
15 <body>
17 <!-- Header -->
18 <div id="header">
19 <div id="logo"></div>
20 <div id="network">
21 <a href="http://www.slitaz.org/netmap.php">
22 <img src="../../images/network.png" alt="network.png" /></a>
23 <a href="http://scn.slitaz.org/">Community</a>
24 <a href="http://doc.slitaz.org/">Doc</a>
25 <a href="http://forum.slitaz.org/">Forum</a>
26 <a href="http://labs.slitaz.org/issues">Bugs</a>
27 <a href="http://hg.slitaz.org/">Hg</a>
28 </div>
29 <h1><a href="http://www.slitaz.org/">SliTaz GNU/Linux</a></h1>
30 </div>
32 <!-- Block -->
33 <div id="block">
34 <!-- Navigation -->
35 <div id="block_nav">
36 <h4>Navigation</h4>
37 <div class="right_box">
38 <ul>
39 <li><a href="../mailing-list.html">Mailing List</a></li>
40 <li><a href="../devel/">Development</a></li>
41 <li><a href="../packages/">Packages</a></li>
42 <li><a href="../artwork/">Artwork</a></li>
43 <li><a href="../search.html">Search</a></li>
44 </ul>
45 </div>
46 <div class="left_box">
47 <ul>
48 <li><a href="../">Headlines</a></li>
49 <li><a href="../about/">About</a></li>
50 <li><a href="../get/">Download</a></li>
51 <li><a href="../asso/">Association</a></li>
52 <li><a href="../doc/">Documentation</a></li>
53 </ul>
54 </div>
55 </div>
56 <!-- Information/image -->
57 <div id="block_info">
58 <h4>Development</h4>
59 <p>
60 SliTaz is a community based distribution made by many
61 people all over the world and everyone is welcome to help
62 and get involve in the project.
63 </p>
64 <p>
65 <img src="../../images/users.png" alt="users.png" />
66 <a href="http://scn.slitaz.org/">Join us on SCN</a> and
67 the <a href="../mailing-list.html">mailing list</a>
68 </p>
69 </div>
70 </div>
72 <!-- Content -->
73 <div id="content">
75 <h2>Devel corner</h2>
77 <ul>
78 <li><a href="#devel">SliTaz Developers corner.</a></li>
79 <li><a href="#kiss">KISS and comply to standards.</a></li>
80 <li><a href="#tank">Build host &amp; home.</a></li>
81 <li><a href="#repos">Mercurial repositories.</a></li>
82 <li><a href="#iconv">Implementation of iconv().</a></li>
83 <li><a href="#pkgs">Tazpkg packages.</a></li>
84 <li><a href="#website">Website Management.</a></li>
85 <!--<li><a href="#diff">Diff and patch files.</a></li>-->
86 </ul>
88 <a name="devel"></a>
89 <h2>SliTaz Developers corner</h2>
90 <p>
91 SliTaz is an open source and community driven distribution. Everyone is welcome
92 to join and contribute, from users, to hackers and developers, there is always
93 something to do, ie. Proofreading or writing documentation, sending bugs or
94 patches to the Mailing list, gaining access to the wok and pushing some new
95 packages or simply to help others on the Mailing list or forum. SliTaz has got
96 Mercurial repositories hosted on a SliTaz system, developers can ask for a new
97 repo if needed and contributors have write access to correct typos, scripts, etc.
98 </p>
99 <p>
100 SliTaz is a tiny community and listens to its users. There are several
101 developers who are active on the <a href="http://forum.slitaz.org/">forum</a>
102 and the <a href="../mailing-list.html">Mailing List</a>.
103 </p>
104 <p>
105 For artists there is a dedicated website, simply create an account and
106 post your graphics or pictures. The site is managed by the community. If
107 you want to lend a hand to administer the site, please contact a
108 contributor or e-mail the discussion list. The website art.slitaz.org:
109 <a href="http://art.slitaz.org/">SliTaz Community Art</a>
110 </p>
112 <a name="kiss"></a>
113 <h2>KISS and comply to standards</h2>
114 <p>
115 Keep it simple: follow the best standards, carefully draft and write
116 high quality documentation, provide a stable and robust system and keep
117 the <em>rootfs</em> on the LiveCD light enough to run on machines with at
118 least 128 MB RAM. It's also possible to use GTK+2, Dialog, SHell scripts,
119 or PHP coding tools on the distribution. The idea is not to duplicate and
120 to think small...
121 </p>
123 <a name="tank"></a>
124 <h2>Tank - Build host &amp; home</h2>
125 <p>
126 Each contributor may have an account on the project server with secure
127 access, disk space, a public directory and all development tools.
128 Developers can compile packages and maintainers of the mirror can handle
129 sychronization. Tank also hosts the website, web boot and mercurial
130 repositories: <a href="http://tank.slitaz.org/">tank.slitaz.org</a>
131 </p>
132 <p>
133 Instructions on using the build host are described in the Cookbook:
134 <a href="http://doc.slitaz.org/en:cookbook:buildhost">SliTaz Build Host (tank)</a>.
135 </p>
137 <a name="repos"></a>
138 <h2>Mercurial repositories</h2>
139 <p>
140 SliTaz Mercurial or Hg repos can be browsed or cloned by anyone using the URL:
141 <a href="http://hg.slitaz.org/">http://hg.slitaz.org/</a>. People with write
142 access can directly use <code>repos.slitaz.org</code> which requires authentication.
143 Mercurial uses Python and is installable with:
144 <code>tazpkg get-install mercurial</code>
145 </p>
146 <h3>~/.hgrc</h3>
147 <p>
148 Before you push your first commit onto the server, be sure that you have a correct
149 Hg configuration file with your name and email address, and remember to check
150 that you are not root. Personal ~/.hgrc file example:
151 </p>
152 <pre class="script">
153 [ui]
154 username = FirstName LastName &lt;you@example.org&gt;
155 </pre>
156 <h4>Clone, modify, commit and push</h4>
157 <p>
158 Clone a repo, example for wok:
159 </p>
160 <pre>
161 $ hg clone http://repos.slitaz.org/wok
162 </pre>
163 <p>
164 Change directory to wok, note you must be in the repository to be able
165 to use 'hg' commands. To check all logs or just the last log:
166 </p>
167 <pre>
168 $ hg log
169 $ hg head
170 </pre>
171 <p>
172 Add or modify one or more files and commit:
173 </p>
174 <pre>
175 $ hg add
176 $ hg status
177 $ hg commit -m "Log message..."
178 $ hg log
179 </pre>
180 <p>
181 Note that you can use the command <code>rollback</code> to roll back to the last
182 transaction. Before pushing changes to the server, it is safe to pull once:
183 </p>
184 <pre>
185 $ hg pull
186 $ hg push
187 </pre>
188 <p>
189 Done, your changes, code or corrections are now on the server.
190 </p>
191 <h4>Updating a local wok</h4>
192 <p>
193 To update your wok with the local server (<em>pull</em> to pull the changes):
194 </p>
195 <pre>
196 $ hg pull
197 $ hg update
198 </pre>
199 <h4>Useful commands</h4>
200 <p>
201 Hg commands that can be used.
202 </p>
203 <ul>
204 <li><code>hg help</code> : Display the full list of commands.</li>
205 <li><code>hg rollback</code> : Undo the last action performed (commit,
206 pull, push).</li>
207 <li><code>hg log &lt;package&gt;</code> : Display a package log.</li>
208 <li><code>hg head</code> : Display the last log.</li>
209 </ul>
211 <a name="iconv"></a>
212 <h2>Implementation of iconv()</h2>
213 <p>
214 SliTaz uses iconv() provided by GNU glibc - any packages that offer
215 <code>libiconv</code> must use the library contained in <code>glibc-locale</code>.
216 There is therefore no longer a libiconv package (1.2 MB) in SliTaz.
217 </p>
219 <a name="pkgs"></a>
220 <h2>Tazpkg Packages</h2>
221 <p>
222 The tazpkg packages in SliTaz are automatically created via Tazwok and a
223 receipt in the wok. The Cookbook describes the
224 <a href="../doc/cookbook/wok-tools.html">use of tools</a>
225 and the format of <a href="../doc/cookbook/receipts.html">receipts</a>.
226 These are required reading before we begin.
227 </p>
228 <p>
229 In terms of choice of package, the idea is to offer a package by task or
230 functionality, ie. the lightest application in the field and not duplicated.
231 Note that the current packages are not immutable, if you find an alternative
232 that is lighter, with more features or more <em>sexy</em> for a few extra KB,
233 you can suggest it on the Mailing List. Particular attention is given to
234 packages for the LiveCD, these should be stripped, removing unnecesary
235 dependancies and compiler options. In general candidate packages for the core
236 LiveCD are discussed on the Mailing List.
237 </p>
238 <p>
239 Before you begin to compile and create packages for SliTaz, be sure that the
240 work doesn't already exist in the
241 <a href="http://download.tuxfamily.org/slitaz/packages/undigest/">undigest</a>
242 wok provided by the primary SliTaz mirror. Don't forget that the members
243 of the list are there to help you and that the documentation of the
244 <a href="../doc/cookbook/wok-tools.html">wok and tools</a>
245 exists to help you get started.
246 </p>
248 <a name="pkgs-naming"></a>
249 <h3>Naming of packages</h3>
250 <p>
251 In most cases the package name is the same as the source, except for
252 Python, Perl, PHP, Ruby and Lua modules. For example, the package
253 providing a Kid template system written in Python and XML is named:
254 <code>python-kid</code>.
255 </p>
257 <a name="website"></a>
258 <h2>Website Management</h2>
259 <p>
260 The website is managed via a mercurial repository, they can be cloned by:
261 </p>
262 <pre>
263 $ hg clone http://hg.slitaz.org/website
264 Or if you have the proper permissions:
265 $ hg clone http://repos.slitaz.org/website
266 </pre>
268 <h3>xHTML coding style</h3>
269 <p>
270 The pages and different <em>books</em> are coded in xHTML 1.0
271 transitional. The title of level 1 is used only once (at the top),
272 level 2 is the title of the document and levels 3 and 4 are then used for
273 the subtitles. If a list is used instead using smart anchors;
274 then that starts at the top, just after the title of level 2.
275 Paragraphs are contained in the tags <code>&lt;p&gt;&lt;/p&gt;</code>.
276 For indentation, we use tabs - the reason being semantics and to take
277 up less space in terms of octets (bytes). To put code, like the name of
278 a command inside a paragraph: <code>&lt;code&gt;</code> is the preferred
279 method. To view commands or to utilize a terminal, the web pages use
280 <code>&lt;pre&gt;</code> to display the formatted text. Example:
281 </p>
282 <pre>
283 $ command
284 </pre>
285 <p>
286 To view text that can be copied and pasted, such as scripts,
287 bits of code, sample configuration files, etc - we also use
288 <code>&lt;pre&gt;</code>, but with a CSS class named "script". Example:
289 </p>
290 <pre class="script">
291 &lt;pre class="script"&gt;
293 code...
295 &lt;/pre&gt;
296 </pre>
297 <p>
298 The <em>emphasized</em> words put themselves in the tag <code>&lt;em&gt;</code>
299 and internal links are relative. Remember to check the validity
300 of the code via the online <em>validator</em> of the W3C.
301 </p>
303 <a name="diff"></a>
304 <h2>Diff and patch</h2>
305 <p>
306 The utilities <code>diff</code> and <code>patch</code> are command-line tools
307 for creating and implementing a file containing differences between two files.
308 This technique is often used for collaboration and the changes made to the
309 original file can be clearly extracted. To create a <code>diff</code> file
310 readable by humans in a simple text editor, you must supply the <code>-u</code> option:
311 </p>
312 <pre>
313 $ diff -u file.orig file.new &gt; file.diff
314 </pre>
315 <p>
316 To apply a patch:
317 </p>
318 <pre>
319 $ patch file.orig file.diff
320 </pre>
322 <!-- End of content -->
323 </div>
325 <!-- Footer -->
326 <div id="footer">
327 Copyright &copy; <span class="year"></span>
328 <a href="http://www.slitaz.org/">SliTaz</a> - Network:
329 <a href="http://scn.slitaz.org/">Community</a>
330 <a href="http://doc.slitaz.org/">Doc</a>
331 <a href="http://forum.slitaz.org/">Forum</a>
332 <a href="http://pkgs.slitaz.org/">Packages</a>
333 <a href="http://labs.slitaz.org/issues">Bugs</a>
334 <a href="http://hg.slitaz.org/">Hg</a>
335 <p>
336 SliTaz @
337 <a href="http://twitter.com/slitaz">Twitter</a>
338 <a href="http://www.facebook.com/slitaz">Facebook</a>
339 <a href="http://distrowatch.com/slitaz">Distrowatch</a>
340 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a>
341 <a href="http://flattr.com/profile/slitaz">Flattr</a>
342 </p>
343 </div>
345 </body>
346 </html>