diff options
| author | Andy Shinn | 2014-12-13 21:22:48 -0600 |
|---|---|---|
| committer | Mike McQuaid | 2015-02-24 10:16:51 +0000 |
| commit | dfed201bbdba47999c4618657e6ba1e0d316a50c (patch) | |
| tree | 27d11e4eefcb72007c9428d6a4edf2c7f2a65c6c /Library | |
| parent | 296c24c765a638f3202b7e0868b3a80f9e9e8804 (diff) | |
| download | homebrew-dfed201bbdba47999c4618657e6ba1e0d316a50c.tar.bz2 | |
deisctl 1.1.0
Closes #34967.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/deisctl.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Library/Formula/deisctl.rb b/Library/Formula/deisctl.rb new file mode 100644 index 000000000..5d7aaebb8 --- /dev/null +++ b/Library/Formula/deisctl.rb @@ -0,0 +1,46 @@ +require "language/go" + +class Deisctl < Formula + homepage "http://deis.io/" + url "https://github.com/deis/deis/archive/v1.1.0.tar.gz" + sha1 "c57fb6073b374b95262c36959c6d2b6c508cda59" + + depends_on :hg => :build + depends_on "go" => :build + + go_resource "github.com/kr/godep" do + url "https://github.com/kr/godep.git", :revision => "07a96a1131ddff383e0f502d24c0f989ed0a8bb1" + end + + go_resource "github.com/kr/fs" do + url "https://github.com/kr/fs.git", :revision => "2788f0dbd16903de03cb8186e5c7d97b69ad387b" + end + + go_resource "golang.org/x/tools" do + url "https://code.google.com/p/go.tools/", :revision => "140fcaadc586", :using => :hg + end + + def install + ENV["GOPATH"] = buildpath + ENV["CGO_ENABLED"] = "0" + ENV.prepend_create_path "PATH", buildpath/"bin" + + mkdir_p "#{buildpath}/deisctl/Godeps/_workspace/src/github.com/deis" + ln_s buildpath, "#{buildpath}/deisctl/Godeps/_workspace/src/github.com/deis/deis" + + Language::Go.stage_deps resources, buildpath/"src" + + cd "src/github.com/kr/godep" do + system "go", "install" + end + + cd "deisctl" do + system "godep", "go", "build", "-a", "-ldflags", "-s", "-o", "dist/deisctl" + bin.install "dist/deisctl" + end + end + + test do + system "#{bin}/deisctl", "help" + end +end |
