# $Id: Portfile 30249 2007-10-23 02:12:47Z jmpp@macports.org $

PortSystem 1.0
PortGroup python24 1.0

name			py-wordnet
version			1.4
revision		1
categories		python
platforms		darwin freebsd
maintainers		nomaintainer
description		Python interface to the (included) WordNet database
long_description	PyWordNet is a Python interface to the WordNet \
				database of word meanings and lexical relationships. \
				Version 1.7.1 or WordNet - the most recent version of \
				WordNet working with py-wordnet - is included.

homepage		http://pywordnet.sourceforge.net/
master_sites	sourceforge:pywordnet:source \
				ftp://ftp.cogsci.princeton.edu/pub/wordnet/1.7.1:data
distfiles		pywordnet-${version}${extract.suffix}:source \
				WordNet-1.7.1${extract.suffix}:data
checksums		pywordnet-${version}${extract.suffix} \
					md5 791c796699d4c2cd6bd37ec32a232561 \
				WordNet-1.7.1${extract.suffix} \
					md5 5c8e569339cf7d8e727d884234365508
patchfiles		patch-wordnet.py.diff

worksrcdir		pywordnet-${version}

post-patch	{
	reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/wordnet.py
}

post-destroot	{
	xinstall -d -m 755 ${destroot}${prefix}/share/${name}
	xinstall -m 644 -W ${workpath}/WordNet-1.7.1/dict adj.exc adv.exc \
		cntlist cntlist.rev data.adj data.adv data.noun data.verb \
		index.adj index.adv index.noun index.sense index.verb lexnames \
		noun.exc sentidx.vrb sents.vrb verb.exc \
		${destroot}${prefix}/share/${name}
	xinstall -m 644 -W ${build.dir} CHANGES.txt INSTALL.txt LICENSE.txt \
		README.txt index.html ${destroot}${prefix}/share/doc/${name}
}
