homebrew-core/Formula/haproxy.rb
2017-06-29 02:58:07 -07:00

37 lines
1 KiB
Ruby

class Haproxy < Formula
desc "Reliable, high performance TCP/HTTP load balancer"
homepage "https://www.haproxy.org/"
url "https://www.haproxy.org/download/1.7/src/haproxy-1.7.7.tar.gz"
sha256 "81196ca449e4ada45fbd743fe3804bb82c25563ff9653e136872181ee5603ae2"
bottle do
cellar :any
sha256 "05a01acfc348351a468fb7b622cf606f86e38a87a17e3309f93a8588f732cfed" => :sierra
sha256 "70037018ffd616f652a1705fe3afd454e63b04d61152504255e47d87db3a57a8" => :el_capitan
sha256 "a686d6450890269dc1c196653668e6a27afe70527e6b6a69631f3fd9ec119fcc" => :yosemite
end
depends_on "openssl"
depends_on "pcre"
def install
args = %w[
TARGET=generic
USE_KQUEUE=1
USE_POLL=1
USE_PCRE=1
USE_OPENSSL=1
USE_ZLIB=1
ADDLIB=-lcrypto
]
# We build generic since the Makefile.osx doesn't appear to work
system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}", *args
man1.install "doc/haproxy.1"
bin.install "haproxy"
end
test do
system bin/"haproxy", "-v"
end
end