diff options
author | Mark Wagie | 2020-07-04 12:18:02 -0600 |
---|---|---|
committer | Mark Wagie | 2020-07-04 12:18:02 -0600 |
commit | f64830c58d103f1361470da0df068af576e2f95f (patch) | |
tree | df57fff491583d83362365fc0de607556137b471 | |
parent | 3ae8eb6cb0daf2b5070d1de145fc6c7660fce21e (diff) | |
download | aur-f64830c58d103f1361470da0df068af576e2f95f.tar.gz |
use local GOPATH
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 18 |
2 files changed, 13 insertions, 7 deletions
@@ -1,5 +1,5 @@ pkgbase = opensnitch-git - pkgdesc = A GNU/Linux port of the Little Snitch application firewall. + pkgdesc = A GNU/Linux application firewall pkgver = 1.0.0rc11.r0.714aa31 pkgrel = 1 url = https://github.com/gustavo-iniguez-goya/opensnitch @@ -5,7 +5,7 @@ pkgname=opensnitch-git pkgver=1.0.0rc11.r0.714aa31 pkgrel=1 -pkgdesc="A GNU/Linux port of the Little Snitch application firewall." +pkgdesc="A GNU/Linux application firewall" arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') url="https://github.com/gustavo-iniguez-goya/opensnitch" license=('GPL3') @@ -29,7 +29,12 @@ prepare() { mkdir -p gopath/src/github.com/gustavo-iniguez-goya ln -rTsf "$srcdir/${pkgname%-git}" \ "gopath/src/github.com/gustavo-iniguez-goya/${pkgname%-git}" - export GOPATH="$srcdir"/gopath + + # Prevent creation of a `go` directory in one's home. + # Sometimes this directory cannot be removed with even `rm -rf` unless + # one becomes root or changes the write permissions. + export GOPATH="$srcdir/gopath" + go clean -modcache cd "gopath/src/github.com/gustavo-iniguez-goya/${pkgname%-git}/daemon" dep ensure -v @@ -39,16 +44,17 @@ prepare() { } build() { - export GOPATH="$srcdir"/gopath - cd "gopath/src/github.com/gustavo-iniguez-goya/${pkgname%-git}/daemon" go build \ -v \ -trimpath \ - -buildmode=pie \ - -ldflags "-extldflags \"${LDFLAGS}\"" \ + -buildmode=pie \ + -ldflags "-extldflags \"${LDFLAGS}\"" \ -o opensnitchd . + # Clean now to ensure makepkg --clean works + go clean -modcache + cd "$srcdir/${pkgname%-git}/proto" make |