# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem      1.0

name            unsermake
version         0.4-20070824
revision        2
categories      devel
license         GPL-2+
maintainers     nomaintainer
supported_archs noarch

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
    xinstall -m 644 {*}[glob -directory ${worksrcpath} *.py *.um] ${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}
}