summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdo Roig-Maranges2022-01-08 11:10:29 +0100
committerAbdo Roig-Maranges2022-01-08 12:27:49 +0100
commit1df16971976616f1600b6ce5a32171f2b9d17430 (patch)
tree8e971f91067aa255d441037b66eac8240f04b69c
parentd3c8e97cf06fb666e45f1c2454297afd9e23119c (diff)
downloadaur-1df16971976616f1600b6ce5a32171f2b9d17430.tar.gz
do not set GOPATH to srcdir
This aligns with current packaging guidelines in https://wiki.archlinux.org/title/Go_package_guidelines
-rw-r--r--PKGBUILD4
1 files changed, 2 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0319b4c398a6..ef6a7b6d189f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,14 +20,14 @@ prepare(){
}
build() {
- export GOPATH="$srcdir"/gopath
cd "${_realpkgname}-$pkgver"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
_builddate=$(date -u +%m/%d/%Y)
- go build -o build -trimpath -buildmode=pie -ldflags "-linkmode=external -extldflags \"${LDFLAGS}\" -X main.version=v${pkgver} -X main.build=${_builddate} -X main.usageMode=prod -s -w" -modcacherw ./cmd/glab/main.go
+
+ go build -o build -trimpath -buildmode=pie -ldflags "-linkmode=external -extldflags \"${LDFLAGS}\" -X main.version=v${pkgver} -X main.build=${_builddate} -X main.usageMode=prod -s -w" -mod=readonly -modcacherw ./cmd/glab/main.go
mkdir -p share/man
make GLAB_VERSION="v${pkgver}" manpage