daec1ec1b7
Closes Homebrew/homebrew#41227. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
18 lines
701 B
Ruby
18 lines
701 B
Ruby
class Hostdb < Formula
|
|
desc "Generate DNS zones and DHCP configuration from hostlist.txt"
|
|
homepage "https://code.google.com/p/hostdb/"
|
|
url "https://hostdb.googlecode.com/files/hostdb-1.004.tgz"
|
|
sha256 "beea7cfcdc384eb40d0bc8b3ad2eb094ee81ca75e8eef7c07ea4a47e9f0da350"
|
|
|
|
def install
|
|
bin.install Dir["bin/*"]
|
|
doc.install Dir["docs/*"]
|
|
(share+"examples"+name).install Dir["examples/*"]
|
|
end
|
|
|
|
test do
|
|
system("#{bin}/mkzones -z #{share}/examples/#{name}/example1/zoneconf.txt < #{share}/examples/#{name}/example1/hostdb.txt")
|
|
expected = /^4 \s+ IN \s+ PTR \s+ vector\.example\.com\.$/x
|
|
assert_match(expected, (testpath/"INTERNAL.179.32.64.in-addr.arpa").read)
|
|
end
|
|
end
|