# $Id: Portfile 66318 2010-04-09 04:07:24Z boeyms@macports.org $

PortSystem 1.0

name             tor-devel
version          0.2.2.10-alpha
categories       security
maintainers      boeyms openmaintainer
description      anonymizing overlay network for TCP
long_description \
	Tor provides a distributed network of servers \
	(onion routers). Users bounce their TCP streams \
	(web traffic, FTP, SSH, etc.) around the \
	routers. This makes it hard for recipients, \
	observers, and even the onion routers \
	themselves to track the source of the stream.
homepage         http://www.torproject.org/
platforms        darwin
master_sites     ${homepage}dist/
distname         tor-${version}

checksums        md5    e2576c3c355b1c6830c91fb0643f06be\
                 sha1   92f34cb685ac35d4869d81afd87bd67158a9f943\
                 rmd160 cd16bc2d6d57962161a1e4a0cb87f7c2b6437ca9

patchfiles       patch-doc__Makefile.in.diff patch-contrib__torify.in.diff

depends_lib      port:libevent port:openssl port:zlib
configure.args   --with-libevent-dir=${prefix} \
                 --with-openssl-dir=${prefix} \
                 --with-zlib-dir=${prefix} \
                 --disable-asciidoc

post-destroot {
    set tsocksconf  ${destroot}${prefix}/etc/tor/tor-tsocks.conf 
    move ${tsocksconf} ${tsocksconf}.sample
}

test.run         yes
test.target      check
livecheck.type   regex
livecheck.url    ${master_sites}?C=M\;O=D
livecheck.regex  [suffix tor-(\\d+\\.\\d+\\.\\d+\\.\\d+(-alpha|-beta|-rc)?)]
