2014-02-09 14:41:19 +00:00
|
|
|
class Boot2docker < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Lightweight Linux for Docker"
|
2014-06-19 10:38:23 +00:00
|
|
|
homepage "https://github.com/boot2docker/boot2docker-cli"
|
2014-07-25 03:54:20 +00:00
|
|
|
# Boot2docker and docker are generally updated at the same time.
|
|
|
|
# Please update the version of docker too
|
2015-07-22 09:09:06 +00:00
|
|
|
url "https://github.com/boot2docker/boot2docker-cli.git",
|
2015-08-14 13:54:47 +00:00
|
|
|
:tag => "v1.8.0", :revision => "9a2606673efcfa282fb64a5a5c9e1b2f89d86fb4"
|
2014-12-03 22:44:40 +00:00
|
|
|
head "https://github.com/boot2docker/boot2docker-cli.git"
|
2014-06-19 10:38:23 +00:00
|
|
|
|
|
|
|
bottle do
|
2015-09-12 23:18:40 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "8ba0d66cbf6945d807389d122f8e9978a268aabee3893fed98efab09251d4fb7" => :el_capitan
|
2015-08-14 15:06:57 +00:00
|
|
|
sha256 "087e79bf9afee354f5a7ef8034ecb683b5645c82706a9fcbd34bf0bb5b71bfc7" => :yosemite
|
|
|
|
sha256 "ca6772a87763b4690dd9e513d685a282bedeee689034f45828d66ffd19f79c37" => :mavericks
|
|
|
|
sha256 "18ec9445c6c39777c0b390fa1ddf409817d62b3e17312778b77c29640f54a40e" => :mountain_lion
|
2014-06-19 10:38:23 +00:00
|
|
|
end
|
2014-02-20 11:01:22 +00:00
|
|
|
|
2014-02-11 17:30:16 +00:00
|
|
|
depends_on "docker" => :recommended
|
2014-06-19 10:38:23 +00:00
|
|
|
depends_on "go" => :build
|
2014-02-09 14:41:19 +00:00
|
|
|
|
|
|
|
def install
|
2014-06-19 10:38:23 +00:00
|
|
|
(buildpath + "src/github.com/boot2docker/boot2docker-cli").install Dir[buildpath/"*"]
|
|
|
|
|
|
|
|
cd "src/github.com/boot2docker/boot2docker-cli" do
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
system "go", "get", "-d"
|
|
|
|
system "make", "goinstall"
|
|
|
|
end
|
|
|
|
|
|
|
|
bin.install "bin/boot2docker-cli" => "boot2docker"
|
|
|
|
end
|
|
|
|
|
2015-07-22 09:09:06 +00:00
|
|
|
def caveats; <<-EOF.undent
|
|
|
|
Rebuild the VM after an upgrade with:
|
|
|
|
boot2docker destroy && boot2docker upgrade
|
|
|
|
EOF
|
|
|
|
end
|
|
|
|
|
2014-11-08 03:21:41 +00:00
|
|
|
def plist; <<-EOS.undent
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<dict>
|
|
|
|
<key>Label</key>
|
|
|
|
<string>#{plist_name}</string>
|
|
|
|
<key>ProgramArguments</key>
|
|
|
|
<array>
|
|
|
|
<string>#{opt_bin}/boot2docker</string>
|
|
|
|
<string>up</string>
|
|
|
|
</array>
|
|
|
|
<key>RunAtLoad</key>
|
|
|
|
<true/>
|
|
|
|
</dict>
|
|
|
|
</plist>
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2014-06-19 10:38:23 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/boot2docker", "version"
|
2014-02-09 14:41:19 +00:00
|
|
|
end
|
|
|
|
end
|