summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2009-12-10 08:47:53 +0000
committerFabian Groffen <grobian@gentoo.org>2009-12-10 08:47:53 +0000
commitc7fe3bd3909f85512d9476d92c1ba5cf1fd14082 (patch)
tree2e3b95005e235c52ad9d5dd0076096dd5df06912 /man
parentFix introspection code in fetch() so that it works correctly when myuris is (diff)
downloadportage-idfetch-c7fe3bd3909f85512d9476d92c1ba5cf1fd14082.tar.gz
portage-idfetch-c7fe3bd3909f85512d9476d92c1ba5cf1fd14082.tar.bz2
portage-idfetch-c7fe3bd3909f85512d9476d92c1ba5cf1fd14082.zip
Implement forward compatible Prefix support. This makes EPREFIX, ED and
EROOT available to the ebuild environment, and updates the manpage accordingly. EPREFIX is hardwired to the empty string, and not configurable. For that, the prefix branch should be used for now. This should satisfy the requirements for EAPI=3. svn path=/main/trunk/; revision=15024
Diffstat (limited to 'man')
-rw-r--r--man/ebuild.573
1 files changed, 45 insertions, 28 deletions
diff --git a/man/ebuild.5 b/man/ebuild.5
index b9b4ce62..16d6138c 100644
--- a/man/ebuild.5
+++ b/man/ebuild.5
@@ -15,10 +15,12 @@ Here's a simple example ebuild:
.DS
.nf
-# Copyright 1999\-2007 Gentoo Foundation
+# Copyright 1999\-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
+EAPI="3"
+
inherit some_eclass another_eclass
DESCRIPTION="Super\-useful stream editor (sed)"
@@ -33,10 +35,9 @@ IUSE=""
RDEPEND=""
DEPEND="nls? ( sys-devel/gettext )"
-src_compile() {
+src_configure() {
econf \\
- \-\-bindir=/bin
- emake || die "emake failed"
+ \-\-bindir="${EPREFIX}"/bin
}
src_install() {
@@ -101,6 +102,12 @@ Contains the path to the package build root. Do not modify this variable.
Contains the path to the 'files' sub folder in the package specific
location in the portage tree. Do not modify this variable.
.TP
+.B EPREFIX
+Contains the offset that this Portage was configured for during
+installation. The offset is sometimes necessary in an ebuild or eclass,
+and is available in such cases as ${EPREFIX}. Do not modify this
+variable.
+.TP
\fBS\fR = \fI"${WORKDIR}/${P}"\fR
Contains the path to the temporary \fIbuild directory\fR. This variable
is used by the functions \fIsrc_compile\fR and \fIsrc_install\fR. Both
@@ -116,6 +123,10 @@ Contains the path to the temporary \fIinstall directory\fR. Every write
operation that does not involve the helper tools and functions (found below)
should be prefixed with ${D}. Do not modify this variable.
.TP
+\fBED\fT = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/${EPREFIX}"\fR
+Contains the path "${D}${EPREFIX}" for convenience purposes. Do not
+modify this variable.
+.TP
.B PORTAGE_LOG_FILE
Contains the path of the build log. If \fBPORT_LOGDIR\fR variable is unset then
\fBPORTAGE_LOG_FILE\fR=\fB"${T}/build.log"\fR.
@@ -125,6 +136,10 @@ Contains the path that portage should use as the root of the live filesystem.
When packages wish to make changes to the live filesystem, they should do so in
the tree prefixed by ${ROOT}. Do not modify this variable.
.TP
+\fBEROOT\fR = \fI"${ROOT}${EPREFIX%/}"\fR
+Contains "${ROOT}${EPREFIX%/}" for convenience purposes. Do not modify
+this variable.
+.TP
\fBDESCRIPTION\fR = \fI"A happy little package"\fR
Should contain a short description of the package.
.TP
@@ -755,13 +770,13 @@ directory. The function will append \fIsource\fR to the \fBDISTDIR\fR variable.
This is used as a replacement for configure. Performs:
.nf
${\fIECONF_SOURCE\fR:-.}/configure \\
- \-\-prefix=/usr \\
- \-\-host=${CHOST} \\
- \-\-mandir=/usr/share/man \\
- \-\-infodir=/usr/share/info \\
- \-\-datadir=/usr/share \\
- \-\-sysconfdir=/etc \\
- \-\-localstatedir=/var/lib \\
+ \-\-prefix="${EPREFIX}"/usr \\
+ \-\-host="${EPREFIX}${CHOST} \\
+ \-\-mandir="${EPREFIX}"/usr/share/man \\
+ \-\-infodir="${EPREFIX}"/usr/share/info \\
+ \-\-datadir="${EPREFIX}"/usr/share \\
+ \-\-sysconfdir="${EPREFIX}"/etc \\
+ \-\-localstatedir="${EPREFIX}"/var/lib \\
\fI${EXTRA_ECONF}\fR \\
\fIconfigure options\fR || die "econf failed"
.fi
@@ -787,12 +802,12 @@ the issue, then you should run '\fBemake\fR \-j1' instead of 'make'.
This is used as a replacement for make install. Performs:
.nf
make \\
- prefix=${D}/usr \\
- datadir=${D}/usr/share \\
- infodir=${D}/usr/share/info \\
- localstatedir=${D}/var/lib \\
- mandir=${D}/usr/share/man \\
- sysconfdir=${D}/etc \\
+ prefix=${ED}/usr \\
+ datadir=${ED}/usr/share \\
+ infodir=${ED}/usr/share/info \\
+ localstatedir=${ED}/var/lib \\
+ mandir=${ED}/usr/share/man \\
+ sysconfdir=${ED}/etc \\
\fI${EXTRA_EINSTALL}\fR \\
\fImake options\fR \\
install
@@ -827,13 +842,13 @@ libraries +x, and then checks aclocal directories. Please note this
does \fI*not*\fR run \fBprepalldocs\fR.
.TP
.B prepalldocs:
-Compresses all doc files in ${D}/usr/share/doc.
+Compresses all doc files in ${ED}/usr/share/doc.
.TP
.B prepallinfo:
-Compresses all info files in ${D}/usr/share/info.
+Compresses all info files in ${ED}/usr/share/info.
.TP
.B prepallman:
-Compresses all man files in ${D}/usr/share/man.
+Compresses all man files in ${ED}/usr/share/man.
.TP
.B prepallstrip:
Strips all executable files of debugging symboles. This includes libraries.
@@ -853,31 +868,32 @@ Similiar to the \fBprepall\fR functions, these are subtle in their differences.
.B prepinfo:
If a \fIdir\fR is not specified, then \fBprepinfo\fR will assume the dir
\fIusr\fR. \fBprepinfo\fR will then compress all the files in
-${D}/\fIdir\fR/info.
+${ED}/\fIdir\fR/info.
.TP
.B prepman:
If a \fIdir\fR is not specified, then \fBprepman\fR will assume the dir
\fIusr\fR. \fBprepman\fR will then compress all the files in
-${D}/\fIdir\fR/man/*/.
+${ED}/\fIdir\fR/man/*/.
.TP
.B prepstrip:
-All the files found in ${D}/\fIdir\fR will be stripped. You may specify
+All the files found in ${ED}/\fIdir\fR will be stripped. You may specify
multiple directories.
.RE
.PD 1
.TP
\fBdosed\fR \fI"s:orig:change:g" <filename>\fR
-Performs sed in place on \fIfilename\fR inside ${D}. If no expression is
-given then \fI"s:${D}::g"\fR is used as the default expression.
+Performs sed in place on \fIfilename\fR inside ${ED}. If no expression is
+given then \fI"s:${D}::g"\fR is used as the default expression. Note
+that this expression does \fBNOT\fR use the offset prefix.
.br
.BR 'dosed\ "s:/usr/local:/usr:g"\ /usr/bin/some\-script'
-runs sed on ${D}/usr/bin/some\-script
+runs sed on ${ED}/usr/bin/some\-script
.TP
\fBdodir\fR \fI<path>\fR
-Creates a directory inside of ${D}.
+Creates a directory inside of ${ED}.
.br
.BR 'dodir\ /usr/lib/apache'
-creates ${D}/usr/lib/apache. Note that the do* functions will run
+creates ${ED}/usr/lib/apache. Note that the do* functions will run
\fBdodir\fR for you.
.TP
\fBdiropts\fR \fI[options for install(1)]\fR
@@ -1049,6 +1065,7 @@ Mark Guertin <gerk@gentoo.org>
Nicholas Jones <carpaski@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@gmail.com>
+Fabian Groffen <grobian@gentoo.org>
.fi
.SH "FILES"
.TP