Add Homebrew support #3

This commit is contained in:
Manfred Touron 2016-11-06 20:19:56 +01:00
parent e0c9f987fc
commit 65f289bea7
No known key found for this signature in database
GPG Key ID: 9CCF47DF1FD978A1

View File

@ -0,0 +1,20 @@
require "language/go"
class ProtocGenGotemplate < Formula
desc "protocol generator + golang text/template (protobuf)"
homepage "https://github.com/moul/protoc-gen-gotemplate"
url "https://github.com/moul/protoc-gen-gotemplate/archive/v1.0.0.tar.gz"
sha256 "1ff57cd8513f1e871cf71dc8f2099bf64204af0df1b7397370827083e95bbb82"
head "https://github.com/moul/protoc-gen-gotemplate.git"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
ENV["GOBIN"] = buildpath
ENV["GO15VENDOREXPERIMENT"] = "1"
(buildpath/"src/github.com/moul/protoc-gen-gotemplate").install Dir["*"]
system "go", "build", "-o", "#{bin}/protoc-gen-gotemplate", "-v", "github.com/moul/protoc-gen-gotemplate"
end
end