diff options
author | Ciaran McCreesh <ciaran.mccreesh@googlemail.com> | 2009-03-16 19:08:19 +0000 |
---|---|---|
committer | Ciaran McCreesh <ciaran.mccreesh@googlemail.com> | 2009-04-11 20:28:02 +0100 |
commit | a3a2deb1c8a3844706dd848dedb55e80ce97e202 (patch) | |
tree | 58eb386e2ac267ac68cccc1c3b7abdf9b03da8d5 /ebuild-functions.tex | |
parent | PROPERTIES, DEFINED_PHASES mandatory in EAPI 3 (diff) | |
download | pms-a3a2deb1c8a3844706dd848dedb55e80ce97e202.tar.gz pms-a3a2deb1c8a3844706dd848dedb55e80ce97e202.tar.bz2 pms-a3a2deb1c8a3844706dd848dedb55e80ce97e202.zip |
EAPI 3 has a default src_install
Diffstat (limited to 'ebuild-functions.tex')
-rw-r--r-- | ebuild-functions.tex | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/ebuild-functions.tex b/ebuild-functions.tex index 0dfeaa4..b72a6f9 100644 --- a/ebuild-functions.tex +++ b/ebuild-functions.tex @@ -311,7 +311,62 @@ The \t{src\_install} function installs the package's content to a directory spec \t{D}. The initial working directory must be \t{S} if that exists, falling back to \t{WORKDIR} otherwise. -The default implementation used when the ebuild lacks the \t{src\_install} function is a no-op. + +For EAPIs listed in table~\ref{tab:src-install-table} as using format 3, the default implementation used +when the ebuild lacks the \t{src\_install} function shall behave as: + +\begin{verbatim} +src_install() { + if [[ -f Makefile ]] || [[ -f GNUmakefile ]] || [[ -f makefile ]]; then + emake DESTDIR="${D}" install + fi + + if ! declare -p DOCS >/dev/null 2>&1 ; then + local d + for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ + THANKS BUGS FAQ CREDITS CHANGELOG ; do + [[ -s "${d}" ]] && dodoc "${d}" + done + elif declare -p DOCS | grep -q '^declare -a ' ; then + dodoc "${DOCS[@]}" + else + dodoc ${DOCS} + fi +} +\end{verbatim} + +For other EAPIs, the default implementation used when the ebuild lacks the \t{src\_install} function +is a no-op. + +\begin{centertable}{\t{src\_install} behaviour for EAPIs} \label{tab:src-install-table} +\IFKDEBUILDELSE +{ + \begin{tabular}{ l l } + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Format}} \\ + \midrule + \t{0} & no-op \\ + \t{1} & no-op \\ + \t{kdebuild-1} & no-op \\ + \t{2} & no-op \\ + \t{3} & 3 \\ + \bottomrule + \end{tabular} +}{ + \begin{tabular}{ l l } + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Format}} \\ + \midrule + \t{0} & no-op \\ + \t{1} & no-op \\ + \t{2} & no-op \\ + \t{3} & 3 \\ + \bottomrule + \end{tabular} +} +\end{centertable} \subsection{pkg\_preinst} \label{sec:pkg-preinst-function} @@ -428,7 +483,7 @@ must not call these functions except when in the phase in question. \t{2} & \parbox[t]{3in}{\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure}, \t{src\_compile}, \t{src\_test}} \\ \t{3} & \parbox[t]{3in}{\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure}, - \t{src\_compile}, \t{src\_test}} \\ + \t{src\_compile}, \t{src\_install}, \t{src\_test}} \\ \bottomrule \end{tabular} }{ @@ -442,7 +497,7 @@ must not call these functions except when in the phase in question. \t{2} & \parbox[t]{3in}{\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure}, \t{src\_compile}, \t{src\_test}} \\ \t{3} & \parbox[t]{3in}{\t{pkg\_nofetch}, \t{src\_unpack}, \t{src\_prepare}, \t{src\_configure}, - \t{src\_compile}, \t{src\_test}} \\ + \t{src\_compile}, \t{src\_install}, \t{src\_test}} \\ \bottomrule \end{tabular} } |