# $Id: Portfile 84517 2011-09-27 15:35:51Z jmr@macports.org $

PortSystem      1.0

name            unsermake
version         0.4-20070824
revision        2
categories      devel
license         GPL-2+
maintainers     nomaintainer
description     Replacement for automake
long_description \
                Unsermake is an automake replacement from the KDE project.
platforms       darwin
homepage        http://www.kde.me.uk/index.php?page=unsermake
master_sites    http://ranger.befunk.com/fink \
                http://astrange.ithinksw.net/~astrange/ranger-fink \
                http://www.southofheaven.net/befunk
distfiles       ${name}-20070824.tar.bz2
use_bzip2       yes
checksums       md5 b794f83bdc3f6205d1fd731da4e96d89
worksrcdir      ${name}

depends_run     port:python26

patch {
    reinplace "s|exec python|exec ${prefix}/bin/python2.6|" ${worksrcpath}/unsermake
}

use_configure   no

build {}

destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/unsermake
    foreach f {*.um *.py} {
        eval xinstall -m 644 [glob ${worksrcpath}/${f}] ${destroot}${prefix}/share/unsermake/
    }
    xinstall -m 755 ${worksrcpath}/unsermake ${destroot}${prefix}/share/unsermake/
    ln -s ${prefix}/share/unsermake/unsermake ${destroot}${prefix}/bin/unsermake
}
post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} COPYING README TODO ${destroot}${prefix}/share/doc/${name}
}
