joanbono/Gurp

Create brew formula

joanbono opened this issue · 1 comments

Create a homebrew formula

Started with the formula:

class Gurp < Formula
  desc "Program to interact with BurpSuite v2.0.0+ REST Api"
  homepage "https://github.com/joanbono/Gurp"
  url "https://github.com/joanbono/Gurp/archive/v1.1.0.tar.gz"
  sha256 "1e0791d2f8bdba1e3e1315a59629e89cdb1c6a8bd3f74df8f2ad65d131f87ad2"
  head "https://github.com/joanbono/Gurp.git"

  depends_on "go" => :build

  go_resource "github.com/joanbono/color" do
    url "https://github.com/joanbono/color.git",
        :revision => "5a8b9f40f05e2dad1389c8355887e06f1187c3e3"
  end

  go_resource "github.com/integrii/flaggy" do
    url "https://github.com/integrii/flaggy.git",
        :revision => "97242ef91bdd328ef7ae8b6b4f3b6affbb1260cd"
  end

  go_resource "github.com/tidwall/gjson" do
    url "https://github.com/tidwall/gjson.git",
        :revision => "1e3f6aeaa5bad08d777ea7807b279a07885dd8b2"
  end
  
  go_resource "github.com/lair-framework/go-nmap" do
    url "https://github.com/lair-framework/go-nmap.git",
       :revision => "84c21710ccc8b9bc7a6cc4b5863bd27a36836c4f"
  end

  go_resource "github.com/grokify/html-strip-tags-go" do
    url "https://github.com/grokify/html-strip-tags-go.git",
        :revision => "e9e44961e26f513866063f54bf85070db95600f7"
  end

  def install
    ENV["GOPATH"] = buildpath
    (buildpath/"src/github.com/joanbono/Gurp").install buildpath.children

     cd "src/github.com/joanbono/Gurp" do
      system "make", "deps"
      system "make", "install"
      bin.install "gurp"
      prefix.install_metafiles
    end
  end

  end
   test do
    assert_match "gurp", shell_output("#{bin}/gurp -h 2>&1", 2)
    assert_match "gurp", shell_output("#{bin}/gurp -v 2>&1", 2)
   end
end

Needs to be finished after release