# $Id: Portfile 38565 2008-07-25 08:40:06Z ryandesign@macports.org $

PortSystem 1.0
name             bnbt
version          8.1r3
categories       net
maintainers      nomaintainer
description      C++ BitTorrent tracker
long_description \
	BNBT is a complete port of the original Python \
	BitTorrent tracker to C++ for speed and \
	efficiency. BNBT also offers many additional \
	features beyond the original Python BitTorrent \
	tracker, plus it's easy to use and customizable.
homepage         http://bnbt.depthstrike.com/
platforms        darwin

regsub -all      "\\." ${version} "" dversion
regsub -all      "r" ${dversion} "b-" dversion

master_sites     sourceforge
distname         ${name}${dversion}-sf
use_zip          yes
checksums        md5 2935ffe0f51090a79d5bd76566af3b2b

use_configure    no

worksrcdir       ${name}

build.dir        ${worksrcpath}/src
build.target     bnbt

destroot {
	xinstall ${worksrcpath}/src/bnbt ${destroot}${prefix}/bin
	file mkdir ${destroot}${prefix}/share/doc
	file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/bnbt
}

platform darwin 8 {
	patchfiles patch-src__bnbt.h
}

platform darwin 9 {
	patchfiles patch-src__bnbt.h
}
