46 lines
1.5 KiB
Ruby
46 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.12.0",
|
|
:revision => "8eab29edd820017901796eb60d4bea28d760f16f"
|
|
|
|
head "https://github.com/docker/docker.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "f67ee7204bb31e226cbdc3f8b3526f33eb2fc00eed03c27faeb5237ec9faf2b9" => :el_capitan
|
|
sha256 "c0aa18fc1c4726ea55b9e166bc61f490ecd520b5d0fcfd0a50cf540b3b5dd731" => :yosemite
|
|
sha256 "3dd5bb6508fea6356b9aa2ce96ceef9477a460c95ac72f9a759fc89ba1d82263" => :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_EXPERIMENTAL"] = "1" if build.with? "experimental"
|
|
|
|
system "hack/make.sh", "dynbinary-client"
|
|
|
|
build_version = build.head? ? File.read("VERSION").chomp : version
|
|
bin.install "bundles/#{build_version}/dynbinary-client/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
|