forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot2docker133.rb
53 lines (45 loc) · 1.63 KB
/
boot2docker133.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
class Boot2docker133 < Formula
desc "Lightweight Linux for Docker"
homepage "https://github.com/boot2docker/boot2docker-cli"
# Boot2docker and docker are generally updated at the same time.
# Please update the version of docker too
url "https://github.com/boot2docker/boot2docker-cli.git", :tag => "v1.3.3", :revision => "81bd2efb357cf84edb928883c0df43b1334e2860"
bottle do
sha256 "b268164d3c91753992d5d9488ca83120bc3d478c90bc9d399afcdf445c767270" => :yosemite
sha256 "06c0cb4720e6c8c74227b40fe695ccd54d29e32158b798afadaebc8f29720520" => :mavericks
sha256 "7522d7280b9e0d2cf877e0e5ec35ca381bde400ce95b0965888ce08aa6f0e024" => :mountain_lion
end
depends_on "docker133" => :recommended
depends_on "go" => :build
def install
(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"
ENV["GIT_DIR"] = cached_download/".git"
system "make", "goinstall"
end
bin.install "bin/boot2docker-cli" => "boot2docker"
end
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
test do
system "#{bin}/boot2docker", "version"
end
end