Last active
September 7, 2017 07:24
-
-
Save lepture/bbcc321885e1111ce1de1c89b0501a1d to your computer and use it in GitHub Desktop.
Homebrew brew formula for Varnish'es Hitch TLS Proxy Server
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
class Hitch < Formula | |
desc "A scalable TLS proxy by Varnish Software" | |
homepage "https://github.com/varnish/hitch" | |
url "https://github.com/varnish/hitch/archive/hitch-1.4.6.tar.gz" | |
sha256 "fecc0604a2574e50e99573536eade96769b3435aa787d2095ed9115434a6f003" | |
head "https://github.com/varnish/hitch.git" | |
depends_on "automake" => :build | |
depends_on "autoconf" => :build | |
depends_on "pkg-config" => :build | |
depends_on "libev" | |
depends_on "openssl" | |
option "with-session-cache", "Enable session cache support" | |
resource "ebtree" do | |
url "https://github.com/haproxy/ebtree.git" | |
end if build.with? "session-cache" | |
def install | |
ssl = Formula["openssl"] | |
system "./bootstrap" | |
cfg_opts = [ "--disable-dependency-tracking", | |
"--disable-silent-rules", | |
"--prefix=#{prefix}", | |
"CFLAGS=-I#{ssl.opt_include}", | |
"LDFLAGS=-L#{ssl.opt_lib}" ] | |
if build.with? "session-cache" | |
src_ebtree = File.join(Dir.pwd, 'src', 'ebtree') | |
resource("ebtree").stage do | |
system "cp -a '#{Dir.pwd}' '#{src_ebtree}'" | |
end | |
cfg_opts << "--enable-sessioncache" | |
end | |
system(*(%w[./configure] + cfg_opts)) | |
system "make", "install" | |
end | |
test do | |
system "hitch --help" | |
end | |
end |
Author
lepture
commented
Sep 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment