# $Id: Portfile,v 1.1 2005/07/11 06:04:27 mww Exp $

PortSystem 1.0
PortGroup python24 1.0

name			py-rt
version			2.5
categories		python net
platforms		darwin
maintainers		mww@opendarwin.org
description		Python Routeing Toolkit
long_description	The Python Routeing Toolkit enables routeing information \
				in a network to be collected.

homepage		http://ipmon.sprintlabs.com/pyrt/
master_sites	${homepage}/results/
distname		pyrt-${version}
checksums		md5 ea7322d0e942f819fb55939f64f92b1c

pre-extract {
	file mkdir ${worksrcpath}/rt
	file copy ${filespath}/setup.py ${worksrcpath}
	system "touch ${worksrcpath}/rt/__init__.py"
}
extract.dir		${worksrcpath}/rt

patch {
	cd ${worksrcpath}
	reinplace "s|__VERSION__|${version}|g" setup.py
	reinplace "s| /usr/bin/env python2|${python.bin}|g" rt/bgp.py rt/isis.py
}

post-destroot {
	xinstall -m 644 -W ${worksrcpath}/rt COPYING ChangeLog README README.mrtd \
		README.rv VERSION ${destroot}${prefix}/share/doc/${name}
}
