homebrew-core/Formula/dnsdist.rb

49 lines
1.6 KiB
Ruby

class Dnsdist < Formula
desc "Highly DNS-, DoS- and abuse-aware loadbalancer"
homepage "https://www.dnsdist.org/"
url "https://downloads.powerdns.com/releases/dnsdist-1.4.0.tar.bz2"
sha256 "a336fa2c3eb381c2464d9d9790014fd6d4505029ed2c1b73ee1dc9115a2f1dc0"
revision 2
bottle do
sha256 "55196962851a917ba7d147b1d6905de86d9111705f7cfbe7a3a0c1ade40ad39d" => :catalina
sha256 "8b1a94d7749dc411c86a903af005253db68d644493cf53f9e31c936e604a98d3" => :mojave
sha256 "3ec1973ec14d2e4251b5521530ba098041bd1c1f264fcb537cafd0443f7da010" => :high_sierra
end
depends_on "boost" => :build
depends_on "pkg-config" => :build
depends_on "cdb"
depends_on "fstrm"
depends_on "h2o"
depends_on "libsodium"
depends_on "luajit"
depends_on "openssl@1.1"
depends_on "protobuf"
depends_on "re2"
uses_from_macos "libedit"
def install
# error: unknown type name 'mach_port_t'
ENV["SDKROOT"] = MacOS.sdk_path if MacOS.version == :sierra
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--without-net-snmp",
"--enable-dns-over-tls",
"--enable-dns-over-https",
"--enable-dnscrypt",
"--with-re2",
"--sysconfdir=#{etc}/dnsdist"
system "make", "install"
end
test do
(testpath/"dnsdist.conf").write "setLocal('127.0.0.1')"
output = shell_output("#{bin}/dnsdist -C dnsdist.conf --check-config 2>&1")
assert_equal "Configuration 'dnsdist.conf' OK!", output.chomp
end
end