Last active
August 29, 2015 14:07
-
-
Save dx7/755fe692761f7b6a35ad to your computer and use it in GitHub Desktop.
Tinyproxy: Formula to install from HEAD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Tinyproxy < Formula | |
homepage "https://www.banu.com/tinyproxy/" | |
url "https://www.banu.com/pub/tinyproxy/1.8/tinyproxy-1.8.3.tar.bz2" | |
sha1 "2538fbd190d3dc357a2e7c2a07ea0fbefb768a13" | |
head do | |
url "https://github.com/dx7/tinyproxy.git", :branch => "1.8" | |
depends_on "autoconf" => :build | |
depends_on "automake" => :build | |
end | |
bottle do | |
sha1 "edf8eed5ce1ae02bdd09cefba5d3700b6d34c9c9" => :mavericks | |
sha1 "17996d138ad31ef834ad23e556afba83ed45c3ef" => :mountain_lion | |
sha1 "566f27174a811803b447822407dc33f26d306219" => :lion | |
end | |
option "reverse", "Enable reverse proxying" | |
option "with-debug", "If you would like to turn on full debugging support" | |
option "with-xtinyproxy", "Compile in support for the XTinyproxy header, which is sent to any web server in your domain" | |
option "with-filter", "Allows Tinyproxy to filter out certain domains and URLs" | |
option "with-upstream", "Enable support for proxying connections through another proxy server" | |
option "with-transparent", "Enable transparent proxying" | |
option "with-static", "Compile a static version of Tinyproxy" | |
depends_on "asciidoc" => :build | |
# Fix linking error, via MacPorts: https://trac.macports.org/ticket/27762 | |
patch :p0 do | |
url "https://trac.macports.org/export/83413/trunk/dports/net/tinyproxy/files/patch-configure.diff" | |
sha1 "e946269b681f3ffaa1acd120c93050cb63bfe743" | |
end unless build.head? | |
def install | |
if build.head? | |
system "aclocal" | |
system "autoconf" | |
system "autoheader" | |
system "automake --add-missing" | |
end | |
args = %W[ | |
--prefix=#{prefix} | |
--disable-regexcheck | |
] | |
args << "--enable-reverse" if build.include? "reverse" | |
args << "--enable-debug" if build.with? "debug" | |
args << "--enable-xtinyproxy" if build.with? "xtinyproxy" | |
args << "--enable-filter" if build.with? "filter" | |
args << "--enable-upstream" if build.with? "upstream" | |
args << "--enable-transparent" if build.with? "transparent" | |
args << "--enable-static" if build.with? "static" | |
system "./configure", *args | |
# Fix broken XML lint | |
# See: http://www.freebsd.org/cgi/query-pr.cgi?pr=154624 | |
inreplace ["docs/man5/Makefile", "docs/man8/Makefile"] do |s| | |
s.gsub! "-f manpage", "-f manpage \\\n -L" | |
end | |
system "make install" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment