# $Id: Portfile 75843 2011-02-10 17:26:19Z ryandesign@macports.org $

PortSystem 1.0

name             tor
version          0.2.1.29
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/

checksums        sha1    cd534b99c91070504f4e70008ab8940a816b5bc6\
                 rmd160  2587fc9162852434a395ec796ebdcee1972d9aa9

depends_lib      port:libevent port:openssl port:zlib
configure.args   --mandir=${prefix}/share/man

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+)]
