summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcaltlgin2020-09-30 15:50:29 +1300
committercaltlgin2020-09-30 15:50:29 +1300
commit20d3c9caefe66ce47649203e88a96bf72ef43eab (patch)
tree8191b11d67d8f4a0e6dde37fa9084a41d2361d56
parentbf0c61bf76969c186ad6b0d4ea9ba285b5623484 (diff)
downloadaur-20d3c9caefe66ce47649203e88a96bf72ef43eab.tar.gz
Add "go clean -modcache"
-rw-r--r--PKGBUILD10
1 files changed, 7 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a75beee23598..9733012ba794 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>
-_pkgname=anew
-pkgname=${_pkgname}-git
+_pkgname='anew'
+pkgname="${_pkgname}-git"
pkgver=r6.f212493
pkgrel=1
pkgdesc='Append lines from stdin to a file, but only if they dont already appear in the file'
@@ -13,6 +13,11 @@ provides=("${_pkgname}")
source=("git+${url}.git")
sha256sums=('SKIP')
+prepare() {
+ export GOPATH="${srcdir}/gopath"
+ go clean -modcache
+}
+
pkgver() {
cd "${_pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -24,7 +29,6 @@ build() {
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
- export GOPATH="${srcdir}"
cd "${_pkgname}"
go build -v -o "${_pkgname}" main.go