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-3.4.9.tar.bz2"
|
|
sha256 "2b1124db2d937ed6666525b9fc60a5dd55cb82f4cae58116cb986de53faa5dff"
|
|
|
|
bottle do
|
|
sha256 "7bca82f79308ce90494b954886828f361086b7822b71ab93ec27238bfc889974" => :el_capitan
|
|
sha256 "c833517faba97da8db76e9f73aefbb6bb737d6871479a0587600c48c9f1209e4" => :yosemite
|
|
sha256 "447a9d123c1663354ffda4dabd4d21ac707e08dfd8cc456c84c7d95e741e8562" => :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
|