From 22e487af46eadf2961ea54e4b2173bcc12cb19db Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Sun, 27 Sep 2015 21:51:58 +0200 Subject: [PATCH] Add 'homebrew support' (fix #1) --- contrib/homebrew/gotty-client.rb | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 contrib/homebrew/gotty-client.rb diff --git a/contrib/homebrew/gotty-client.rb b/contrib/homebrew/gotty-client.rb new file mode 100644 index 0000000..3d33a33 --- /dev/null +++ b/contrib/homebrew/gotty-client.rb @@ -0,0 +1,34 @@ +require "language/go" + +class GottyClient < Formula + desc "gotty-client: GoTTY client for your terminal" + homepage "https://github.com/moul/gotty-client" + url "https://github.com/moul/gotty-client/archive/v1.0.1.tar.gz" + sha256 "b74a2501218863b3853dc871f53dab1893357dfcd395be853c0f36b3d427928c" + + head "https://github.com/moul/gotty-client.git" + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["CGO_ENABLED"] = "0" + ENV.prepend_create_path "PATH", buildpath/"bin" + + mkdir_p buildpath/"src/github.com/moul" + ln_s buildpath, buildpath/"src/github.com/moul/gotty-client" + Language::Go.stage_deps resources, buildpath/"src" + + # FIXME: update version + system "go", "build", "-o", "gotty-client", "./cmd/gotty-client/" + bin.install "gotty-client" + + # FIXME: add autocompletion + end + + test do + # FIXME: add test + #output = shell_output(bin/"gotty-client --version") + #assert output.include? "gotty-client version XXX" + end +end