summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorflan_suse2023-06-20 00:57:33 -0400
committerflan_suse2023-06-20 00:57:33 -0400
commita219a320c57f14a112e05597f6a7de630b162b24 (patch)
treecea7a1701671eae46693051262f4b6f9457a5f5e /PKGBUILD
parentfdaf7dfbb66cd87002633ea66fa551772ae093d1 (diff)
downloadaur-a219a320c57f14a112e05597f6a7de630b162b24.tar.gz
Fixed issue with go modcache that might fail certain AUR helpers
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD7
1 files changed, 6 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 3af4bd6f6c3a..a69a3b1255e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -32,6 +32,12 @@ prepare() {
# Change into directory
cd ${pkgname}-${pkgver}
+ # Prepare environment
+ export GOPATH=${srcdir}/go
+ export GOENV=${srcdir}/go/.config
+ export GOCACHE=${srcdir}/go/.cache
+ go clean -cache -modcache
+
# Correct the Debian executable path to work with Arch Linux and related distros
sed -i 's/^Exec.*$/Exec=wireguird/g' deb/usr/share/applications/${pkgname}.desktop
mv deb/usr/local/bin deb/usr
@@ -58,7 +64,6 @@ build() {
export GOCACHE=${srcdir}/go/.cache
# Compile binary with gcc-go compiler
- go clean -cache -modcache
go generate
go build -modcacherw -ldflags "-s -w" -trimpath -o bin/${pkgname}
go clean -cache -modcache