61 lines
1.7 KiB
Ruby
61 lines
1.7 KiB
Ruby
class Corectl < Formula
|
|
desc "CoreOS over macOS made very simple"
|
|
homepage "https://github.com/TheNewNormal/corectl"
|
|
url "https://github.com/TheNewNormal/corectl/archive/v0.7.18.tar.gz"
|
|
sha256 "9bdf7bc8c6a7bd861e2b723c0566d0a093ed5d5caf370a065a1708132b4ab98a"
|
|
head "https://github.com/TheNewNormal/corectl.git", :branch => "golang"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "b973ccc4860167d71b4e1594d77826b89ee1e6006794731124a39c026df9430e" => :sierra
|
|
sha256 "e952c5d01b7e3fef095e3e4e5f70e8dd1ffaae5ba8fedba47ab6a93446b297db" => :el_capitan
|
|
sha256 "78f2159541ec65edad133290284d9615f8e855ee8593c530d525402c325e1fb2" => :yosemite
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "libev" => :build
|
|
depends_on "ocaml" => :build
|
|
depends_on "aspcud" => :build
|
|
depends_on "opam" => :build
|
|
depends_on :macos => :yosemite
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
opamroot = buildpath/"opamroot"
|
|
opamroot.mkpath
|
|
ENV["OPAMROOT"] = opamroot
|
|
ENV["OPAMYES"] = "1"
|
|
|
|
path = buildpath/"src/github.com/TheNewNormal/#{name}"
|
|
path.install Dir["*"]
|
|
|
|
args = []
|
|
args << "VERSION=#{version}" if build.stable?
|
|
|
|
cd path do
|
|
system "opam", "init", "--no-setup"
|
|
system "opam", "install", "uri", "ocamlfind", "qcow-format", "conf-libev"
|
|
|
|
system "make", "tarball", *args
|
|
|
|
bin.install Dir["bin/*"]
|
|
|
|
man1.install Dir["documentation/man/*.1"]
|
|
pkgshare.install "examples"
|
|
end
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
Starting with 0.7 "corectl" has a client/server architecture. So before you
|
|
can use the "corectl" cli, you have to start the server daemon:
|
|
|
|
$ corectld start
|
|
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
assert_match version.to_s, shell_output("#{bin}/corectl version")
|
|
end
|
|
end
|