[arch-commits] Commit in brook/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Fri Jun 26 07:00:40 UTC 2020


    Date: Friday, June 26, 2020 @ 07:00:40
  Author: felixonmars
Revision: 653443

upgpkg: brook 20200501-1

Modified:
  brook/trunk/PKGBUILD

----------+
 PKGBUILD |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-06-26 05:59:45 UTC (rev 653442)
+++ PKGBUILD	2020-06-26 07:00:40 UTC (rev 653443)
@@ -2,7 +2,7 @@
 # Contributor: Kasei Wang <cnsdwpc at gmail.com>
 
 pkgname=brook
-pkgver=20200201
+pkgver=20200501
 pkgrel=1
 pkgdesc="A cross-platform proxy/vpn software"
 arch=('x86_64')
@@ -9,9 +9,9 @@
 url="https://github.com/txthinking/brook"
 license=('GPL')
 depends=('glibc')
-makedepends=('go-pie' 'git')
+makedepends=('go' 'golang-golang-x-net' 'golang-golang-x-text' 'git')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/txthinking/brook/archive/v$pkgver.tar.gz")
-sha512sums=('2a6589a9a67f5b7ac43fda2524f7fa4de05d7a0c353bd07ec39945a638c57b2287359d5bcdf4a97f56652d3a666e75904cdc272d3abb7b63c66ddb052b0e87a6')
+sha512sums=('dc2adbc6eee69adcc51b2e1effa62481dbc765de49d0d64e14cb1be9499b8e45864683a0ea5c9f4193f00f1731de1fbb6164376c9177bfaaa7778f0229cbc07a')
 
 prepare() {
   cd brook-$pkgver
@@ -19,20 +19,26 @@
   mkdir build
   mkdir -p .gopath/src/github.com/txthinking
   ln -sf "$PWD" .gopath/src/github.com/txthinking/brook
-  export GOPATH="$PWD/.gopath"
+  export GOPATH="$PWD/.gopath:/usr/share/gocode"
 
-  go get github.com/mdp/qrterminal github.com/patrickmn/go-cache github.com/txthinking/ant \
-         github.com/txthinking/socks5 golang.org/x/net/proxy github.com/gorilla/mux \
+  go get github.com/mdp/qrterminal github.com/patrickmn/go-cache github.com/txthinking/x \
+         github.com/txthinking/socks5 github.com/txthinking/encrypt github.com/gorilla/mux \
          github.com/urfave/cli github.com/txthinking/gotun2socks github.com/gorilla/websocket \
-         github.com/urfave/negroni
+         github.com/urfave/negroni github.com/tdewolff/minify
 }
 
 build() {
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+
   cd brook-$pkgver/cli/brook
-  go build -ldflags "-extldflags ${LDFLAGS}" -o brook
+  go build -o brook
 }
 
 package() {
   cd brook-$pkgver/cli/brook
-  install -Dm755 brook "$pkgdir"/usr/bin/brook
+  install -Dm755 brook -t "$pkgdir"/usr/bin/
 }



More information about the arch-commits mailing list