1 | # $Id: Portfile,v 1.22 2006/05/08 18:42:53 toby Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name tor |
---|
5 | version 0.1.1.20 |
---|
6 | revision 1 |
---|
7 | categories security |
---|
8 | maintainers toby@opendarwin.org |
---|
9 | description anonymizing overlay network for TCP |
---|
10 | long_description \ |
---|
11 | Tor provides a distributed network of servers \ |
---|
12 | (onion routers). Users bounce their TCP streams \ |
---|
13 | (web traffic, FTP, SSH, etc.) around the \ |
---|
14 | routers. This makes it hard for recipients, \ |
---|
15 | observers, and even the onion routers \ |
---|
16 | themselves to track the source of the stream. |
---|
17 | homepage http://tor.eff.org/ |
---|
18 | platforms darwin |
---|
19 | master_sites ${homepage}dist/ |
---|
20 | checksums sha1 34af6983edd96d79c73e360aebc74d77d9bb828b |
---|
21 | depends_lib lib:XXX:libevent |
---|
22 | configure.env CPPFLAGS=-I${prefix}/include LDFLAGS=-L${prefix}/lib |
---|
23 | configure.args --mandir=${prefix}/share/man |
---|
24 | |
---|
25 | test.run yes |
---|
26 | test.target check |
---|
27 | |
---|
28 | set torGroup tor |
---|
29 | set torUser tor |
---|
30 | |
---|
31 | post-destroot { |
---|
32 | xinstall -o tor -g tor -m 755 -d ${destroot}${prefix}/var/run/tor |
---|
33 | destroot.keepdirs-append ${destroot}${prefix}/var/run/tor |
---|
34 | system "chown -R tor:tor ${destroot}${prefix}/var/run/tor" |
---|
35 | |
---|
36 | xinstall -o tor -g tor -m 755 -d ${destroot}${prefix}/var/lib/tor |
---|
37 | destroot.keepdirs-append ${destroot}${prefix}/var/lib/tor |
---|
38 | system "chown -R tor:tor ${destroot}${prefix}/var/lib/tor" |
---|
39 | } |
---|
40 | |
---|
41 | pre-configure { |
---|
42 | addgroup ${torGroup} |
---|
43 | adduser ${torUser} gid=[existsgroup ${torGroup}] |
---|
44 | } |
---|
45 | |
---|
46 | platform darwin { |
---|
47 | startupitem.create yes |
---|
48 | startupitem.name Tor |
---|
49 | startupitem.pidfile auto ${prefix}/var/run/tor/tor.pid |
---|
50 | startupitem.logfile ${prefix}/var/log/tor.log |
---|
51 | |
---|
52 | startupitem.start "\${prefix}/bin/tor \\" |
---|
53 | startupitem.start-append "\t\t--pidfile ${prefix}/var/run/tor/tor.pid \\" |
---|
54 | startupitem.start-append "\t\t--datadirectory ${prefix}/var/lib/tor \\" |
---|
55 | startupitem.start-append "\t\t--user ${torUser} \\" |
---|
56 | startupitem.start-append "\t\t--group ${torGroup} 2>&1" |
---|
57 | |
---|
58 | startupitem.stop "if \[ -f \"${prefix}/var/run/tor/tor.pid\" \]; then" |
---|
59 | startupitem.stop-append "\tkill `cat ${prefix}/var/run/tor/tor.pid` \\" |
---|
60 | startupitem.stop-append "else" |
---|
61 | startupitem.stop-append "\t/usr/bin/killall -SIGUSR1 tor 2>/dev/null" |
---|
62 | startupitem.stop-append "fi" |
---|
63 | } |
---|