require "formula" class Boot2docker < Formula 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.2.0" head "https://github.com/boot2docker/boot2docker-cli.git", :branch => "master" bottle do revision 1 sha1 "9da9a3caea7efbf7b2d9d5c9fd6948ac796becca" => :mavericks sha1 "9cff42aea648b52fd10a3077595ca494b062ce5c" => :mountain_lion sha1 "05582008ec7a25b1f4263a24aa559887ed10a4c4" => :lion end depends_on "docker" => :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 test do system "#{bin}/boot2docker", "version" end end