1 |
Quoting Matthew Walker (mwalker@×××××××.net): |
2 |
> I'm writing my first ebuild, and I'm having a hard time figuring out how |
3 |
> to get it to install all the files properly once they've been created in |
4 |
> the image directory. I've included my ebuild file. Any help would be |
5 |
> greatly appreciated. |
6 |
... |
7 |
> src_install () { |
8 |
> make DESTDIR=${D} install || die |
9 |
> |
10 |
> dodir /usr/bin |
11 |
> dodir /usr/share/doc/${PN}-${PV} |
12 |
> dodir /usr/share/${PN} |
13 |
> dodir /usr/share/${PN}/images |
14 |
> dodir /usr/share/${PN}/sounds |
15 |
> |
16 |
> dobin ${D}/usr/bin/xscorch |
17 |
> dobin ${D}/usr/bin/xscorch-server |
18 |
> |
19 |
> insinto /usr/share/man/man6 |
20 |
> doins ${D}/usr/share/man/man6/${PN}.6.gz |
21 |
> |
22 |
> dodoc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO |
23 |
> } |
24 |
|
25 |
Hi, i have written yesterday my first too ;) If i read all the stuff |
26 |
right the ${D} in the do<something> helperapps is unnecessary. This is |
27 |
hardly ;) explained in the table in http://www.gentoo.org/doc/gentoo-howto.html |
28 |
I read many of the ebuildfiles to get here and there a picture :) There |
29 |
is a usefull manpage (man 5 ebuild) and a usefull skeleton and last but |
30 |
not least the documentation and mailinglistarchive (is there a search |
31 |
mechanism anywhere?). |
32 |
|
33 |
If you are not sure if your installscript puts the thing into right |
34 |
directories (meaning outside PORTAGE_TMPDIR) then use |
35 |
FEATURES="sandbox". If i have read right this will protect you from |
36 |
overwriting you system :) But (!) watch carefully imho not everything is |
37 |
logged. e.g. the bernstein setup mechanism fails using mkdir(), but |
38 |
there is no logwarning because no "new" file|dir created. |
39 |
|
40 |
Another thing is the way how to install things. Imho it is a better |
41 |
style to patch the Makefiles(.in) to improve or correct the ${D} |
42 |
installation than to dodir/dobin/insinto,... doing yourself. The reason |
43 |
for this the potential difference between a "make install" and doing the |
44 |
"same" yourself. I found it maddening in some distros that the |
45 |
packagemaintainers forgot these and that in the package that a "make |
46 |
install" would have installed. Another adavantage would be if the author |
47 |
of the package change the installation your patch won't properly apply |
48 |
(in most cases not in all!). The Request for controlling the makefiles |
49 |
is so right, but in these concepts even the controller make mistakes and |
50 |
every hinting mechanism like sandox and (failed) patching should be used |
51 |
but must not be relied on. |
52 |
|
53 |
I hope this will help you and that i don't say anything wrong :) |
54 |
|
55 |
Markus Brischke aka Zoke |