64 lines
1.8 KiB
Ruby
64 lines
1.8 KiB
Ruby
class Pdns < Formula
|
|
desc "Authoritative nameserver"
|
|
homepage "https://www.powerdns.com"
|
|
url "https://downloads.powerdns.com/releases/pdns-4.0.0.tar.bz2"
|
|
sha256 "9f3ea273e11c898d9a91a2454eb7f2f38bdcc1ec4ea70a5e5de09c61b4ab65d5"
|
|
|
|
bottle do
|
|
sha256 "bf8307c0cf9fd6e06d778158574df150a295984f151e4b35a64616311ad93280" => :el_capitan
|
|
sha256 "89bf20ed6f998b40951d7be6b3ca9e777143428c3f5042d93d4df0a3512678e8" => :yosemite
|
|
sha256 "59d50d8c4254875c1e2a68f76c9c12fda93b84af1c8fa6418576eeabbb784d92" => :mavericks
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/powerdns/pdns.git"
|
|
|
|
depends_on "automake" => :build
|
|
depends_on "autoconf" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "ragel"
|
|
end
|
|
|
|
option "with-pgsql", "Enable the PostgreSQL backend"
|
|
|
|
deprecated_option "pgsql" => "with-pgsql"
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "boost"
|
|
depends_on "lua"
|
|
depends_on "openssl"
|
|
depends_on "sqlite"
|
|
depends_on :postgresql if build.with? "pgsql"
|
|
|
|
def install
|
|
# https://github.com/Homebrew/homebrew/pull/33739
|
|
ENV.deparallelize
|
|
|
|
args = %W[
|
|
--prefix=#{prefix}
|
|
--with-lua
|
|
--with-openssl=#{Formula["openssl"].opt_prefix}
|
|
--with-sqlite3
|
|
]
|
|
|
|
# Include the PostgreSQL backend if requested
|
|
if build.with? "pgsql"
|
|
args << "--with-modules=gsqlite3 gpgsql"
|
|
else
|
|
# SQLite3 backend only is the default
|
|
args << "--with-modules=gsqlite3"
|
|
end
|
|
|
|
system "./bootstrap" if build.head?
|
|
system "./configure", *args
|
|
|
|
# Compilation fails at polarssl if we skip straight to make install
|
|
system "make"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
output = shell_output("#{sbin}/pdns_server --version 2>&1", 99)
|
|
assert_match "PowerDNS Authoritative Server #{version}", output
|
|
end
|
|
end
|