# $Id: Portfile,v 1.2 2006/05/23 03:06:10 takanori Exp $

PortSystem		1.0
name			unsermake
version			0.4-20060316
categories		devel
maintainers		ben@opendarwin.org takanori@opendarwin.org
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}-20060316.tar.bz2
use_bzip2		yes

checksums		md5 ec3029827e23a6672d58bb9f37502d8c
worksrcdir		${name}

depends_run		bin:python:python24 port:coreutils

patch		{
		reinplace "s|`readlink|`greadlink|" ${worksrcpath}/unsermake
}
configure	{}
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/
		system "ln -sf ${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}
}
