1 | Gentoo-HOWTO |
1 | Gentoo-HOWTO |
2 | |
2 | |
3 | Written by Peter Gavin <pete@gentoo.org> and other members of the |
3 | Written by Peter Gavin <pete@gentoo.org> and other members of the |
4 | Gentoo Team |
4 | Gentoo Team |
|
|
5 | |
|
|
6 | ------------------------------------------------------------------------ |
|
|
7 | |
|
|
8 | This document is a work in progress, and is constantly being updated |
|
|
9 | and changed. It is by no means complete. |
5 | |
10 | |
6 | ------------------------------------------------------------------------ |
11 | ------------------------------------------------------------------------ |
7 | |
12 | |
8 | Contents |
13 | Contents |
9 | |
14 | |
… | |
… | |
17 | B. Contents of an .ebuild File |
22 | B. Contents of an .ebuild File |
18 | C. Rules for Writing an .ebuild File |
23 | C. Rules for Writing an .ebuild File |
19 | IV. Filesystem Locations |
24 | IV. Filesystem Locations |
20 | A. Introduction to the FHS |
25 | A. Introduction to the FHS |
21 | B. How to Fit Your Packages into the Filesystem |
26 | B. How to Fit Your Packages into the Filesystem |
|
|
27 | V. The Portage Scripts and Utilities |
|
|
28 | A. Public Scripts |
|
|
29 | 1. ebuild |
|
|
30 | 2. portage-merge |
|
|
31 | 3. portage-unmerge |
|
|
32 | 4. portage-maintain |
|
|
33 | 5. pkgmerge |
|
|
34 | 6. pkgname |
|
|
35 | B. Private Scripts |
|
|
36 | 1. dobin |
|
|
37 | 2. dodeps |
|
|
38 | 3. dodir |
|
|
39 | 4. dodoc |
|
|
40 | 5. doexe |
|
|
41 | 6. dohard |
|
|
42 | 7. doinfo |
|
|
43 | 8. doins |
|
|
44 | 9. dolib |
|
|
45 | 10. dolib.a |
|
|
46 | 11. dolib.so |
|
|
47 | 12. doman |
|
|
48 | 13. domo |
|
|
49 | 14. donewins |
|
|
50 | 15. dopython |
|
|
51 | 16. dosbin |
|
|
52 | 17. dosed |
|
|
53 | 18. dosym |
|
|
54 | 19. find-packages |
|
|
55 | 20. find-requires |
|
|
56 | 21. fowners |
|
|
57 | 22. fperms |
|
|
58 | 23. import-configsettings |
|
|
59 | 24. import-settings |
|
|
60 | 25. megadigest |
|
|
61 | 26. megadownload |
|
|
62 | 27. megatouch |
|
|
63 | 28. newbin |
|
|
64 | 29. newdoc |
|
|
65 | 30. newexe |
|
|
66 | 31. newins |
|
|
67 | 32. newlib.a |
|
|
68 | 33. newlib.so |
|
|
69 | 34. newman |
|
|
70 | 36. newsbin |
|
|
71 | 37. pkgmerge |
|
|
72 | 38. pmake |
|
|
73 | 39. portage-maintain |
|
|
74 | 40. prepall |
|
|
75 | 41. prepalldocs |
|
|
76 | 42. prepallinfo |
|
|
77 | 43. prepallman |
|
|
78 | 44. prepallstrip |
|
|
79 | 45. prepinfo |
|
|
80 | 46. preplib |
|
|
81 | 47. preplib.so |
|
|
82 | 48. prepman |
|
|
83 | 49. prepstrip |
|
|
84 | 50. unpack |
|
|
85 | 51. use |
22 | |
86 | |
23 | ------------------------------------------------------------------------ |
87 | ------------------------------------------------------------------------ |
24 | |
88 | |
25 | I. Introduction |
89 | I. Introduction |
26 | |
90 | |
… | |
… | |
129 | net-print - print servers and clients |
193 | net-print - print servers and clients |
130 | |
194 | |
131 | net-www - http/www servers and clients |
195 | net-www - http/www servers and clients |
132 | |
196 | |
133 | sys-apps - system-critical applications and utilities |
197 | sys-apps - system-critical applications and utilities |
134 | |
|
|
135 | sys-build - stuff thats in the build tarball; you don't |
|
|
136 | normally need any of these packages unless you are |
|
|
137 | building your entire system from scratch. |
|
|
138 | |
198 | |
139 | sys-devel - base development packages, such as gcc and make |
199 | sys-devel - base development packages, such as gcc and make |
140 | |
200 | |
141 | sys-kernel - linux kernels |
201 | sys-kernel - linux kernels |
142 | |
202 | |
… | |
… | |
159 | package to build should be called '${PF}-gentoo.diff'. You |
219 | package to build should be called '${PF}-gentoo.diff'. You |
160 | should not compress these diffs, since 1) they should not be big |
220 | should not compress these diffs, since 1) they should not be big |
161 | enough to require compressing, and 2) cvs does not play well |
221 | enough to require compressing, and 2) cvs does not play well |
162 | with binary files. |
222 | with binary files. |
163 | |
223 | |
164 | Please add a suffix or prefix such as ${PV}-${PR} to the tail |
224 | Please add a suffix or prefix such as ${PV}-r${PR} (or just |
165 | of every file you put into the files directory, so that the |
225 | ${PV} if ${PR} is 0) to the tail of every file you put into |
166 | files used for each individual version of your ebuild scripts |
226 | the files directory, so that the files used for each |
167 | are distinguishable from one another, and so that the changes |
227 | individual version of your ebuild scripts are distinguishable |
168 | between different revisions are visible. |
228 | from one another, and so that the changes between different |
|
|
229 | revisions are visible. |
|
|
230 | |
|
|
231 | If you have many files that should go into the files |
|
|
232 | directory, you should create a subdirectory files/${PV}-${PR} |
|
|
233 | (or just files/${PV} if ${PR} is 0), and put all these files |
|
|
234 | in there. If you use this method, you do not need to suffix |
|
|
235 | the names of the files in this directory with the ebuild |
|
|
236 | version. |
169 | |
237 | |
170 | III. .ebuild Files |
238 | III. .ebuild Files |
171 | |
239 | |
172 | .ebuild files are the basis for the entire portage |
240 | .ebuild files are the basis for the entire portage |
173 | system. They contain all the information required to build a |
241 | system. They contain all the information required to build a |
… | |
… | |
209 | The fourth section of the .ebuild file name is always the |
277 | The fourth section of the .ebuild file name is always the |
210 | .ebuild extension. |
278 | .ebuild extension. |
211 | |
279 | |
212 | B. Contents of an .ebuild File |
280 | B. Contents of an .ebuild File |
213 | |
281 | |
|
|
282 | 1. Variable Settings |
|
|
283 | |
|
|
284 | The first part of every ebuild file is made up of a number of |
|
|
285 | variable settings. The variables you can set are |
|
|
286 | |
214 | C. Rules for Writing an .ebuild File |
287 | C. Rules for Writing an .ebuild File |
215 | |
288 | |
216 | IV. Filesystem Locations |
289 | IV. Filesystem Locations |
217 | |
290 | |
218 | A. Introduction to the FHS |
291 | A. Introduction to the FHS |
219 | |
292 | |
220 | B. How to Fit Your Packages into the Filesystem |
293 | B. How to Fit Your Packages into the Filesystem |
|
|
294 | |
|
|
295 | V. The Portage Scripts and Utilities |
|
|
296 | |
|
|
297 | A. Public Scripts |
|
|
298 | |
|
|
299 | 1. ebuild |
|
|
300 | |
|
|
301 | 2. portage-merge |
|
|
302 | |
|
|
303 | 3. portage-unmerge |
|
|
304 | |
|
|
305 | 4. portage-maintain |
|
|
306 | |
|
|
307 | 5. pkgmerge |
|
|
308 | |
|
|
309 | 6. pkgname |
|
|
310 | |
|
|
311 | B. Private Scripts |
|
|
312 | |
|
|
313 | 1. dobin |
|
|
314 | |
|
|
315 | 2. dodeps |
|
|
316 | |
|
|
317 | 3. dodir |
|
|
318 | |
|
|
319 | 4. dodoc |
|
|
320 | |
|
|
321 | 5. doexe |
|
|
322 | |
|
|
323 | 6. dohard |
|
|
324 | |
|
|
325 | 7. doinfo |
|
|
326 | |
|
|
327 | 8. doins |
|
|
328 | |
|
|
329 | 9. dolib |
|
|
330 | |
|
|
331 | 10. dolib.a |
|
|
332 | |
|
|
333 | 11. dolib.so |
|
|
334 | |
|
|
335 | 12. doman |
|
|
336 | |
|
|
337 | 13. domo |
|
|
338 | |
|
|
339 | 14. donewins |
|
|
340 | |
|
|
341 | 15. dopython |
|
|
342 | |
|
|
343 | 16. dosbin |
|
|
344 | |
|
|
345 | 17. dosed |
|
|
346 | |
|
|
347 | 18. dosym |
|
|
348 | |
|
|
349 | 19. find-packages |
|
|
350 | |
|
|
351 | 20. find-requires |
|
|
352 | |
|
|
353 | 21. fowners |
|
|
354 | |
|
|
355 | 22. fperms |
|
|
356 | |
|
|
357 | 23. import-configsettings |
|
|
358 | |
|
|
359 | 24. import-settings |
|
|
360 | |
|
|
361 | 25. megadigest |
|
|
362 | |
|
|
363 | 26. megadownload |
|
|
364 | |
|
|
365 | 27. megatouch |
|
|
366 | |
|
|
367 | 28. newbin |
|
|
368 | |
|
|
369 | 29. newdoc |
|
|
370 | |
|
|
371 | 30. newexe |
|
|
372 | |
|
|
373 | 31. newins |
|
|
374 | |
|
|
375 | 32. newlib.a |
|
|
376 | |
|
|
377 | 33. newlib.so |
|
|
378 | |
|
|
379 | 34. newman |
|
|
380 | |
|
|
381 | 36. newsbin |
|
|
382 | |
|
|
383 | 37. pkgmerge |
|
|
384 | |
|
|
385 | 38. pmake |
|
|
386 | |
|
|
387 | 39. portage-maintain |
|
|
388 | |
|
|
389 | 40. prepall |
|
|
390 | |
|
|
391 | 41. prepalldocs |
|
|
392 | |
|
|
393 | 42. prepallinfo |
|
|
394 | |
|
|
395 | 43. prepallman |
|
|
396 | |
|
|
397 | 44. prepallstrip |
|
|
398 | |
|
|
399 | 45. prepinfo |
|
|
400 | |
|
|
401 | 46. preplib |
|
|
402 | |
|
|
403 | 47. preplib.so |
|
|
404 | |
|
|
405 | 48. prepman |
|
|
406 | |
|
|
407 | 49. prepstrip |
|
|
408 | |
|
|
409 | 50. unpack |
|
|
410 | |
|
|
411 | 51. use |