homebrew-core/Formula/docker.rb
2016-04-13 22:39:27 -07:00

47 lines
1.5 KiB
Ruby

class Docker < Formula
desc "Pack, ship and run any application as a lightweight container"
homepage "https://www.docker.com/"
url "https://github.com/docker/docker.git",
:tag => "v1.11.0",
:revision => "4dc5990d7565a4a15d641bc6a0bc50a02cfcf302"
head "https://github.com/docker/docker.git"
bottle do
cellar :any_skip_relocation
sha256 "052b4450362da4b34c1b309d51a2520bf38ec7aa9862012fafe7eba314584d3a" => :el_capitan
sha256 "03f7ec1ebf01ef6f6ec6f60f50d061fcf7ae5b6420669335645abde620a54b5d" => :yosemite
sha256 "ee70765c4f32c6244100ae77e628e9a336d075a0c7cf2ade2040717572c1e86e" => :mavericks
end
option "with-experimental", "Enable experimental features"
option "without-completions", "Disable bash/zsh completions"
depends_on "go" => :build
if build.with? "experimental"
depends_on "libtool" => :run
depends_on "yubico-piv-tool" => :recommended
end
def install
ENV["AUTO_GOPATH"] = "1"
ENV["DOCKER_CLIENTONLY"] = "1"
ENV["DOCKER_EXPERIMENTAL"] = "1" if build.with? "experimental"
system "hack/make.sh", "dynbinary"
build_version = build.head? ? File.read("VERSION").chomp : version
bin.install "bundles/#{build_version}/dynbinary/docker-#{build_version}" => "docker"
if build.with? "completions"
bash_completion.install "contrib/completion/bash/docker"
fish_completion.install "contrib/completion/fish/docker.fish"
zsh_completion.install "contrib/completion/zsh/_docker"
end
end
test do
system "#{bin}/docker", "--version"
end
end