homebrew-core/Formula/deisctl.rb
2016-05-19 07:57:05 +02:00

56 lines
1.7 KiB
Ruby

require "language/go"
class Deisctl < Formula
desc "Deis Control Utility"
homepage "http://deis.io/"
url "https://github.com/deis/deis/archive/v1.13.1.tar.gz"
sha256 "6fd7d3f7947437ba513654cf893c06a761321dd6fbe53ab56a3d1ca2e30bd060"
bottle do
cellar :any_skip_relocation
sha256 "ae17d6bda26e9c497c1424d098538ac96c821ccd39966a7d391155b1311f5240" => :el_capitan
sha256 "2ca0059e5a3a156ceefcf2191940368c8fcf47b884ac9c12f570545d2c37e022" => :yosemite
sha256 "71c7e4237c0163eae73d0bca9caa722fe8abe980b95d0e5e9ca8d5f46f492a81" => :mavericks
end
depends_on "go" => :build
depends_on "godep" => :build
go_resource "github.com/docopt/docopt-go" do
url "https://github.com/docopt/docopt-go.git",
:revision => "854c423c810880e30b9fecdabb12d54f4a92f9bb"
end
go_resource "github.com/coreos/go-etcd" do
url "https://github.com/coreos/go-etcd.git",
:revision => "c904d7032a70da6551c43929f199244f6a45f4c1"
end
go_resource "github.com/coreos/fleet" do
url "https://github.com/coreos/fleet.git",
:tag => "v0.9.2",
:revision => "e0f7a2316dc6ae610979598c4efe127ac8ff1ae9"
end
go_resource "github.com/ugorji/go" do
url "https://github.com/ugorji/go.git",
:revision => "821cda7e48749cacf7cad2c6ed01e96457ca7e9d"
end
def install
ENV["GOPATH"] = buildpath
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 "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