homebrew-core/Formula/minica.rb

28 lines
951 B
Ruby
Raw Normal View History

class Minica < Formula
desc "Small, simple certificate authority"
homepage "https://github.com/jsha/minica"
url "https://github.com/jsha/minica/archive/v1.0.1.tar.gz"
sha256 "d5fd5259642dcd8ff98cb81deb4c66424a97c7bee2670622a6a057a6de5cfd03"
2018-11-27 12:03:47 +00:00
bottle do
cellar :any_skip_relocation
2018-11-30 09:48:11 +00:00
sha256 "b9e770340412c61c71cee5c4428fb43bc3204615c826f3a2daabca42869cea66" => :mojave
sha256 "52bcdc795e10b9fffd91984fc50a17c68c658f409ff545c6d94e147f2adce66a" => :high_sierra
sha256 "de8de2c3f4a630f159186701abd9badd6d8f086fabc47984af857d809c28e822" => :sierra
2018-11-27 12:03:47 +00:00
end
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/jsha").mkpath
ln_s buildpath, buildpath/"src/github.com/jsha/minica"
system "go", "build", "-o", bin/"minica", "github.com/jsha/minica"
end
test do
system "#{bin}/minica", "--domains", "foo.com"
assert_predicate testpath/"minica.pem", :exist?
end
end