knot 2.2.1
- enable dnstap support - install bash completions - run `make check` - install single-html documentation - fix the test Closes #2291. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
206c9deec9
commit
1c97f2c1fb
1 changed files with 56 additions and 11 deletions
|
@ -1,10 +1,23 @@
|
|||
class Knot < Formula
|
||||
desc "High-performance authoritative-only DNS server"
|
||||
homepage "https://www.knot-dns.cz/"
|
||||
url "https://secure.nic.cz/files/knot-dns/knot-2.1.1.tar.xz"
|
||||
sha256 "e110d11d4a4c4b5abb091b32fcb073934fb840046e975234323e0fc15f2f8f5b"
|
||||
|
||||
head "https://gitlab.labs.nic.cz/labs/knot.git"
|
||||
stable do
|
||||
url "https://secure.nic.cz/files/knot-dns/knot-2.2.1.tar.xz"
|
||||
sha256 "4b587bd8299445a29990ba89087b156ab9b6bf85cbd68846766c078e5b3481d3"
|
||||
|
||||
resource "fstrm" do
|
||||
url "https://github.com/farsightsec/fstrm/releases/download/v0.2.0/fstrm-0.2.0.tar.gz"
|
||||
sha256 "ad5d39957a4b334a6c7fcc94f308dc7ac75e1997cc642e9bb91a18fc0f42a98a"
|
||||
end
|
||||
|
||||
# error: unknown type name 'clockid_t'
|
||||
# fixed upstream; see https://github.com/farsightsec/fstrm/pull/21
|
||||
resource "fstrm_clock_patch" do
|
||||
url "https://github.com/farsightsec/fstrm/commit/c5f09123.patch"
|
||||
sha256 "24d3ee17f3b7961eb1abd26fda386227779ab94225dd2f39ce3a4b24e980bc65"
|
||||
end
|
||||
end
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -13,31 +26,63 @@ class Knot < Formula
|
|||
sha256 "8295bd95060e9f067613d3c9742d231b841694afdff96eae13f448e00f1a3d13" => :mavericks
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://gitlab.labs.nic.cz/labs/knot.git"
|
||||
|
||||
resource "fstrm" do
|
||||
url "https://github.com/farsightsec/fstrm.git"
|
||||
end
|
||||
end
|
||||
|
||||
# due to AT_REMOVEDIR
|
||||
depends_on :macos => :yosemite
|
||||
|
||||
depends_on "automake" => :build
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "libtool" => :build
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "sphinx-doc" => :build
|
||||
depends_on "gnutls"
|
||||
depends_on "jansson"
|
||||
depends_on "libidn"
|
||||
depends_on "nettle"
|
||||
depends_on "openssl"
|
||||
depends_on "userspace-rcu"
|
||||
depends_on "protobuf-c"
|
||||
depends_on "libevent"
|
||||
|
||||
def install
|
||||
system "autoreconf", "-i", "-f" if build.head?
|
||||
system "./configure", "--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
resource("fstrm").stage do
|
||||
if build.stable?
|
||||
Pathname.pwd.install resource("fstrm_clock_patch")
|
||||
system "/usr/bin/patch", "-p1", "-i", "c5f09123.patch"
|
||||
end
|
||||
|
||||
system "autoreconf", "-fvi"
|
||||
system "./configure", "--prefix=#{libexec}/fstrm"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
ENV.append "CFLAGS", "-I#{libexec}/fstrm/include"
|
||||
ENV.append "LDFLAGS", "-L#{libexec}/fstrm/lib"
|
||||
ENV.append_path "PKG_CONFIG_PATH", "#{libexec}/fstrm/lib/pkgconfig"
|
||||
|
||||
system "autoreconf", "-fvi" if build.head?
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--disable-silent-rules",
|
||||
"--with-configdir=#{etc}",
|
||||
"--with-storage=#{var}/knot",
|
||||
"--with-rundir=#{var}/knot",
|
||||
"--prefix=#{prefix}"
|
||||
"--with-rundir=#{var}/run/knot",
|
||||
"--prefix=#{prefix}",
|
||||
"--with-bash-completions=#{bash_completion}",
|
||||
"--enable-dnstap"
|
||||
|
||||
inreplace "samples/Makefile", "install-data-local:", "disable-install-data-local:"
|
||||
|
||||
system "make"
|
||||
system "make", "check"
|
||||
system "make", "install"
|
||||
system "make", "install-singlehtml"
|
||||
|
||||
(buildpath/"knot.conf").write(knot_conf)
|
||||
etc.install "knot.conf"
|
||||
|
@ -95,8 +140,8 @@ class Knot < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/kdig", "www.knot-dns.cz"
|
||||
system "#{bin}/khost", "brew.sh"
|
||||
system "#{sbin}/knotc", "-c", "#{etc}/knot.conf", "checkconf"
|
||||
system bin/"kdig", "www.knot-dns.cz"
|
||||
system bin/"khost", "brew.sh"
|
||||
system sbin/"knotc", "-c", etc/"knot.conf", "conf-check"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue