summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2020-07-04 12:18:02 -0600
committerMark Wagie2020-07-04 12:18:02 -0600
commitf64830c58d103f1361470da0df068af576e2f95f (patch)
treedf57fff491583d83362365fc0de607556137b471
parent3ae8eb6cb0daf2b5070d1de145fc6c7660fce21e (diff)
downloadaur-f64830c58d103f1361470da0df068af576e2f95f.tar.gz
use local GOPATH
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD18
2 files changed, 13 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cfac804872b1..09279c5ede21 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 0a4328468fad..87ba916e7ac7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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