Nirbheek Chauhan schrieb: > On Wed, Sep 24, 2008 at 4:51 AM, Bo Ørsted Andresen <[EMAIL PROTECTED]> wrote: >> On Tuesday 23 September 2008 21:39:52 Thomas Sachau wrote: > >>> if [ -f Makefile -o -f GNUmakefile -o -f makefile ]; then > [...] >>> fi > > - So if those makefiles don't exist, the package should just carry on > without installing anything?
This is imho a good idea, else virtuals and meta packages would need an extra
(empty) src_install().
>
>>> if emake DESTDIR="${D} install || einstall ; then
>>> die "install failed"
>
> - The above code will cause a die when either one of emake install or
> einstall are *successful*. The opposite behaviour is desired.
Eh, sure, my mistake.
>
>>> else
>>> if [[ -n ${DOCS} ]]; then
>>> dodoc ${DOCS} || die "dodoc failed"
>>> fi
>
> - So, if emake install || einstall fails, one should just install the
> docs? The opposite behaviour is desired.
see above
>
> If a default src_install is desired, it should cater to the most
> common use-cases and leave it to the maintainer to override it if
> desired.
>
> default_src_install() {
> emake DESTDIR="${D}" install || die "emake install failed"
> if [ -n "${DOCS}" ]; then
> dodoc ${DOCS} || die "dodoc failed"
> else
> # No die here because we don't know if any of these exist
> dodoc AUTHORS ChangeLog NEWS README
> fi
> }
>
So what about this one?
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"
else
# No die here because we don't know if any of these exist
dodoc AUTHORS ChangeLog NEWS README
fi
}
--
Thomas Sachau
Gentoo Linux Developer
signature.asc
Description: OpenPGP digital signature
