summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-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() {