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