summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2020-07-04 12:14:54 -0600
committerMark Wagie2020-07-04 12:14:54 -0600
commit8537016583fa6026e9717cd6f31b458eec492373 (patch)
tree7d1e92e2561e9b7122253d6628c0cf3943cdb61f
parent32287598afd4a8987b7af9609d760455f7d128f4 (diff)
downloadaur-8537016583fa6026e9717cd6f31b458eec492373.tar.gz
use local GOPATH
-rw-r--r--PKGBUILD9
1 files changed, 9 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2ea147b75fb1..99d2b1172e41 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -39,6 +39,12 @@ prepare() {
sed -i "s/'deb', 'rpm'/'deb'/g" gui/tasks/distribution.js
mkdir -p dist-assets/shell-completions
+
+ # 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
}
build() {
@@ -61,6 +67,9 @@ build() {
-v -o "../../build/lib/$arch-unknown-linux-gnu"/libwg.a \
-buildmode c-archive
+ # Clean now to ensure makepkg --clean works
+ go clean -modcache
+
cd "$srcdir/mullvadvpn-app"
echo "Updating version in metadata files..."
./version-metadata.sh inject $PRODUCT_VERSION