2011-03-10 05:11:03 +00:00
|
|
|
class Hostdb < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Generate DNS zones and DHCP configuration from hostlist.txt"
|
2015-07-13 19:34:21 +00:00
|
|
|
homepage "https://code.google.com/p/hostdb/"
|
|
|
|
url "https://hostdb.googlecode.com/files/hostdb-1.004.tgz"
|
|
|
|
sha256 "beea7cfcdc384eb40d0bc8b3ad2eb094ee81ca75e8eef7c07ea4a47e9f0da350"
|
2010-06-14 04:03:41 +00:00
|
|
|
|
|
|
|
def install
|
2015-07-13 19:34:21 +00:00
|
|
|
bin.install Dir["bin/*"]
|
|
|
|
doc.install Dir["docs/*"]
|
2015-07-31 15:28:25 +00:00
|
|
|
pkgshare.install "examples"
|
2015-07-13 19:34:21 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-07-31 15:28:25 +00:00
|
|
|
system("#{bin}/mkzones -z #{pkgshare}/examples/example1/zoneconf.txt < #{pkgshare}/examples/example1/hostdb.txt")
|
2015-07-13 19:34:21 +00:00
|
|
|
expected = /^4 \s+ IN \s+ PTR \s+ vector\.example\.com\.$/x
|
|
|
|
assert_match(expected, (testpath/"INTERNAL.179.32.64.in-addr.arpa").read)
|
2010-06-14 04:03:41 +00:00
|
|
|
end
|
|
|
|
end
|