2014-02-07 16:09:50 +00:00
|
|
|
class Docker < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Pack, ship and run any application as a lightweight container"
|
2014-10-16 19:22:31 +00:00
|
|
|
homepage "https://www.docker.com/"
|
2015-08-11 19:07:18 +00:00
|
|
|
url "https://github.com/docker/docker.git", :tag => "v1.8.0",
|
|
|
|
:revision => "0d03096b65d12b11082e496ffdd824ff356f3fed"
|
2015-06-28 00:50:12 +00:00
|
|
|
head "https://github.com/docker/docker.git"
|
2014-04-10 05:24:29 +00:00
|
|
|
|
2014-06-13 13:45:11 +00:00
|
|
|
bottle do
|
2015-02-20 15:36:44 +00:00
|
|
|
cellar :any
|
2015-08-11 23:02:03 +00:00
|
|
|
sha256 "582ad19dc9f256d86e1b06ef0003cb6f2649bbd65e78d177b87f95e1fe474b6e" => :yosemite
|
|
|
|
sha256 "4be7094557cfd607fee1cb1052407cbe94df2fef6ae452a7dbe16c946d35aa48" => :mavericks
|
|
|
|
sha256 "5bfe9725910302068b7e47be7da53052920ba1a5ef163c38091fcc8e41d89d43" => :mountain_lion
|
2014-06-13 13:45:11 +00:00
|
|
|
end
|
|
|
|
|
2015-06-27 06:25:20 +00:00
|
|
|
option "with-experimental", "Enable experimental features"
|
2014-02-13 20:17:06 +00:00
|
|
|
option "without-completions", "Disable bash/zsh completions"
|
2014-02-12 12:10:52 +00:00
|
|
|
|
2014-02-07 16:09:50 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
def install
|
2014-02-10 18:56:33 +00:00
|
|
|
ENV["AUTO_GOPATH"] = "1"
|
2014-03-11 14:51:29 +00:00
|
|
|
ENV["DOCKER_CLIENTONLY"] = "1"
|
2015-06-27 06:25:20 +00:00
|
|
|
ENV["DOCKER_EXPERIMENTAL"] = "1" if build.with? "experimental"
|
2014-02-07 16:09:50 +00:00
|
|
|
|
|
|
|
system "hack/make.sh", "dynbinary"
|
2015-06-28 00:50:12 +00:00
|
|
|
|
|
|
|
build_version = build.head? ? File.read("VERSION").chomp : version
|
|
|
|
bin.install "bundles/#{build_version}/dynbinary/docker-#{build_version}" => "docker"
|
2014-02-12 12:10:52 +00:00
|
|
|
|
2014-02-13 20:17:06 +00:00
|
|
|
if build.with? "completions"
|
|
|
|
bash_completion.install "contrib/completion/bash/docker"
|
|
|
|
zsh_completion.install "contrib/completion/zsh/_docker"
|
2014-02-12 12:10:52 +00:00
|
|
|
end
|
2014-02-07 16:09:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/docker", "--version"
|
|
|
|
end
|
|
|
|
end
|