2015-12-26 23:02:44 +00:00
|
|
|
class Corectl < Formula
|
|
|
|
desc "CoreOS over OS X made very simple"
|
|
|
|
homepage "https://github.com/TheNewNormal/corectl"
|
2016-09-16 10:27:40 +00:00
|
|
|
url "https://github.com/TheNewNormal/corectl/archive/v0.7.17.tar.gz"
|
|
|
|
sha256 "915ae2988dc57bcf7f28e0ed6c2971ae6f83879daaadbb98bef3bad0b50039e4"
|
2016-09-24 15:45:48 +00:00
|
|
|
head "https://github.com/TheNewNormal/corectl.git", :branch => "golang"
|
2015-12-26 23:02:44 +00:00
|
|
|
|
2015-12-28 12:46:25 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-09-16 10:35:05 +00:00
|
|
|
sha256 "ea463bfffeea5970d7c46f186e9440ba28cb1e0953f620e87df5345ecf7ea6ec" => :el_capitan
|
|
|
|
sha256 "cc5855cdd8679d87ce81f5ebce82992b9fa290848a6ba41e29ad0bdd2ba83593" => :yosemite
|
2015-12-28 12:46:25 +00:00
|
|
|
end
|
|
|
|
|
2015-12-26 23:02:44 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
depends_on "godep" => :build
|
2016-07-06 11:50:16 +00:00
|
|
|
depends_on "ocaml" => :build
|
2016-09-16 10:27:40 +00:00
|
|
|
depends_on "aspcud" => :build
|
2016-07-06 11:50:16 +00:00
|
|
|
depends_on "opam" => :build
|
2016-09-24 15:45:48 +00:00
|
|
|
depends_on :macos => :yosemite
|
2015-12-26 23:02:44 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
|
2016-07-06 11:50:16 +00:00
|
|
|
opamroot = buildpath/"opamroot"
|
|
|
|
opamroot.mkpath
|
|
|
|
ENV["OPAMROOT"] = opamroot
|
|
|
|
ENV["OPAMYES"] = "1"
|
|
|
|
|
2016-05-11 14:13:10 +00:00
|
|
|
path = buildpath/"src/github.com/TheNewNormal/#{name}"
|
|
|
|
path.install Dir["*"]
|
2015-12-26 23:02:44 +00:00
|
|
|
|
|
|
|
args = []
|
|
|
|
args << "VERSION=#{version}" if build.stable?
|
|
|
|
|
2016-05-11 14:13:10 +00:00
|
|
|
cd path do
|
2016-07-06 11:50:16 +00:00
|
|
|
system "opam", "init", "--no-setup"
|
2016-09-16 10:27:40 +00:00
|
|
|
system "opam", "install", "uri", "ocamlfind", "qcow-format"
|
2016-07-06 11:50:16 +00:00
|
|
|
|
|
|
|
system "make", "tarball", *args
|
|
|
|
|
|
|
|
bin.install Dir["bin/*"]
|
|
|
|
|
2016-05-11 14:13:10 +00:00
|
|
|
man1.install Dir["documentation/man/*.1"]
|
2016-07-06 11:50:16 +00:00
|
|
|
pkgshare.install "examples"
|
2016-05-11 14:13:10 +00:00
|
|
|
end
|
2015-12-26 23:02:44 +00:00
|
|
|
end
|
|
|
|
|
2016-07-06 11:50:16 +00:00
|
|
|
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
|
|
|
|
|
2015-12-26 23:02:44 +00:00
|
|
|
test do
|
2016-07-06 11:50:16 +00:00
|
|
|
assert_match version.to_s, shell_output("#{bin}/corectl version")
|
2015-12-26 23:02:44 +00:00
|
|
|
end
|
|
|
|
end
|