Skip to content

Commit

Permalink
gost: build with [email protected]
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Aug 21, 2023
1 parent 170523f commit 76329f2
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Formula/g/gost.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
class Gost < Formula
desc "GO Simple Tunnel - a simple tunnel written in golang"
homepage "https://github.com/ginuerzh/gost"
url "https://github.com/ginuerzh/gost/archive/v2.11.5.tar.gz"
sha256 "dab48b785f4d2df6c2f5619a4b9a2ac6e8b708f667a4d89c7d08df67ad7c5ca7"
license "MIT"
revision 1
head "https://github.com/ginuerzh/gost.git", branch: "master"

stable do
url "https://github.com/ginuerzh/gost/archive/v2.11.5.tar.gz"
sha256 "dab48b785f4d2df6c2f5619a4b9a2ac6e8b708f667a4d89c7d08df67ad7c5ca7"

# go1.20 build patch, remove in next release
patch do
url "https://github.com/ginuerzh/gost/commit/0f7376b.patch?full_index=1"
sha256 "091eceef591810a383b1082ba2677503f9cb39a971a8098ebaecd3cd02dd18db"
end
end

bottle do
rebuild 1
sha256 cellar: :any_skip_relocation, arm64_ventura: "a038791ff4264c47f939d8c23da79d7c2c6973908078a266a1c6e6b6b62bf554"
Expand All @@ -17,13 +27,10 @@ class Gost < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "19b99cc2fdc814773ed05924490b3896473889ad7a933b7ce1c80e53127fae5c"
end

# Support for go 1.20 is merged upstream but not yet landed in a tag:
# https://github.com/ginuerzh/gost/commit/0f7376bd10c913c7e6b1e7e02dd5fd7769975d78
# Remove on next release.
depends_on "[email protected]" => :build
depends_on "[email protected]" => :build

def install
system "go", "build", *std_go_args, "./cmd/gost"
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/gost"
prefix.install "README_en.md"
end

Expand Down

0 comments on commit 76329f2

Please sign in to comment.