# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 89354 2012-01-26 09:43:13Z ryandesign@macports.org $

PortSystem          1.0

name                tor
conflicts           tor-devel
version             0.2.2.35
categories          security
platforms           darwin
maintainers         nomaintainer
license             BSD

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            https://www.torproject.org/
master_sites        ${homepage}dist/

checksums           rmd160  9986f0892d410de9f3d496a5db6de29288295e92 \
                    sha256  f141a41fffd31494a0f96ebbb6b999eab33ce62d5c31f81222a0acd034adbf3a

patchfiles          patch-contrib__torify.in.diff

depends_lib         port:libevent \
                    port:openssl \
                    port:zlib

configure.args      --mandir=${prefix}/share/man

test.run            yes
test.target         check

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

livecheck.type      regex
livecheck.url       ${master_sites}?C=M\;O=D
livecheck.regex     [suffix tor-(\\d+\\.\\d+\\.\\d+\\.\\d+)]
