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