Skip to content

Instantly share code, notes, and snippets.

@danielnorberg
Created June 13, 2014 00:17
Show Gist options
  • Save danielnorberg/14b001b9a6e3d43da011 to your computer and use it in GitHub Desktop.
Save danielnorberg/14b001b9a6e3d43da011 to your computer and use it in GitHub Desktop.
require "formula"
class Docker < Formula
homepage "http://docker.io"
url "https://github.com/dotcloud/docker.git", :tag => "v1.0.0"
option "without-completions", "Disable bash/zsh completions"
depends_on "go" => :build
patch do
url "https://gist.githubusercontent.com/danielnorberg/484602ff6dc7ae372fcf/raw/7c86daf585386eab49f057e90a8b9e5f343e08d2/0001-fix-building-docker-v1.0.0-on-macosx.patch"
sha1 "ec38f263f5d67b0e2a9295e3c14a9dec6195cad3"
end
def install
ENV["GIT_DIR"] = cached_download/".git"
ENV["AUTO_GOPATH"] = "1"
ENV["DOCKER_CLIENTONLY"] = "1"
system "hack/make.sh", "dynbinary"
bin.install "bundles/#{version}/dynbinary/docker-#{version}" => "docker"
if build.with? "completions"
bash_completion.install "contrib/completion/bash/docker"
zsh_completion.install "contrib/completion/zsh/_docker"
end
end
test do
system "#{bin}/docker", "--version"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment