ebuild(5): econf --disable-dep in EAPI 4
[portage.git] / man / ebuild.5
1 .TH "EBUILD" "5" "Sep 2010" "Portage VERSION" "Portage"
2 .SH "NAME"
3 ebuild \- the internal format, variables, and functions in an ebuild script
4 .SH "DESCRIPTION"
5 The
6 .BR ebuild (1)
7 program accepts a single ebuild script as an argument.  This script
8 contains variables and commands that specify how to download, unpack,
9 patch, compile, install and merge a particular software package from
10 its original sources.  In addition to all of this, the ebuild script
11 can also contain pre/post install/remove commands, as required.  All
12 ebuild scripts are written in bash.
13 .SH "EXAMPLES"
14 Here's a simple example ebuild:
15
16 .DS
17 .nf
18 # Copyright 1999\-2009 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: $
21
22 EAPI="4"
23
24 inherit some_eclass another_eclass
25
26 DESCRIPTION="Super\-useful stream editor (sed)"
27 HOMEPAGE="http://www.gnu.org/software/sed/sed.html"
28 SRC_URI="ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.gz"
29
30 LICENSE="GPL\-2"
31 SLOT="0"
32 KEYWORDS="~x86"
33 IUSE=""
34
35 RDEPEND=""
36 DEPEND="nls? ( sys-devel/gettext )"
37
38 src_configure() {
39         econf \\
40                 \-\-bindir="${EPREFIX}"/bin
41 }
42
43 src_install() {
44         emake DESTDIR="${D}" install
45         dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog
46 }
47 .fi
48 .SH "VARIABLES"
49 .TP
50 .B MISC USAGE NOTES
51 \- All variables defined in \fBmake.conf\fR(5) are available for use in
52 ebuilds (such as the PORTAGE* and PORTDIR* variables)
53 .br
54 \- When assigning values to variables in ebuilds, you \fBcannot have a
55 space\fR between the variable name and the equal sign.
56 .br
57 \- Variable values should only contain characters that are members of the
58 \fBascii\fR(7) character set. This requirement is mandated by \fBGLEP 31\fR.
59 .TP
60 .B P
61 This variable contains the package name without the ebuild revision.
62 This variable must NEVER be modified.
63 .br
64 \fBxfree\-4.2.1\-r2.ebuild\fR \-\-> \fB$P\fR=='\fIxfree\-4.2.1\fR'
65 .TP
66 .B PN
67 Contains the name of the script without the version number.
68 .br
69 \fBxfree\-4.2.1\-r2.ebuild\fR \-\-> \fB$PN\fR=='\fIxfree\fR'
70 .TP
71 .B PV
72 Contains the version number without the revision.
73 .br
74 \fBxfree\-4.2.1\-r2.ebuild\fR \-\-> \fB$PV\fR=='\fI4.2.1\fR'
75 .TP
76 .B PR
77 Contains the revision number or 'r0' if no revision number exists.
78 .br
79 \fBxfree\-4.2.1\-r2.ebuild\fR \-\-> \fB$PR\fR=='\fIr2\fR'
80 .TP
81 .B PVR
82 Contains the version number with the revision.
83 .br
84 \fBxfree\-4.2.1\-r2.ebuild\fR \-\-> \fB$PVR\fR=='\fI4.2.1\-r2\fR'
85 .TP
86 .B PF
87 Contains the full package name \fI[PN]\-[PVR]\fR
88 .br
89 \fBxfree\-4.2.1\-r2.ebuild\fR \-\-> \fB$PF\fR=='\fIxfree\-4.2.1\-r2\fR'
90 .TP
91 .B CATEGORY
92 Contains the package category name.
93 .TP
94 .B A
95 Contains all source files required for the package.  This variable must
96 not be defined. It is autogenerated from the \fISRC_URI\fR variable.
97 .TP
98 \fBWORKDIR\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/work"\fR
99 Contains the path to the package build root.  Do not modify this variable.
100 .TP
101 \fBFILESDIR\fR = \fI"${PORTDIR}/${CATEGORY}/${PN}/files"\fR
102 Contains the path to the 'files' sub folder in the package specific
103 location in the portage tree.  Do not modify this variable.
104 .TP
105 .B EPREFIX
106 Beginning with \fBEAPI 3\fR, contains the offset
107 that this Portage was configured for during
108 installation.  The offset is sometimes necessary in an ebuild or eclass,
109 and is available in such cases as ${EPREFIX}.  EPREFIX does not contain
110 a trailing slash, therefore an absent offset is represented by the empty
111 string.  Do not modify this variable.
112 .TP
113 \fBS\fR = \fI"${WORKDIR}/${P}"\fR
114 Contains the path to the temporary \fIbuild directory\fR.  This variable
115 is used by the functions \fIsrc_compile\fR and \fIsrc_install\fR.  Both
116 are executed with \fIS\fR as the current directory.  This variable may
117 be modified to match the extraction directory of a tarball for the package.
118 .TP
119 \fBT\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/temp"\fR
120 Contains the path to a \fItemporary directory\fR.  You may use this for
121 whatever you like.
122 .TP
123 \fBD\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/"\fR
124 Contains the path to the temporary \fIinstall directory\fR.  Every write
125 operation that does not involve the helper tools and functions (found below)
126 should be prefixed with ${D}.
127 Beginning with \fBEAPI 3\fR, the offset prefix often needs
128 to be taken into account here, for which the variable
129 ${ED} is provided (see below).
130 Do not modify this variable.
131 .TP
132 \fBED\fT = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/${EPREFIX}/"\fR
133 Beginning with \fBEAPI 3\fR, contains the path
134 "${D%/}${EPREFIX}/" for convenience purposes.
135 For \fBEAPI\fR values prior to \fBEAPI 3\fR which do
136 not support \fB${ED}\fR, helpers use \fB${D}\fR where
137 they would otherwise use \fB${ED}\fR.
138 Do not modify this variable.
139 .TP
140 .B PORTAGE_LOG_FILE
141 Contains the path of the build log. If \fBPORT_LOGDIR\fR variable is unset then
142 \fBPORTAGE_LOG_FILE\fR=\fB"${T}/build.log"\fR.
143 .TP
144 \fBROOT\fR = \fI"/"\fR
145 Contains the path that portage should use as the root of the live filesystem.
146 When packages wish to make changes to the live filesystem, they should do so in
147 the tree prefixed by ${ROOT}.  Often the offset prefix needs to be taken
148 into account here, for which the variable ${EROOT} is provided (see
149 below).  Do not modify this variable.
150 .TP
151 \fBEROOT\fR = \fI"${ROOT%/}${EPREFIX}/"\fR
152 Beginning with \fBEAPI 3\fR, contains
153 "${ROOT%/}${EPREFIX}/" for convenience
154 purposes. Do not modify this variable.
155 .TP
156 \fBDESCRIPTION\fR = \fI"A happy little package"\fR
157 Should contain a short description of the package.
158 .TP
159 \fBEAPI\fR = \fI"0"\fR
160 Defines the ebuild API version to which this package conforms. If not
161 defined then it defaults to "0". If portage does not recognize the
162 EAPI value then it will mask the package and refuse to perform any
163 operations with it since this means that a newer version of portage
164 needs to be installed first. For maximum backward compatiblity, a
165 package should conform to the lowest possible EAPI. Note that anyone
166 who uses the \fBebuild\fR(1) and \fBrepoman\fR(1) commands with this
167 package will be required to have a version of portage that recognizes
168 the EAPI to which this package conforms.
169 .TP
170 \fBSRC_URI\fR = \fI"http://happy.com/little/${P}.tar.gz"\fR
171 Contains a list of URIs for the required source files.  It can contain
172 multiple URIs for a single source file.  The list is processed in order
173 if the file was not found on any of the \fIGENTOO_MIRRORS\fR.
174 Beginning with \fBEAPI 2\fR, the output file name of a given URI may be
175 customized with a "->" operator on the right hand side, followed by the
176 desired output file name. All tokens, including the operator and output
177 file name, should be separated by whitespace.
178 .TP
179 \fBHOMEPAGE\fR = \fI"http://happy.com/"\fR
180 Should contain a list of URIs for the sources main sites and other further
181 package dependent information.
182 .TP
183 \fBKEYWORDS\fR = \fI[\-~][x86,ppc,sparc,mips,alpha,arm,hppa]\fR
184 Should contain appropriate list of arches that the ebuild is know to
185 work/not work.  By default if you do not know if an ebuild runs under
186 a particular arch simply omit that KEYWORD.  If the ebuild will not
187 work on that arch include it as \-ppc for example.  If the ebuild is
188 being submitted for inclusion, it must have ~arch set for architectures
189 where it has been PROVEN TO WORK.  (Packages KEYWORDed this way may be
190 unmasked for testing by setting ACCEPT_KEYWORDS="~arch" on the command
191 line, or in \fBmake.conf\fR(5)) For an authoritative list please review
192 /usr/portage/profiles/arch.list.  Please keep this list in alphabetical order.
193 .TP
194 \fBSLOT\fR
195 This sets the SLOT for packages that may need to have multiple versions
196 co\-exist.  By default you should set \fBSLOT\fR="0".  If you are unsure, then
197 do not fiddle with this until you seek some guidance from some guru.  This
198 value should \fINEVER\fR be left undefined.
199 .TP
200 \fBLICENSE\fR
201 This should be a space delimited list of licenses that the package falls
202 under.  This \fB_must_\fR be set to a matching license in
203 /usr/portage/licenses/. If the license does not exist in portage yet, you
204 must add it first.
205 .TP
206 \fBIUSE\fR
207 This should be a list of any and all USE flags that are leveraged within
208 your build script.  The only USE flags that should not be listed here are
209 arch related flags (see \fBKEYWORDS\fR). Beginning with \fBEAPI 1\fR, it
210 is possible to prefix flags with + or - in order to create default settings
211 that respectively enable or disable the corresponding \fBUSE\fR flags. For
212 details about \fBUSE\fR flag stacking order, refer to the \fBUSE_ORDER\fR
213 variable in \fBmake.conf\fR(5). Given the default \fBUSE_ORDER\fR setting,
214 negative IUSE default settings are ineffective since profile and user
215 configuration settings override them.
216 .TP
217 \fBDEPEND\fR
218 This should contain a list of all packages that are required for the
219 program to compile.
220 .RS
221 .TP
222 .B DEPEND Atoms
223 A depend atom is simply a dependency that is used by portage when calculating
224 relationships between packages.  Please note that if the atom has not already
225 been emerged, then the latest version available is matched.
226 .RS
227 .TP
228 .B Atom Bases
229 The base atom is just a full category/packagename.  Hence, these are base atoms:
230
231 .nf
232 .I sys\-apps/sed
233 .I sys\-libs/zlib
234 .I net\-misc/dhcp
235 .fi
236 .TP
237 .B Atom Versions
238 It is nice to be more specific and say that only certain versions of atoms are
239 acceptable.  Note that versions must be combined with a prefix (see below).  
240 Hence you may add a version number as a postfix to the base:
241
242 .nf
243 sys\-apps/sed\fI\-4.0.5\fR
244 sys\-libs/zlib\fI\-1.1.4\-r1\fR
245 net\-misc/dhcp\fI\-3.0_p2\fR
246 .fi
247
248 Versions are normally made up of two or three numbers separated by periods, such
249 as 1.2 or 4.5.2.  This string may be followed by a character such as 1.2a or 
250 4.5.2z.  Note that this letter is \fBnot\fR meant to indicate alpha, beta, 
251 etc... status.  For that, use the optional suffix; either _alpha, _beta, _pre 
252 (pre\-release), _rc (release candidate), or _p (patch).  This means for the 
253 3rd pre\-release of a package, you would use something like 1.2_pre3.  The 
254 suffixes here can be arbitrarily chained without limitation.
255 .TP
256 .B Atom Prefix Operators [> >= = <= <]
257 Sometimes you want to be able to depend on general versions rather than specifying
258 exact versions all the time.  Hence we provide standard boolean operators:
259
260 .nf
261 \fI>\fRmedia\-libs/libgd\-1.6
262 \fI>=\fRmedia\-libs/libgd\-1.6
263 \fI=\fRmedia\-libs/libgd\-1.6
264 \fI<=\fRmedia\-libs/libgd\-1.6
265 \fI<\fRmedia\-libs/libgd\-1.6
266 .fi
267 .TP
268 .B Extended Atom Prefixes [!~] and Postfixes [*]
269 Now to get even fancier, we provide the ability to define blocking packages and
270 version range matching.  Also note that these extended prefixes/postfixes may
271 be combined in any way with the atom classes defined above.  Here are some common
272 examples you may find in the portage tree:
273
274 .nf
275 \fI!\fRapp\-text/dos2unix
276 =dev\-libs/glib\-2\fI*\fR
277 \fI!\fR=net\-fs/samba\-2\fI*\fR
278 \fI~\fRnet\-libs/libnet\-1.0.2a
279 \fI!!\fR<sys\-apps/portage\-2.1.4_rc1\fI\fR
280 .fi
281
282 \fI!\fR means block packages from being installed at the same time.
283 .br
284 \fI!!\fR means block packages from being installed at the same time
285 and explicitly disallow them from being temporarily installed
286 simultaneously during a series of upgrades. This syntax is supported
287 beginning with \fBEAPI 2\fR.
288 .br
289 \fI*\fR means match any version of the package so long
290 as the specified string prefix is matched. So with a
291 version of '2*', we can match '2.1', '2.2', '2.2.1',
292 etc... and not match version '1.0', '3.0', '4.1', etc...
293 Beware that, due to the string matching nature, '20'
294 will also be matched by '2*'. The version part
295 that comes before the '*' must be a valid version in the absence of the '*'.
296 For example, '2' is a valid version and '2.' is not. Therefore, '2*' is
297 allowed and '2.*' is not.
298 .br
299 \fI~\fR means match any revision of the base version specified.  So in the
300 above example, we would match versions '1.0.2a', '1.0.2a\-r1', '1.0.2a\-r2',
301 etc...
302 .TP
303 .B Atom Slots
304 Beginning with \fBEAPI 1\fR, any atom can be constrained to match a specific
305 \fBSLOT\fR. This is accomplished by appending a colon followed by a
306 \fBSLOT\fR:
307
308 .nf
309 x11\-libs/qt:3
310 \fI~\fRx11\-libs/qt-3.3.8:3
311 \fI>=\fRx11\-libs/qt-3.3.8:3
312 \fI=\fRx11\-libs/qt-3.3*:3
313 .fi
314 .TP
315 .B Atom USE
316 Beginning with \fBEAPI 2\fR, any atom can be constrained to match specific
317 \fBUSE\fR flag settings. When used together with \fBSLOT\fR dependencies,
318 \fBUSE\fR dependencies appear on the right hand side of \fBSLOT\fR
319 dependencies.
320
321 .RS
322 .TP
323 .B Unconditional USE Dependencies
324 .TS
325 l l
326 __
327 l l.
328 Example Meaning
329
330 foo[bar]        foo must have bar enabled
331 foo[bar,baz]    foo must have both bar and baz enabled
332 foo[\-bar,baz]  foo must have bar disabled and baz enabled
333 .TE
334
335 .TP
336 .B Conditional USE Dependencies
337 .TS
338 l l
339 __
340 l l.
341 Compact Form    Equivalent Expanded Form
342
343 foo[bar?]       bar? ( foo[bar] ) !bar? ( foo )
344 foo[!bar?]      bar? ( foo ) !bar? ( foo[\-bar] )
345 foo[bar=]       bar? ( foo[bar] ) !bar? ( foo[\-bar] )
346 foo[!bar=]      bar? ( foo[\-bar] ) !bar? ( foo[bar] )
347 .TE
348 .RE
349 .RE
350 .TP
351 .B Dynamic DEPENDs
352 Sometimes programs may depend on different things depending on the USE
353 variable.  Portage offers a few options to handle this.  Note that when
354 using the following syntaxes, each case is considered as 1 Atom in the
355 scope it appears.  That means that each Atom both conditionally include
356 multiple Atoms and be nested to an infinite depth.
357 .RS
358 .TP
359 .B usevar? ( DEPEND Atom )
360 To include the jpeg library when the user has jpeg in \fBUSE\fR, simply use the
361 following syntax:
362 .br
363 .B jpeg? ( media\-libs/jpeg )
364 .TP
365 .B !usevar? ( Atom )
366 If you want to include a package only if the user does not have a certain option
367 in their \fBUSE\fR variable, then use the following syntax:
368 .br
369 .B !nophysfs? ( dev\-games/physfs )
370 .br
371 This is often useful for those times when you want to want to add optional support
372 for a feature and have it enabled by default.
373 .TP
374 .B usevar? ( Atom if true ) !usevar? ( Atom if false )
375 For functionality like the tertiary operator found in C you must use
376 two statements, one normal and one inverted.  If a package uses
377 GTK2 or GTK1, but not both, then you can handle that like this:
378 .br
379 .B gtk2? ( =x11\-libs/gtk+\-2* ) !gtk2? ( =x11\-libs/gtk+\-1* )
380 .br
381 That way the default is the superior GTK2 library.
382 .TP
383 .B || ( Atom Atom ... )
384 When a package can work with a few different packages but a virtual is not
385 appropriate, this syntax can easily be used.
386 .nf
387 .B || (
388 .B      app\-games/unreal\-tournament
389 .B      app\-games/unreal\-tournament\-goty
390 .B )
391 .fi
392 Here we see that unreal\-tournament has a normal version and it has a goty
393 version.  Since they provide the same base set of files, another package can
394 use either.  Adding a virtual is inappropriate due to the small scope of it.
395 .br
396 Another good example is when a package can be built with multiple video 
397 interfaces, but it can only ever have just one.
398 .nf
399 .B || (
400 .B      sdl? ( media\-libs/libsdl )
401 .B      svga? ( media\-libs/svgalib )
402 .B      opengl? ( virtual/opengl )
403 .B      ggi? ( media\-libs/libggi )
404 .B      virtual/x11
405 .B )
406 .fi
407 Here only one of the packages will be chosen, and the order of preference is
408 determined by the order in which they appear.  So sdl has the best chance of
409 being chosen, followed by svga, then opengl, then ggi, with a default of X if
410 the user does not specify any of the previous choices.
411 .br
412 Note that if any of the packages listed are already merged, the package manager
413 will use that to consider the dependency satisfied.
414 .RE
415
416 .RE
417 .TP
418 \fBRDEPEND\fR
419 This should contain a list of all packages that are required for this
420 program to run (aka runtime depend). If this is not set in \fBEAPI\fR
421 3 or earlier, then it defaults to the value of \fBDEPEND\fR. In
422 EAPI 4 or later, \fBRDEPEND\fR will never be implicitly set.
423 .br
424 You may use the same syntax to vary dependencies as seen above in \fBDEPEND\fR.
425 .TP
426 \fBPDEPEND\fR
427 This should contain a list of all packages that should be merged after this one,
428 but may be merged before if need be.
429 .br
430 You may use the same syntax to vary dependencies as seen above in \fBDEPEND\fR.
431 .TP
432 \fBRESTRICT\fR = \fI[strip,mirror,fetch,userpriv]\fR
433 This should be a space delimited list of portage features to restrict.
434 You may use conditional syntax to vary restrictions as seen above in DEPEND.
435 .PD 0
436 .RS
437 .TP
438 .I binchecks
439 Disable all QA checks for binaries.  This should ONLY be used in packages
440 for which binary checks make no sense (linux\-headers and kernel\-sources, for
441 example, can safely be skipped since they have no binaries).  If the binary
442 checks need to be skipped for other reasons (such as proprietary binaries),
443 see the \fBQA CONTROL VARIABLES\fR section for more specific exemptions.
444 .TP
445 .I bindist
446 Distribution of built packages is restricted.
447 .TP
448 .I fetch
449 like \fImirror\fR but the files will not be fetched via \fBSRC_URI\fR either.
450 .TP
451 .I installsources
452 Disables installsources for specific packages. This is for packages with
453 binaries that are not compatible with debugedit.
454 .TP
455 .I mirror
456 files in \fBSRC_URI\fR will not be downloaded from the \fBGENTOO_MIRRORS\fR.
457 .TP
458 .I primaryuri
459 fetch from URIs in \fBSRC_URI\fR before \fBGENTOO_MIRRORS\fR.
460 .TP
461 .I strip
462 final binaries/libraries will not be stripped of debug symbols.
463 .TP
464 .I test
465 do not run src_test even if user has \fBFEATURES\fR=test.
466 .TP
467 .I userpriv
468 Disables userpriv for specific packages.
469 .RE
470 .PD 1
471 .TP
472 \fBPROPERTIES\fR = \fI[interactive]\fR
473 A space delimited list of properties, with conditional syntax support.
474 .PD 0
475 .RS
476 .TP
477 .I interactive
478 One or more ebuild phases will produce a prompt that requires user interaction.
479 .RE
480 .PD 1
481 .TP
482 \fBPROVIDE\fR = \fI"virtual/TARGET"\fR
483 This variable should only be used when a package provides a virtual target.
484 For example, blackdown\-jdk and sun\-jdk provide \fIvirtual/jdk\fR.  This
485 allows for packages to depend on \fIvirtual/jdk\fR rather than on blackdown
486 or sun specifically.
487 .SH "QA CONTROL VARIABLES"
488 .TP
489 .B USAGE NOTES
490 Several QA variables are provided which allow an ebuild to manipulate some
491 of the QA checks performed by portage.  Use of these variables in ebuilds
492 should be kept to an absolute minimum otherwise they defeat the purpose
493 of the QA checks, and their use is subject to agreement of the QA team.
494 They are primarily intended for use by ebuilds that install closed\-source
495 binary objects that cannot be altered.
496 .br
497 Note that objects that violate these rules may fail on some architectures.
498 .TP
499 \fBQA_PREBUILT\fR
500 This should contain a list of file paths, relative to the image
501 directory, of files that are pre\-built binaries. Paths
502 listed here will be appended to each of the QA_* variables
503 listed below. The paths may contain fnmatch\-like patterns
504 which will be internally translated to regular expressions for
505 the QA_* variables that support regular expressions instead
506 of fnmatch patterns. The translation mechanism simply replaces
507 "*" with ".*".
508 .TP
509 \fBQA_TEXTRELS\fR
510 This variable can be set to a list of file paths, relative to the image
511 directory, of files that contain text relocations that cannot be eliminated.
512 The paths may contain fnmatch patterns.
513 .br
514 This variable is intended to be used on closed\-source binary objects that
515 cannot be altered.
516 .TP
517 \fBQA_EXECSTACK\fR
518 This should contain a list of file paths, relative to the image directory, of
519 objects that require executable stack in order to run.
520 The paths may contain fnmatch patterns.
521 .br
522 This variable is intended to be used on objects that truly need executable
523 stack (i.e. not those marked to need it which in fact do not).
524 .TP
525 \fBQA_WX_LOAD\fR
526 This should contain a list of file paths, relative to the image directory, of
527 files that contain writable and executable segments.  These are rare.
528 The paths may contain fnmatch patterns.
529 .TP
530 \fBQA_DT_HASH\fR
531 This should contain a list of file paths, relative to the image directory, of
532 files that contain .hash sections. The paths may contain regular expressions
533 with escape\-quoted special characters.
534 .br
535 This variable is intended to be used on files of binary packages which ignore
536 LDFLAGS variable.
537 .TP
538 \fBQA_PRESTRIPPED\fR
539 This should contain a list of file paths, relative to the image directory, of
540 files that contain pre-stripped binaries. The paths may contain regular
541 expressions with escape\-quoted special characters.
542 .TP
543 \fBQA_SONAME\fR
544 This should contain a list of file paths, relative to the image directory, of
545 shared libraries that lack SONAMEs. The paths may contain regular expressions
546 with escape\-quoted special characters.
547 .TP
548 \fBQA_DT_NEEDED\fR
549 This should contain a list of file paths, relative to the image directory, of
550 shared libraries that lack NEEDED entries. The paths may contain regular
551 expressions with escape\-quoted special characters.
552 .SH "PORTAGE DECLARATIONS"
553 .TP
554 .B inherit
555 Inherit is portage's maintenance of extra classes of functions that are
556 external to ebuilds and provided as inheritable capabilities and data. They
557 define functions and set data types as drop\-in replacements, expanded, and
558 simplified routines for extremely common tasks to streamline the build
559 process. Call to inherit cannot depend on conditions which can vary in given
560 ebuild. Specification of the eclasses contains only their name and not the
561 \fI.eclass\fR extension. Also note that the inherit statement must come
562 before other variable declarations unless these variables are used in global
563 scope of eclasses.
564 .SH "PHASE FUNCTIONS"
565 .TP
566 .B pkg_nofetch
567 If you turn on \fIfetch\fR in \fBRESTRICT\fR, then this function will be
568 run when the files in \fBSRC_URI\fR cannot be found.  Useful for
569 displaying information to the user on *how* to obtain said files.  All
570 you have to do is output a message and let the function return.  Do not
571 end the function with a call to \fBdie\fR.
572 .TP
573 .B pkg_setup
574 This function can be used if the package needs specific setup actions or
575 checks to be preformed before anything else.
576 .br
577 Initial working directory of ${PORTAGE_TMPDIR}.
578 .TP
579 .B src_unpack
580 This function is used to unpack all the sources in \fIA\fR to \fIWORKDIR\fR.
581 If not defined in the \fIebuild script\fR it calls \fIunpack ${A}\fR. Any
582 patches and other pre configure/compile modifications should be done here.
583 .br
584 Initial working directory of $WORKDIR.
585 .TP
586 .B src_prepare
587 All preparation of source code, such as application of patches, should be done
588 here. This function is supported beginning with \fBEAPI 2\fR.
589 .br
590 Initial working directory of $S.
591 .TP
592 .B src_configure
593 All necessary steps for configuration should be done here. This function is
594 supported beginning with \fBEAPI 2\fR.
595 .br
596 Initial working directory of $S.
597 .TP
598 .B src_compile
599 With less than \fBEAPI 2\fR, all necessary steps for both configuration and
600 compilation should be done here. Beginning with \fBEAPI 2\fR, only compilation
601 steps should be done here.
602 .br
603 Initial working directory of $S.
604 .TP
605 .B src_test
606 Run all package specific test cases.  The default is to run 'make check'
607 followed 'make test'.
608 .br
609 Initial working directory of $S.
610 .TP
611 .B src_install
612 Should contain everything required to install the package in the temporary
613 \fIinstall directory\fR.
614 .br
615 Initial working directory of $S.
616 .TP
617 .B pkg_preinst pkg_postinst
618 All modifications required on the live\-filesystem before and after the
619 package is merged should be placed here. Also commentary for the user
620 should be listed here as it will be displayed last.
621 .br
622 Initial working directory of $PWD.
623 .TP
624 .B pkg_prerm pkg_postrm
625 Like the pkg_*inst functions but for unmerge.
626 .br
627 Initial working directory of $PWD.
628 .TP
629 .B pkg_config
630 This function should contain optional basic configuration steps.
631 .br
632 Initial working directory of $PWD.
633 .SH "HELPER FUNCTIONS: PHASES"
634 .TP
635 .B default
636 Calls the default phase function implementation for the currently executing
637 phase. This function is supported beginning with \fBEAPI 2\fR.
638 .TP
639 .B default_*
640 Beginning with \fBEAPI 2\fR, the default pkg_nofetch and src_* phase
641 functions are accessible via a function having a name that begins with
642 default_ and ends with the respective phase function name. For example,
643 a call to a function with the name default_src_compile is equivalent to
644 a call to the default src_compile implementation.
645
646 .RS
647 .TS
648 l
649 _
650 l.
651 Default Phase Functions
652
653 default_pkg_nofetch
654 default_src_unpack
655 default_src_prepare
656 default_src_configure
657 default_src_compile
658 default_src_test
659 .TE
660 .RE
661 .SH "HELPER FUNCTIONS: GENERAL"
662 .TP
663 \fBdie\fR \fI[reason]\fR
664 Causes the current emerge process to be aborted. The final display will
665 include \fIreason\fR.
666
667 Beginning with \fBEAPI 4\fR, all helpers automatically call \fBdie\fR
668 whenever some sort of error occurs. Helper calls may be prefixed with
669 the \fBnonfatal\fR helper in order to prevent errors from being fatal.
670 .TP
671 \fBnonfatal\fR \fI<helper>\fR
672 Execute \fIhelper\fR and \fIdo not\fR call die if it fails.
673 The \fBnonfatal\fR helper is available beginning with \fBEAPI 4\fR.
674 .TP
675 \fBuse\fR \fI<USE item>\fR
676 If \fIUSE item\fR is in the \fBUSE\fR variable, the function will silently
677 return 0 (aka shell true).  If \fIUSE item\fR is not in the \fBUSE\fR
678 variable, the function will silently return 1 (aka shell false).  \fBusev\fR
679 is a verbose version of \fBuse\fR.
680 .RS
681 .TP
682 .I Example:
683 .nf
684 if use gnome ; then
685         guiconf="\-\-enable\-gui=gnome \-\-with\-x"
686 elif use gtk ; then
687         guiconf="\-\-enable\-gui=gtk \-\-with\-x"
688 elif use X ; then
689         guiconf="\-\-enable\-gui=athena \-\-with\-x"
690 else
691         # No gui version will be built
692         guiconf=""
693 fi
694 .fi
695 .RE
696 .TP
697 \fBuse_with\fR \fI<USE item>\fR \fI[configure name]\fR \fI[configure opt]\fR
698 Useful for creating custom options to pass to a configure script. If \fIUSE
699 item\fR is in the \fBUSE\fR variable and a \fIconfigure opt\fR is specified,
700 then the string \fI\-\-with\-[configure name]=[configure opt]\fR will be echoed.
701 If \fIconfigure opt\fR is not specified, then just \fI\-\-with\-[configure
702 name]\fR will be echoed.  If \fIUSE item\fR is not in the \fBUSE\fR variable,
703 then the string \fI\-\-without\-[configure name]\fR will be echoed. If
704 \fIconfigure name\fR is not specified, then \fIUSE item\fR will be used in
705 its place.
706 .RS
707 .TP
708 .I Examples:
709 .nf
710 USE="opengl"
711 myconf=$(use_with opengl)
712 (myconf now has the value "\-\-with\-opengl")
713
714 USE="jpeg"
715 myconf=$(use_with jpeg libjpeg)
716 (myconf now has the value "\-\-with\-libjpeg")
717
718 USE=""
719 myconf=$(use_with jpeg libjpeg)
720 (myconf now has the value "\-\-without\-libjpeg")
721
722 USE="sdl"
723 myconf=$(use_with sdl SDL all\-plugins)
724 (myconf now has the value "\-\-with\-SDL=all\-plugins")
725 .fi
726 .RE
727 .TP
728 \fBuse_enable\fR \fI<USE item>\fR \fI[configure name]\fR \fI[configure opt]\fR
729 Same as \fBuse_with\fR above, except that the configure options are
730 \fI\-\-enable\-\fR instead of \fI\-\-with\-\fR and \fI\-\-disable\-\fR instead of
731 \fI\-\-without\-\fR.
732 .TP
733 \fBhas\fR \fI<item>\fR \fI<item list>\fR
734 If \fIitem\fR is in \fIitem list\fR, then \fIitem\fR is echoed and \fBhas\fR
735 returns 0.  Otherwise, nothing is echoed and 1 is returned. As indicated with
736 use, there is a non\-echoing version \fBhasq\fR. Please use \fBhasq\fR in all
737 places where output is to be disregarded. Never use the output for calculation.
738 .br
739 The \fIitem list\fR is delimited by the \fIIFS\fR variable.  This variable
740 has a default value of ' ', or a space.  It is a \fBbash\fR(1) setting.
741 .TP
742 \fBhas_version\fR \fI<category/package\-version>\fR
743 Check to see if \fIcategory/package\-version\fR is installed on the system.
744 The parameter accepts all values that are acceptable in the \fBDEPEND\fR
745 variable.  The function returns 0 if \fIcategory/package\-version\fR is
746 installed, 1 otherwise.
747 .TP
748 \fBbest_version\fR \fI<package name>\fR
749 This function will look up \fIpackage name\fR in the database of currently
750 installed programs and echo the "best version" of the package that is
751 currently installed. 
752 .RS
753 .TP
754 .I Example:
755 VERINS="$(best_version net\-ftp/glftpd)"
756 .br
757 (VERINS now has the value "net\-ftp/glftpd\-1.27" if glftpd\-1.27 is installed)
758 .RE
759 .SH "HELPER FUNCTIONS: HOOKS"
760 .TP
761 \fBregister_die_hook\fR \fI[list of function names]\fR
762 Register one or more functions to call when the ebuild fails for any reason,
763 including file collisions with other packages.
764 .TP
765 \fBregister_success_hook\fR \fI[list of function names]\fR
766 Register one or more functions to call when the ebuild builds and/or installs
767 successfully.
768 .TP
769 .RE
770 .SH "HELPER FUNCTIONS: OUTPUT"
771 .TP
772 \fBeinfo\fR \fI"disposable message"\fR
773 Same as \fBelog\fR, but should be used when the message isn't important to the
774 user (like progress or status messages during the build process).
775 .TP
776 \fBelog\fR \fI"informative message"\fR
777 If you need to display a message that you wish the user to read and take
778 notice of, then use \fBelog\fR.  It works just like \fBecho\fR(1), but
779 adds a little more to the output so as to catch the user's eye. The message
780 will also be logged by portage for later review.
781 .TP
782 \fBewarn\fR \fI"warning message"\fR
783 Same as \fBeinfo\fR, but should be used when showing a warning to the user.
784 .TP
785 \fBeqawarn\fR \fI"QA warning message"\fR
786 Same as \fBeinfo\fR, but should be used when showing a QA warning to the user.
787 .TP
788 \fBeerror\fR \fI"error message"\fR
789 Same as \fBeinfo\fR, but should be used when showing an error to the user.
790 .TP
791 \fBebegin\fR \fI"helpful message"\fR
792 Like \fBeinfo\fR, we output a \fIhelpful message\fR and then hint that the
793 following operation may take some time to complete.  Once the task is
794 finished, you need to call \fBeend\fR.
795 .TP
796 \fBeend\fR \fI<status>\fR \fI["error message"]\fR
797 Followup the \fBebegin\fR message with an appropriate "OK" or "!!" (for
798 errors) marker.  If \fIstatus\fR is non\-zero, then the additional \fIerror
799 message\fR is displayed.
800 .SH "HELPER FUNCTIONS: UNPACK"
801 .TP
802 \fBunpack\fR \fI<source>\fR \fI[list of more sources]\fR
803 This function uncompresses and/or untars a list of sources into the current
804 directory. The function will append \fIsource\fR to the \fBDISTDIR\fR variable.
805 .SH "HELPER FUNCTIONS: COMPILE"
806 .TP
807 \fBeconf\fR \fI[configure options]\fR
808 This is used as a replacement for configure.  Performs:
809 .nf
810 ${\fIECONF_SOURCE\fR:-.}/configure \\
811         ${CBUILD:+\-\-build=${CBUILD}} \\
812         \-\-datadir="${EPREFIX}"/usr/share \\
813         \-\-host=${CHOST} \\
814         \-\-infodir="${EPREFIX}"/usr/share/info \\
815         \-\-localstatedir="${EPREFIX}"/var/lib \\
816         \-\-prefix="${EPREFIX}"/usr \\
817         \-\-mandir="${EPREFIX}"/usr/share/man \\
818         \-\-sysconfdir="${EPREFIX}"/etc \\
819         ${CTARGET:+\-\-target=${CTARGET}} \\
820         \-\-disable\-dependency\-tracking \\
821         \fI${EXTRA_ECONF}\fR \\
822         \fIconfigure options\fR || die "econf failed"
823 .fi
824 Note that the \fIEXTRA_ECONF\fR is for users only, not for ebuild
825 writers.  If you wish to pass more options to configure, just pass the
826 extra arguments to \fBeconf\fR. Also note that \fBeconf\fR automatically
827 calls \fBdie\fR if the configure script fails.
828 Beginning with \fBEAPI 3\fR, \fBeconf\fR uses the \fB${EPREFIX}\fR
829 variable which is disregarded for prior \fBEAPI\fR values.
830 Beginning with \fBEAPI 4\fR, \fBeconf\fR adds
831 \fI\-\-disable\-dependency\-tracking\fR to the arguments.
832 .TP
833 \fBemake\fR \fI[make options]\fR
834 This is used as a replacement for make.  Performs 'make ${MAKEOPTS}
835 \fImake options\fR' (as set in make.globals), default is MAKEOPTS="\-j2".
836
837 \fB***warning***\fR
838 .br
839 if you are going to use \fBemake\fR, make sure your build is happy with
840 parallel makes (make \-j2).  It should be tested thoroughly as parallel
841 makes are notorious for failing _sometimes_ but not always.  If you determine
842 that your package fails to build in parallel, and you are unable to resolve
843 the issue, then you should run '\fBemake\fR \-j1' instead of 'make'.
844 .SH "HELPER FUNCTIONS: INSTALL"
845 .TP
846 \fBeinstall\fR \fI[make options]\fR
847 This is used as a replacement for make install.  Performs:
848 .nf
849 make \\
850         prefix=${ED}/usr \\
851         datadir=${ED}/usr/share \\
852         infodir=${ED}/usr/share/info \\
853         localstatedir=${ED}/var/lib \\
854         mandir=${ED}/usr/share/man \\
855         sysconfdir=${ED}/etc \\
856         \fI${EXTRA_EINSTALL}\fR \\
857         \fImake options\fR \\
858         install
859 .fi
860 Please do \fBnot\fR use this in place of 'emake install DESTDIR=${D}'.
861 That is the preferred way of installing make\-based packages.  Also, do
862 not utilize the \fIEXTRA_EINSTALL\fR variable since it is for users.
863
864 .PD 0
865 .TP
866 .B prepall
867 .TP
868 .B prepalldocs
869 .TP
870 .B prepallinfo
871 .TP
872 .B prepallman
873 .TP
874 .B prepallstrip
875 .PD 1
876 Useful for when a package installs into \fB${D}\fR via scripts
877 (i.e. makefiles).  If you want to be sure that libraries are executable,
878 aclocal files are installed into the right place, doc/info/man files are
879 all compressed, and that executables are all stripped of debugging symbols,
880 then use these suite of functions.
881 .RS
882 .PD 0
883 .TP
884 .B prepall:
885 Runs \fBprepallman\fR, \fBprepallinfo\fR, \fBprepallstrip\fR, sets
886 libraries +x, and then checks aclocal directories.  Please note this
887 does \fI*not*\fR run \fBprepalldocs\fR.
888 .TP
889 .B prepalldocs:
890 Compresses all doc files in ${ED}/usr/share/doc.
891 .TP
892 .B prepallinfo:
893 Compresses all info files in ${ED}/usr/share/info.
894 .TP
895 .B prepallman:
896 Compresses all man files in ${ED}/usr/share/man.
897 .TP
898 .B prepallstrip:
899 Strips all executable files of debugging symboles.  This includes libraries.
900 .RE
901
902 .TP
903 \fBprepinfo\fR \fI[dir]\fR
904 .TP
905 \fBprepman\fR \fI[dir]\fR
906 .TP
907 \fBprepstrip\fR \fI[dir]\fR
908 .PD 1
909 Similiar to the \fBprepall\fR functions, these are subtle in their differences.
910 .RS
911 .PD 0
912 .TP
913 .B prepinfo:
914 If a \fIdir\fR is not specified, then \fBprepinfo\fR will assume the dir
915 \fIusr\fR. \fBprepinfo\fR will then compress all the files in
916 ${ED}/\fIdir\fR/info.
917 .TP
918 .B prepman:
919 If a \fIdir\fR is not specified, then \fBprepman\fR will assume the dir
920 \fIusr\fR. \fBprepman\fR will then compress all the files in
921 ${ED}/\fIdir\fR/man/*/.
922 .TP
923 .B prepstrip:
924 All the files found in ${ED}/\fIdir\fR will be stripped.  You may specify
925 multiple directories.
926 .RE
927 .PD 1
928 .TP
929 \fBdocompress\fR \fI[\-x] <path> [list of more paths]\fR
930 .RS
931 Beginning with \fBEAPI 4\fR, the \fBdocompress\fR helper is used to
932 manage lists of files to be included or excluded from optional compression.
933 If the first argument is \fB\-x\fR, add each of its subsequent arguments to
934 the exclusion list. Otherwise, add each argument to the inclusion list.
935 The inclusion list initially contains \fI/usr/share/doc\fR,
936 \fI/usr/share/info\fR, and \fI/usr/share/man\fR. The exclusion list
937 initially contains \fI/usr/share/doc/${PF}/html\fR.
938
939 The optional compression shall be carried out after \fBsrc_install\fR
940 has completed, and before the execution of any subsequent phase
941 function. For each item in the inclusion list, pretend it has the
942 value of the \fBD\fR variable prepended, then:
943
944 .RS
945 If it is a directory, act as if every file or directory immediately
946 under this directory were in the inclusion list.
947
948 If the item is a file, it may be compressed unless it has been
949 excluded as described below.
950
951 If the item does not exist, it is ignored.
952 .RE
953
954 Whether an item is to be excluded is determined as follows: For each
955 item in the exclusion list, pretend it has the value of the \fBD\fR
956 variable prepended, then:
957
958 .RS
959 If it is a directory, act as if every file or directory immediately
960 under this directory were in the exclusion list.
961
962 If the item is a file, it shall not be compressed.
963
964 If the item does not exist, it is ignored.
965 .RE
966 .RE
967 .TP
968 \fBdosed\fR \fI"s:orig:change:g" <filename>\fR
969 Beginning with \fBEAPI 4\fR, the \fBdosed\fR helper no longer exists. Ebuilds
970 should call \fBsed(1)\fR directly (and assume that it is GNU sed).
971
972 Performs sed in place on \fIfilename\fR inside ${ED}. If no expression is
973 given then \fI"s:${D}::g"\fR is used as the default expression.  Note
974 that this expression does \fBNOT\fR use the offset prefix.
975 .br
976 .BR 'dosed\ "s:/usr/local:/usr:g"\ /usr/bin/some\-script'
977 runs sed on ${ED}/usr/bin/some\-script
978 .TP
979 \fBdodir\fR \fI<path>\fR
980 Creates a directory inside of ${ED}.
981 .br
982 .BR 'dodir\ /usr/lib/apache'
983 creates ${ED}/usr/lib/apache.  Note that the do* functions will run
984 \fBdodir\fR for you.
985 .TP
986 \fBdiropts\fR \fI[options for install(1)]\fR
987 Can be used to define options for the install function used in
988 \fBdodir\fR.  The default is \fI\-m0755\fR.
989 .TP
990 \fBinto\fR \fI<path>\fR
991 Sets the root (\fIDESTTREE\fR) for other functions like \fBdobin\fR,
992 \fBdosbin\fR, \fBdoman\fR, \fBdoinfo\fR, \fBdolib\fR.
993 .br
994 The default root is /usr.
995 .TP
996 \fBkeepdir\fR \fI<path>\fR
997 Tells portage to leave a directory behind even if it is empty.  Functions
998 the same as \fBdodir\fR.
999 .TP
1000 \fBdobin\fR \fI<binary> [list of more binaries]\fR
1001 Installs a \fIbinary\fR or a list of binaries into \fIDESTTREE\fR/bin.
1002 Creates all necessary dirs.
1003 .TP
1004 \fBdosbin\fR \fI<binary> [list of more binaries]\fR
1005 Installs a \fIbinary\fR or a list of binaries into \fIDESTTREE\fR/sbin.
1006 Creates all necessary dirs.
1007 .TP
1008 \fBdoinitd\fR \fI<init.d script> [list of more init.d scripts]\fR
1009 Install Gentoo \fIinit.d scripts\fR.  They will be installed into the
1010 correct location for Gentoo init.d scripts (/etc/init.d/).  Creates all
1011 necessary dirs.
1012 .TP
1013 \fBdoconfd\fR \fI<conf.d file> [list of more conf.d file]\fR
1014 Install Gentoo \fIconf.d files\fR.  They will be installed into the
1015 correct location for Gentoo conf.d files (/etc/conf.d/).  Creates all
1016 necessary dirs.
1017 .TP
1018 \fBdoenvd\fR \fI<env.d entry> [list of more env.d entries]\fR
1019 Install Gentoo \fIenv.d entries\fR.  They will be installed into the
1020 correct location for Gentoo env.d entries (/etc/env.d/).  Creates all
1021 necessary dirs.
1022
1023 .PD 0
1024 .TP
1025 \fBdolib\fR \fI<library>\fR \fI[list of more libraries]\fR
1026 .TP
1027 \fBdolib.a\fR \fI<library>\fR \fI[list of more libraries]\fR
1028 .TP
1029 \fBdolib.so\fR \fI<library>\fR \fI[list of more libraries]\fR
1030 .PD 1
1031 Installs a library or a list of libraries into \fIDESTTREE\fR/lib.
1032 Creates all necessary dirs.
1033 .TP
1034 \fBlibopts\fR \fI[options for install(1)]\fR
1035 Can be used to define options for the install function used in
1036 the \fBdolib\fR functions.  The default is \fI\-m0644\fR.
1037 .TP
1038 \fBdoman\fR \fI[\-i18n=<locale>]\fR \fI<man\-page> [list of more man\-pages]\fR
1039 Installs manual\-pages into /usr/share/man/man[0\-9n] depending on the
1040 manual file ending.  The files are compressed if they are not already.  You
1041 can specify locale\-specific manpages with the \fI\-i18n\fR option.  Then the
1042 man\-page will be installed into /usr/share/man/\fI<locale>\fR/man[0\-9n].
1043 Beginning with \fBEAPI 2\fR, a locale\-specific manpage which contains a locale
1044 in the file name will be installed in /usr/share/man/\fI<locale>\fR/man[0\-9n],
1045 with the locale portion of the file name removed, and the \fI\-i18n\fR option
1046 has no effect. For example, with \fBEAPI 2\fR, a manpage named
1047 foo.\fI<locale>\fR.1 will be installed as
1048 /usr/share/man/\fI<locale>\fR/man1/foo.1. Beginning with \fBEAPI 4\fR,
1049 the \fI\-i18n\fR option takes precedence over the locale suffix of the
1050 file name.
1051 .PD 0
1052 .TP
1053 \fBdohard\fR \fI<filename> <linkname>\fR
1054 Beginning with \fBEAPI 4\fR, the \fBdohard\fR helper no longer exists. Ebuilds
1055 should call \fBln(1)\fR directly.
1056 .TP
1057 \fBdosym\fR \fI<filename> <linkname>\fR
1058 .PD 1
1059 Performs the ln command to create a symlink.
1060 .TP
1061 \fBdohtml\fR \fI [\-a filetypes] [\-r] [\-x list\-of\-dirs\-to\-ignore] [list\-of\-files\-and\-dirs]\fR
1062 Installs the files in the list of files (space\-separated list) into
1063 /usr/share/doc/${PF}/html provided the file ends in .htm, .html, .css, .js, .gif, .jpeg, .jpg, or .png.
1064 Setting \fI\-a\fR limits what types of files will be included,
1065 \fI\-A\fR appends to the default list, setting \fI\-x\fR sets which dirs to
1066 exclude (CVS excluded by default), \fI\-p\fR sets a document prefix, \fI\-r\fR sets recursive.
1067 .TP
1068 \fBdoinfo\fR \fI<info\-file> [list of more info\-files]\fR
1069 Installs info\-pages into \fIDESTDIR\fR/info.  Files are automatically
1070 gzipped.  Creates all necessary dirs.
1071 .TP
1072 \fBdomo\fR \fI<locale\-file> [list of more locale\-files] \fR
1073 Installs locale\-files into \fIDESTDIR\fR/usr/share/locale/[LANG]
1074 depending on local\-file's ending.  Creates all necessary dirs.
1075
1076 .PD 0
1077 .TP
1078 \fBfowners\fR \fI<permissions> <file> [files]\fR
1079 .TP
1080 \fBfperms\fR \fI<permissions> <file> [files]\fR
1081 .PD 1
1082 Performs chown (\fBfowners\fR) or chmod (\fBfperms\fR), applying
1083 \fIpermissions\fR to \fIfiles\fR.
1084 .TP
1085 \fBinsinto\fR \fI[path]\fR
1086 Sets the destination path for the \fBdoins\fR function.
1087 .br
1088 The default path is /.
1089 .TP
1090 \fBinsopts\fR \fI[options for install(1)]\fR
1091 Can be used to define options for the install function used in
1092 \fBdoins\fR.  The default is \fI\-m0644\fR.
1093 .TP
1094 \fBdoins\fR \fI[\-r] <file> [list of more files]\fR
1095 Installs files into the path controlled by \fBinsinto\fR.  This function
1096 uses \fBinstall\fR(1).  Creates all necessary dirs.
1097 Setting \-r sets recursive. Beginning with \fBEAPI 4\fR, both
1098 \fBdoins\fR and \fBnewins\fR preserve symlinks. In \fBEAPI 3\fR and
1099 earlier, symlinks are dereferenced rather than preserved.
1100 .TP
1101 \fBexeinto\fR \fI[path]\fR
1102 Sets the destination path for the \fBdoexe\fR function.
1103 .br
1104 The default path is /.
1105 .TP
1106 \fBexeopts\fR \fI[options for install(1)]\fR
1107 Can be used to define options for the install function used in \fBdoexe\fR.
1108 The default is \fI\-m0755\fR.
1109 .TP
1110 \fBdoexe\fR \fI<executable> [list of more executables]\fR
1111 Installs executables into the path controlled by \fBexeinto\fR.  This function
1112 uses \fBinstall\fR(1).  Creates all necessary dirs.
1113 .TP
1114 \fBdocinto\fR \fI[path]\fR
1115 Sets the subdir used by \fBdodoc\fR and \fBdohtml\fR
1116 when installing into the document tree
1117 (based in /usr/share/doc/${PF}/).  Default is no subdir, or just "".
1118 .TP
1119 \fBdodoc\fR \fI[-r] <document> [list of more documents]\fR
1120 Installs a document or a list of documents into /usr/share/doc/${PF}/\fI<docinto path>\fR.
1121 Documents are marked for compression.  Creates all necessary dirs.
1122 Beginning with \fBEAPI 4\fR, there is support recursion, enabled by the
1123 new \fI\-r\fR option.
1124
1125 .PD 0
1126 .TP
1127 \fBnewbin\fR \fI<old file> <new filename>\fR
1128 .TP
1129 \fBnewsbin\fR \fI<old file> <new filename>\fR
1130 .TP
1131 \fBnewinitd\fR \fI<old file> <new filename>\fR
1132 .TP
1133 \fBnewconfd\fR \fI<old file> <new filename>\fR
1134 .TP
1135 \fBnewenvd\fR \fI<old file> <new filename>\fR
1136 .TP
1137 \fBnewlib.so\fR \fI<old file> <new filename>\fR
1138 .TP
1139 \fBnewlib.a\fR \fI<old file> <new filename>\fR
1140 .TP
1141 \fBnewman\fR \fI<old file> <new filename>\fR
1142 .TP
1143 \fBnewinfo\fR \fI<old file> <new filename>\fR
1144 .TP
1145 \fBnewins\fR \fI<old file> <new filename>\fR
1146 .TP
1147 \fBnewexe\fR \fI<old file> <new filename>\fR
1148 .TP
1149 \fBnewdoc\fR \fI<old file> <new filename>\fR
1150 .PD 1
1151 All these functions act like the do* functions, but they only work with one
1152 file and the file is installed as \fI[new filename]\fR.
1153 .SH "REPORTING BUGS"
1154 Please report bugs via http://bugs.gentoo.org/
1155 .SH "AUTHORS"
1156 .nf
1157 Achim Gottinger <achim@gentoo.org>
1158 Mark Guertin <gerk@gentoo.org>
1159 Nicholas Jones <carpaski@gentoo.org>
1160 Mike Frysinger <vapier@gentoo.org>
1161 Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@gmail.com>
1162 Fabian Groffen <grobian@gentoo.org>
1163 .fi
1164 .SH "FILES"
1165 .TP
1166 The \fI/usr/sbin/ebuild.sh\fR script.
1167 .TP
1168 The helper apps in \fI/usr/lib/portage/bin\fR.
1169 .TP
1170 .B /etc/make.conf
1171 Contains variables for the build\-process and overwrites those in make.defaults.
1172 .TP
1173 .B /usr/share/portage/config/make.globals
1174 Contains the default variables for the build\-process, you should edit
1175 \fI/etc/make.conf\fR instead.
1176 .TP
1177 .B /etc/portage/color.map
1178 Contains variables customizing colors.
1179 .SH "SEE ALSO"
1180 .BR ebuild (1),
1181 .BR make.conf (5),
1182 .BR color.map (5)