Gentoo Archives: gentoo-dev

From: Todd Wright <wylie@××××××××××.org>
To: gentoo-dev@g.o
Subject: RE: Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question
Date: Wed, 17 Apr 2002 07:08:15
Message-Id: NCEBJBHELIGGHDDGAEGNGEBBDJAA.wylie@geekasylum.org
In Reply to: Re: Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question by Pichai Asokan
1 > > Pichai Asokan wrote:
2 > > >Can some of the developers take a few minutes to suggest
3 > > >the ebuilds to study for 'would be contributors'?
4 > >
5 > > Without being specific I'd say look at ones for software you have
6 > > compiled on your own from the source in the past, that way you'll be
7 > > familar with what should be going on.
8 > Thanks;
9 > but often it was a case of
10 > (un)tar
11 > ./configure
12 > make
13 > make install
14 > Well; I could have looked at what went where, but I never did :-(
15 > So I am not sure how much this will help.
16 > P Asokan
17
18 Pichai,
19 It will help, as I said in my email to you off-list, looking at other ebuilds is a great way to learn how to write them. In fact you will see that usually, what a lot of ebuilds do is
20 (un)tar
21 ./configure
22 make
23 make install
24
25 Not too difficult, huh? Its pretty familiar. What you need to look at is mainly how the ebuild optionally includes (or excludes) for example, ssl support by checking the use flags and then adding the appropriate option to the ./configure parms
26
27 You dont need to know what goes where. Portage builds everything in a sandbox. The 'make install' part should install everything to the 'image' dir (under /var/tmp/portage<package>). Sometimes it needs special attention to achieve this. You may have seen people complain about ACCESS DENIED errors - you get these if 'make install' trys to put things outside of this 'secured' directory, so you will see ebuilds that say 'make DESTDIR=${D} install' to ensure everything is installed into the sandbox.
28
29 Later the src_install() function of the ebuild moves everything to its proper and final place on the system. Thats probably the most compex part of putting tother an ebuild, and once youve done it a couple of times, its not so tough.
30
31 Anyway, sounds like you're on your way. Feel free to bug me again if you need any help.
32
33 -- _--_|\ --------- Todd Wright -- wylie@××××××××××.org --------
34 / \
35 \_.--._* <--- http://www.dreams.darker.net/~wylie/
36 v Mobile: +61-403-796-001 Ph: +61-2-9521-8677
37 ----------------------------------------------------------------