# -*- 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$

PortSystem        1.0

name              torsocks
version           2.1.0
categories        net security
license           GPL-2+
platforms         darwin
maintainers       yopmail.com:sami.laine
description       A transparent socks proxy for use with tor
long_description  Torsocks is an application for Linux, BSD and \
                  OS X that allows you to use network applications \
                  such as ssh and irssi with Tor. Torsocks allows you \
                  to use most socks-friendly applications in a safe \
                  way with Tor. It ensures that DNS requests are \
                  handled safely and explicitly rejects UDP traffic \
                  from the application you are using.
homepage          https://git.torproject.org/torsocks.git
master_sites      https://people.torproject.org/~dgoulet/torsocks/
use_bzip2         yes

checksums           rmd160  5f7df0de757095301526d3f2109b42d0ad51b670 \
                    sha256  3c3831cb751ff477d97fb826c79cb2cfedc514e5eb89a3b10f341fb3abdf87db

depends_build       port:coreutils

post-destroot {
    move ${destroot}${prefix}/etc/tor/torsocks.conf \
        ${destroot}${prefix}/etc/torsocks.conf.default
}

post-activate {
    if {![file exists ${prefix}/etc/torsocks.conf]} {
        file copy ${prefix}/etc/torsocks.conf.default \
            ${prefix}/etc/torsocks.conf
  }
}

test.run            yes
test.target         check