Gentoo Archives: gentoo-dev

From: Thomas Sachau <tommy@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
Date: Sun, 21 Sep 2008 00:47:56
Message-Id: 48D599AD.20605@gentoo.org
In Reply to: Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI by "Petteri Räty"
1 Petteri Räty schrieb:
2 > Thomas Sachau kirjoitti:
3 >> I see, we have a default src_unpack and a default src_compile but a
4 >> default src_install is still
5 >> missing. Here is my suggestion (taken and modified from bug 33544):
6 >>
7 >> src_install() {
8 >> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
9 >> emake DESTDIR=${D} install || die "emake install failed"
10 >> [[ -n ${DOCS} ]] && dodoc ${DOCS}
11 >> else
12 >> einstall || die "einstall failed"
13 >> [[ -n ${DOCS} ]] && dodoc ${DOCS}
14 >> fi
15 >> }
16 >>
17 >> Any comments?
18 >>
19 >
20 > einstall uses make so doesn't really make sense.
21 >
22 > Regards,
23 > Petteri
24 >
25
26 updated version:
27
28
29 src_install() {
30 if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
31 emake DESTDIR="${D}" install || einstall
32 if [[ $?>0 ]]; then
33 die "install failed"
34 else
35 if [[ -n ${DOCS} ]]; then
36 dodoc ${DOCS} || die "dodoc failed"
37 fi
38 fi
39 fi
40 }

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI Fabian Groffen <grobian@g.o>