ed6c7229a1
New Tor release, Yay. Closes Homebrew/homebrew#36995. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
79 lines
2.3 KiB
Ruby
79 lines
2.3 KiB
Ruby
class Tor < Formula
|
|
homepage "https://www.torproject.org/"
|
|
url "https://dist.torproject.org/tor-0.2.5.10.tar.gz"
|
|
mirror "https://tor.eff.org/dist/tor-0.2.5.10.tar.gz"
|
|
sha256 "b3dd02a5dcd2ffe14d9a37956f92779d4427edf7905c0bba9b1e3901b9c5a83b"
|
|
revision 2
|
|
|
|
bottle do
|
|
sha1 "0a17052c81afa7dfdb9d6988cfa84839d3f7e8f8" => :yosemite
|
|
sha1 "4d74af6045cf81c77fa70d243535e472c19c91d4" => :mavericks
|
|
sha1 "d8b6e1b05ebb7dc441c9fa0199165a9b396514e9" => :mountain_lion
|
|
end
|
|
|
|
devel do
|
|
url "https://dist.torproject.org/tor-0.2.6.3-alpha.tar.gz"
|
|
mirror "https://tor.eff.org/dist/tor-0.2.6.3-alpha.tar.gz"
|
|
sha256 "5e31a0ccbb1fbe9ac6fc64d157c5c3db9b478908ea09bbe15adea2f1fd11d670"
|
|
version "0.2.6.3-alpha"
|
|
|
|
# Move this to the main block when current devel = stable release.
|
|
depends_on "libscrypt" => :optional
|
|
end
|
|
|
|
depends_on "libevent"
|
|
depends_on "openssl"
|
|
depends_on "libnatpmp" => :optional
|
|
depends_on "miniupnpc" => :optional
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--disable-silent-rules
|
|
--prefix=#{prefix}
|
|
--sysconfdir=#{etc}
|
|
--with-openssl-dir=#{Formula["openssl"].opt_prefix}
|
|
]
|
|
|
|
args << "--with-libnatpmp-dir=#{Formula["libnatpmp"].opt_prefix}" if build.with? "libnatpmp"
|
|
args << "--with-libminiupnpc-dir=#{Formula["miniupnpc"].opt_prefix}" if build.with? "miniupnpc"
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
system bin/"tor", "--version"
|
|
end
|
|
|
|
def plist; <<-EOS.undent
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>Label</key>
|
|
<string>#{plist_name}</string>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>KeepAlive</key>
|
|
<true/>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>#{opt_bin}/tor</string>
|
|
</array>
|
|
<key>WorkingDirectory</key>
|
|
<string>#{HOMEBREW_PREFIX}</string>
|
|
</dict>
|
|
</plist>
|
|
EOS
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
You will find a sample `torrc` file in #{etc}/tor.
|
|
It is advisable to edit the sample `torrc` to suit
|
|
your own security needs:
|
|
https://www.torproject.org/docs/faq#torrc
|
|
After editing the `torrc` you need to restart tor.
|
|
EOS
|
|
end
|
|
end
|