1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
\chapter{Ebuild-defined Variables}
\label{ebuild-vars}
\note This section describes variables that may or must be defined by ebuilds. For
variables that are passed from the package manager to the ebuild, see section \ref{ebuild-env-vars}.
\section{Metadata invariance}
All ebuild-defined variables discussed in this chapter must be defined independently of
any system, profile or tree dependent data, and it must not vary depending upon the ebuild
phase. In particular, ebuild metadata can and will be generated on a different system from that upon
which the ebuild will be used, and the ebuild must generate identical metadata every time it
is used.
\section{Mandatory Ebuild-defined Variables}
All ebuilds must define at least the following variables:
\begin{description}
\item[DESCRIPTION] A short human-readable description of the package's purpose. May be defined by an
eclass.
\item[SRC\_URI] A list of source URIs for the package. Valid protocols are \t{http://},
\t{https://}, \t{ftp://} and \t{mirror://\} (see section \{thirdpartymirrors} for mirror behaviour).
Fetch restricted packages may include URL parts consisting of just a filename. Use-conditional and
all-of groups are allowed (see section \ref{dependencies}); other constructs,
such as any-of groups, are forbidden. May be defined by an eclass, and may be empty.
\item[HOMEPAGE] The package's homepage or (whitespace separated) homepages, including protocol. May
be defined by an eclass.
\item[SLOT] The package's slot. Must be a valid slot name, as per section \ref{slot-names}. May
be defined by an eclass.
\item[LICENSE] The package's license. Each text token must correspond to a tree ``licenses/`` entry
(see section \ref{licenses-dir}). Use-conditional, any-of and all-of groups are allowed.
May be defined by an eclass.
\item[IUSE] The \t{USE} flags used by the ebuild. Historically, \t{USE\_EXPAND} values and \t{ARCH}
were not included; package managers should support this for backwards compatibility reasons. Ebuilds
should list only flags used by the ebuild itself. Any eclass that works with \t{USE} flags
should also set \t{IUSE}, listing only the variables used by that eclass. The package manager is
responsible for merging these values.
\item[KEYWORDS] A whitespace separated list of keywords for the ebuild. Each token must be a
valid keyword name, as per section \ref{keyword-names}. May include $-*$, which
indicates that the package will only work on explicitly listed archs. May include $-arch$,
which indicates that the package will not work on the specified arch.
\end{description}
If any of these variables are undefined, or if any of these variables are set to invalid values,
the package manager's behaviour is undefined; ideally, an error in one ebuild should not prevent
operations upon other ebuilds or packages.
\section{Optional Ebuild-defined Variables}
Ebuilds may define any of the following variables:
\begin{description}
\item[S] The path to the temporary build directory, used by \t{src\_compile}, \t{src\_install}
etc. Defaults to \t{\$\{WORKDIR\}/\$\{P\}}.
\item[DEPEND] See section \ref{dependencies}.
\item[RDEPEND] See section \ref{dependencies}.
\item[PDEPEND] See section \ref{dependencies}.
\item[PROVIDE] Any \e{old style} virtuals provided by this package. May contain use conditionals.
\label{ebuild-var-provide}
\item[EAPI] The EAPI, by default \t{0}.
\item[INHERITED] List of inherited eclass names. This is handled magically by \t{inherit} and
shouldn't be modified manually.
\item[RESTRICT] Zero or more of \t{mirror}, \t{fetch}, \t{strip}, \t{userpriv}, \t{test}.
Package managers may recognise other values, but ebuilds may not rely upon them being
supported.
\end{description}
If any of these variables are set to invalid values, the package manager's behaviour is undefined;
ideally, an error in one ebuild should not prevent operations upon other ebuilds or packages.
% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :
|