From 9de51acbccdf20fe121f6e9a89472692e35e8b5a Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Wed, 3 Jan 2018 19:57:04 +0100 Subject: [PATCH] Add homebrew config --- examples/homebrew/sshportal.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 examples/homebrew/sshportal.rb diff --git a/examples/homebrew/sshportal.rb b/examples/homebrew/sshportal.rb new file mode 100644 index 0000000..fd1a529 --- /dev/null +++ b/examples/homebrew/sshportal.rb @@ -0,0 +1,24 @@ +require "language/go" + +class Sshportal < Formula + desc "sshportal: simple, fun and transparent SSH bastion" + homepage "https://github.com/moul/sshportal" + url "https://github.com/moul/sshportal/archive/v1.7.1.tar.gz" + sha256 "4611ae2f30cc595b2fb789bd0c92550533db6d4b63c638dd78cf85517b6aeaf0" + head "https://github.com/moul/sshportal.git" + + depends_on "go" => :build + + def install + ENV["GOPATH"] = buildpath + ENV["GOBIN"] = buildpath + (buildpath/"src/github.com/moul/sshportal").install Dir["*"] + + system "go", "build", "-o", "#{bin}/sshportal", "-v", "github.com/moul/sshportal" + end + + test do + output = shell_output(bin/"sshportal --version") + assert output.include? "sshportal version " + end +end