2011-03-10 05:11:03 +00:00
|
|
|
class Djbdns < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "D.J. Bernstein's DNS tools"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "http://cr.yp.to/djbdns.html"
|
|
|
|
url "http://cr.yp.to/djbdns/djbdns-1.05.tar.gz"
|
|
|
|
sha256 "3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48"
|
2010-06-28 18:02:06 +00:00
|
|
|
|
2015-08-22 22:31:03 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "bc3e65f5e6890d7d0713f6e6b402e737df5ae87e20c88a031884c8adad363102" => :yosemite
|
|
|
|
sha256 "ee0883572c4143830c16484e2ad1af53894295b4ca118a9080b4305255cc9d34" => :mavericks
|
|
|
|
sha256 "36a136abcc2964b8298335f76db02306f3f1ee70310a146af75a6dae0c1d0f88" => :mountain_lion
|
|
|
|
end
|
|
|
|
|
2015-08-03 12:55:31 +00:00
|
|
|
depends_on "daemontools"
|
2015-08-22 22:17:52 +00:00
|
|
|
depends_on "ucspi-tcp"
|
2010-06-28 18:02:06 +00:00
|
|
|
|
|
|
|
def install
|
2015-08-03 12:55:31 +00:00
|
|
|
inreplace "hier.c", 'c("/"', "c(auto_home"
|
|
|
|
inreplace "dnscache-conf.c", "/etc/dnsroots", "#{etc}/dnsroots"
|
2015-08-22 22:17:52 +00:00
|
|
|
|
|
|
|
# Write these variables ourselves.
|
|
|
|
rm %w[conf-home conf-ld conf-cc]
|
|
|
|
(buildpath/"conf-home").write prefix
|
|
|
|
(buildpath/"conf-ld").write "gcc"
|
|
|
|
|
|
|
|
if MacOS::CLT.installed?
|
|
|
|
(buildpath/"conf-cc").write "gcc -O2 -include /usr/include/errno.h"
|
|
|
|
else
|
|
|
|
(buildpath/"conf-cc").write "gcc -O2 -include #{MacOS.sdk_path}/usr/include/errno.h"
|
|
|
|
end
|
|
|
|
|
2010-06-28 18:02:06 +00:00
|
|
|
bin.mkpath
|
2015-08-22 22:17:52 +00:00
|
|
|
(prefix/"etc").mkpath # Otherwise "file does not exist"
|
|
|
|
system "make", "setup", "check"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match /localhost/, shell_output("#{bin}/dnsname 127.0.0.1")
|
2010-06-28 18:02:06 +00:00
|
|
|
end
|
|
|
|
end
|