# $Id: Portfile,v 1.3 2005/04/21 15:57:58 jberry Exp $

PortSystem 1.0
PortGroup perl5 1.0

name			torrentsniff
version			0.3.0
categories		net perl
maintainers		kevin@sb.org
description		torrent status program
long_description	TorrentSniff is a command line Perl program \
			that reads a BitTorrent .torrent file from the local file \
			system or from a URL and reports on the status of the torrent.
homepage		http://www.highprogrammer.com/alan/perl/torrentsniff.html
platforms		darwin
master_sites	http://www.highprogrammer.com/alan/perl/
checksums		md5  3884cac276a990a95ea77738195508aa \
				sha1 ee683f2fbce004ae2f6daf9589b0d65db529fffb

depends_lib		path:${perl5.bin}:perl5.8 \
				port:p5-libwww-perl \
				port:p5-digest-sha1

patchfiles		patch_torrentsniff

configure {
	reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/torrentsniff
	reinplace "s|__NAME__|${name}|g" ${worksrcpath}/torrentsniff
}

build { }

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/${name}/BitTorrent/ ${destroot}${prefix}/bin/
	xinstall -m 644 ${worksrcpath}/BitTorrent/BDecode.pm ${destroot}${prefix}/share/${name}/BitTorrent/
	xinstall -m 755 ${worksrcpath}/torrentsniff ${destroot}${prefix}/bin/
}
