# $Id: Portfile,v 1.2 2004/12/30 16:06:13 mww Exp $

PortSystem 1.0
PortGroup python24 1.0

name			py-async
version			0.1.0
revision		1
categories		python net
platforms		darwin
maintainers		mww@opendarwin.org
description		asynchronous TCP server python module
long_description	PyAsync is a Python module that implements an \
				asynchronous TCP server, with some TCP client \
				functionality too. Features include usage simplicity \
				and DNS caching.

homepage		http://www.softlab.ece.ntua.gr/~ckotso/PyAsync/
master_sites	${homepage}
distname		PyAsync-${version}
checksums		md5 fb2c37a7b913df8b6effc27cfaf2fe38

patch	{
	file mkdir ${worksrcpath}/PyAsync
	cd ${worksrcpath}
	file rename dnsthread.py PyAsync
	file rename error_object.py PyAsync
	file rename name_services.py PyAsync
	file rename network_engine.py PyAsync
	system "touch ${worksrcpath}/PyAsync/__init__.py"
	file copy ${filespath}/setup.py ${worksrcpath}
	reinplace "s|VERSION|${version}|g" ${worksrcpath}/setup.py
}

post-destroot	{
	xinstall -m 644 -W ${worksrcpath} README COPYING \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath}/example handler.py main.py \
		${destroot}${prefix}/share/doc/${name}/examples
}
