summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2020-07-04 12:20:18 -0600
committerMark Wagie2020-07-04 12:20:18 -0600
commitb1abaad53338c1491de2db80a33c98a4bbba48f1 (patch)
tree4519dae1080dc2539865ab43b1b8a2039cb7142c
parent89862603b9b3f65e297ca3ef19e9c62bc80f1270 (diff)
downloadaur-b1abaad53338c1491de2db80a33c98a4bbba48f1.tar.gz
use local GOPATH
-rw-r--r--PKGBUILD10
1 files changed, 9 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f8d63f945ca..6cf56e8d018 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,12 @@ sha256sums=('e377942c6dd9cbe3f9f55b7614e17b7c5f0694b326ad3993d0cde59aca8dc8fa')
prepare() {
mkdir -p gopath/src/github.com/isacikgoz
ln -rTsf "${pkgname%++}-$pkgver" "gopath/src/github.com/isacikgoz/${pkgname%++}"
- 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/isacikgoz/${pkgname%++}"
dep init -v
@@ -31,6 +36,9 @@ build() {
-buildmode=pie \
-ldflags "-extldflags \"${LDFLAGS}\"" \
-o $pkgname .
+
+ # Clean now to ensure makepkg --clean works
+ go clean -modcache
}
package() {