Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Robert Buchholz <rbu@g.o>
Subject: Re: Re: Default src_install for EAPI-2 or following EAPI
Date: Wed, 24 Sep 2008 02:35:18 +0200
On Tuesday 23 September 2008, Thomas Sachau wrote:
> Ulrich Mueller schrieb:
> > And I still don't see why we would need the most general solution
> > for a *default* function. There's always the possibility to write
> > your own src_install() for the few ebuilds that need it.
> >
> > Ulrich
>
> I aggree with Ulrich in this case. This is just a suggestion for a
> default src_install funcion, nothing that should cover every possible
> case. So if you have some special DOC that does not work with the
> default install, you can still do it the normal way. So my suggestion
> for a default src_install:
>
> default_src_install() {
>         if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then
>                 if emake DESTDIR="${D} install || einstall ; then
>                         die "install failed"
>                 else
>                         if [[ -n ${DOCS} ]]; then
>                                 dodoc ${DOCS} || die "dodoc failed"
>                         fi
>                 fi
>         fi
> }
>
> Any more comments? Good? Bad? Interested?

Let's go with an even simpler default implementation:

default_src_install() {
	if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
		emake DESTDIR="${D}" install || die "emake install failed"
        fi
	if [ -n "${DOCS}" ]; then
		dodoc ${DOCS} || die "dodoc failed"
	fi
}

It addresses the following issues:
* Do not run einstall if emake fails
* Run dodoc even if no Makefile is present, this might come in handy for
  ebuilds calling default()
* die dodoc failure case
* hopefully fix the flaws (not really) pointed out by zlin


Robert
Attachment:
signature.asc (This is a digitally signed message part.)
Replies:
Re: Re: Default src_install for EAPI-2 or following EAPI
-- Santiago M. Mola
References:
Re: Default src_install for EAPI-2 or following EAPI
-- Ulrich Mueller
Re: Re: Default src_install for EAPI-2 or following EAPI
-- Thomas Sachau
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Default src_install for EAPI-2 or following EAPI
Next by thread:
Re: Re: Default src_install for EAPI-2 or following EAPI
Previous by date:
Re: Re: Default src_install for EAPI-2 or following EAPI
Next by date:
[project] Re: Default src_install for EAPI-2 or following EAPI


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.