Created
June 13, 2014 00:17
-
-
Save danielnorberg/14b001b9a6e3d43da011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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