# $Id: Portfile 68756 2010-06-12 17:25:22Z ryandesign@macports.org $

PortSystem 1.0

name			listat
version			2.1.1
set major		[lindex [split ${version} .] 0]
categories		mail textproc
platforms		darwin
maintainers		nomaintainer
description		generates interesting statistics on mailing list demographics
long_description	professional package to generate interesting statistics on \
					mailing list demographics. 

homepage		http://wordsmith.org/anu/listat/
master_sites	${homepage}
dist_subdir		${name}/${version}
distname		${name}
worksrcdir		${name}${major}

checksums		md5     cf423b971ebc95813faebc895d04bae2 \
				sha1    76eaf995fe2d6c9343077173580d71ab1ab50576 \
				rmd160  8f9eeb926dae002b6deeb3df9e3c6aa72fc2c994

depends_run		path:bin/perl:perl5

patchfiles		patch-listat \
				patch-listat.conf \
				patch-subdomains.txt

post-patch {
	reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/listat
}

use_configure	no
supported_archs	noarch

build		{}

destroot	{
	xinstall -m 755 ${worksrcpath}/listat ${destroot}${prefix}/bin
	xinstall -m 644 ${worksrcpath}/listat.conf ${destroot}${prefix}/etc
	xinstall -m 755 -d ${destroot}${prefix}/share/listat/
	file copy ${worksrcpath}/flags ${destroot}${prefix}/share/listat/
	xinstall -m 644 -W ${worksrcpath} domains.txt subdomains.txt \
		${destroot}${prefix}/share/listat/
}
