homebrew-core/Formula/jdnssec-tools.rb
2018-11-27 17:18:45 +01:00

36 lines
1.5 KiB
Ruby

class JdnssecTools < Formula
desc "Java command-line tools for DNSSEC"
homepage "https://github.com/dblacka/jdnssec-tools"
url "https://github.com/dblacka/jdnssec-tools/releases/download/0.14/jdnssec-tools-0.14.tar.gz"
sha256 "96dfe5465452713c07461a8744f166e6f0e199e2236c3a5fe02f17b49438885c"
head "https://github.com/dblacka/jdnssec-tools.git"
bottle do
cellar :any_skip_relocation
sha256 "6b8a45ea05860a46efc3e1329fe8058901b11158163ba8729c9273e272f41d14" => :mojave
sha256 "29a2267ef3939779a8e52781f7aefdca4b47fc01d42801ecad931fa4d14c9d11" => :high_sierra
sha256 "29a2267ef3939779a8e52781f7aefdca4b47fc01d42801ecad931fa4d14c9d11" => :sierra
end
depends_on :java
def install
inreplace Dir["bin/*"], /basedir=.*/, "basedir=#{libexec}"
bin.install Dir["bin/*"]
(libexec/"lib").install Dir["lib/*"]
end
test do
(testpath/"powerdns.com.key").write(
"powerdns.com. 10773 IN DNSKEY 257 3 8 (AwEAAb/+pXOZWYQ8mv9WM5dFva8
WU9jcIUdDuEjldbyfnkQ/xlrJC5zA EfhYhrea3SmIPmMTDimLqbh3/4SMTNPTUF+9+U1vp
NfIRTFadqsmuU9F ddz3JqCcYwEpWbReg6DJOeyu+9oBoIQkPxFyLtIXEPGlQzrynKubn04
Cx83I6NfzDTraJT3jLHKeW5PVc1ifqKzHz5TXdHHTA7NkJAa0sPcZCoNE 1LpnJI/wcUpRU
iuQhoLFeT1E432GuPuZ7y+agElGj0NnBxEgnHrhrnZW UbULpRa/il+Cr5Taj988HqX9Xdm
6FjcP4Lbuds/44U7U8du224Q8jTrZ 57Yvj4VDQKc=)",
)
assert_match /D4C3D5552B8679FAEEBC317E5F048B614B2E5F607DC57F1553182D49AB2179F7/,
shell_output("#{bin}/jdnssec-dstool -d 2 powerdns.com.key")
end
end