2015-12-26 23:02:44 +00:00
|
|
|
class Corectl < Formula
|
2016-10-02 05:53:52 +00:00
|
|
|
desc "CoreOS over macOS made very simple"
|
2015-12-26 23:02:44 +00:00
|
|
|
homepage "https://github.com/TheNewNormal/corectl"
|
2016-11-09 16:01:59 +00:00
|
|
|
url "https://github.com/TheNewNormal/corectl/archive/v0.7.18.tar.gz"
|
|
|
|
sha256 "9bdf7bc8c6a7bd861e2b723c0566d0a093ed5d5caf370a065a1708132b4ab98a"
|
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
|
2016-11-09 19:02:59 +00:00
|
|
|
cellar :any
|
2016-11-12 12:34:19 +00:00
|
|
|
rebuild 1
|
|
|
|
sha256 "a33a53383b660b70c4d90ad1e134ba7c8f9cf23987be4209945060df1a95357b" => :sierra
|
|
|
|
sha256 "f4b1c3c1d674f973abc0d0fd7d4e7fba0053d2a52ac66a661657f98c87d9821a" => :el_capitan
|
|
|
|
sha256 "f72de502325419a9ce2345f4372206aa56f88ecca8a96e9698d3102acfe0e0b6" => :yosemite
|
2015-12-28 12:46:25 +00:00
|
|
|
end
|
|
|
|
|
2015-12-26 23:02:44 +00:00
|
|
|
depends_on "go" => :build
|
2016-11-11 22:21:06 +00:00
|
|
|
depends_on "libev"
|
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-11-09 16:01:59 +00:00
|
|
|
system "opam", "install", "uri", "ocamlfind", "qcow-format", "conf-libev"
|
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
|