47 lines
1.5 KiB
Ruby
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.2",
|
|
:revision => "b9f10c951893f9a00865890a5232e85d770c1087"
|
|
|
|
head "https://github.com/docker/docker.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "85376c2591bb8e87981608764ee34d94b2341b6dd428fe75a415af0fd3be64d9" => :el_capitan
|
|
sha256 "44a84556a9d7ab7d631f847e3f761a09db9f0e1fffa9e7e9a341c27f0ead4be3" => :yosemite
|
|
sha256 "5d4657dfcebd6d2e1fe59fe6487f6fe54ed9f6971969ccc0b93088e70d3c9633" => :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
|