homebrew-core/Formula/privoxy.rb
Mike McQuaid 7a4dabfc1a Use hash rockets again. (#5177)
This restores 1.8 hash rockets because they look nicer with e.g. `depends_on :foo => :bar`
2016-09-24 16:45:48 +01:00

60 lines
1.9 KiB
Ruby

class Privoxy < Formula
desc "Advanced filtering web proxy"
homepage "https://www.privoxy.org/"
url "https://downloads.sourceforge.net/project/ijbswa/Sources/3.0.26%20%28stable%29/privoxy-3.0.26-stable-src.tar.gz"
sha256 "57e415b43ee5dfdca74685cc034053eaae962952fdabd086171551a86abf9cd8"
bottle do
cellar :any
sha256 "1793fdaf62e0fe60ef595a017ceddef3da64ff1ebc5e9dac5b3f6751af4f6235" => :sierra
sha256 "f9550b7166bcbe5011eea1ee0ea2d0329e0920dde71683f1ba96fee994aa5395" => :el_capitan
sha256 "43900a89fe2325206001a26a374a9e82ab78b96c45fc5e9a53f45b1e978ee2f0" => :yosemite
end
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pcre"
def install
# Find Homebrew's libpcre
ENV.append "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib"
# No configure script is shipped with the source
system "autoreconf", "-i"
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}/privoxy",
"--localstatedir=#{var}"
system "make"
system "make", "install"
end
plist_options :manual => "privoxy #{HOMEBREW_PREFIX}/etc/privoxy/config"
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>KeepAlive</key>
<true/>
<key>Label</key>
<string>#{plist_name}</string>
<key>WorkingDirectory</key>
<string>#{var}</string>
<key>ProgramArguments</key>
<array>
<string>#{sbin}/privoxy</string>
<string>--no-daemon</string>
<string>#{etc}/privoxy/config</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
end