[Exherbo-dev] default_src_install

Ciaran McCreesh ciaran.mccreesh at blueyonder.co.uk
Mon Feb 4 22:12:13 GMT 2008


On Sun, 3 Feb 2008 17:57:07 +0000
David Leverton <levertond at googlemail.com> wrote:
> We want a default for src_install.  Something like

default_src_install()
{
    if [[ -f Makefile ]] || [[ -f makefile ]] || [[ -f GNUmakefile ]] ; then
        echo "Found a makefile, using the install target"
        emake -j1 DESTDIR="${D}" install || die "default emake install failed"
    else
        echo "No makefile found, not using emake install"
    fi

    done_docs=
    for f1 in README ChangeLog AUTHORS NEWS TODO Changes THANKS BUGS \
        HACKING FAQ CREDITS PKG-INFO VERSION HISTORY MAINTAINERS RELEASE \
        ANNOUNCE PORTING NOTES PROBLEMS NOTICE ${DEFAULT_SRC_INSTALL_EXTRA_DOCS} \
        ; do
        for f in ${f1} $(echo ${f1} | tr '[[:upper:]]' '[[:lower:]]' ) ; do
            for s in '' .txt .txt ${DEFAULT_SRC_INSTALL_EXTRA_SUFFIXES} ; do
                for c in '' .gz .bz2 ${DEFAULT_SRC_INSTALL_EXTRA_COMPRESSIONS} ; do
                    for p in '' '0' '00' ${DEFAULT_SRC_INSTALL_EXTRA_PREFIXES} ; do
                        if [[ -f "${p}${f}${s}${c}" ]] ; then
                            done_docs="${done_docs} ${p}${f}${s}${c}"
                            dodoc "${p}${f}${s}${c}"
                        fi
                    done
                done
            done
        done
    done
    if [[ -n "${done_docs}" ]] ; then
        echo "Installed docs ${done_docs# }"
    else
        echo "Didn't find any docs to install"
    fi
}

Discuss!

-- 
Ciaran McCreesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.exherbo.org/mailman/private/exherbo-dev/attachments/20080204/4b2f02ac/attachment.pgp 


More information about the Exherbo-dev mailing list