summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorRubenKelevra2022-05-14 16:01:40 +0200
committerRubenKelevra2022-05-14 18:21:40 +0200
commit8b24eb3c6d57358646130a4ac805807c5362f550 (patch)
treec5ae26e91b34b10f8f0fa015e0a4527b441f5746 /PKGBUILD
parent81ad7a0436b78281e26a0098e3d62cf99c8d6a41 (diff)
downloadaur-8b24eb3c6d57358646130a4ac805807c5362f550.tar.gz
more upstream changes
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD20
1 files changed, 14 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4d1207ae9048..d528ef291609 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,7 +19,7 @@ arch=('i686' 'x86_64' 'armv7h' 'aarch64')
license=(MIT)
depends=(glibc)
-makedepends=("go>=2:1.18-1" git)
+makedepends=("go>=1.18" git)
optdepends=('bash-completion: bash completion support')
provides=("$_pkgname")
@@ -42,16 +42,24 @@ prepare() {
cd "$srcdir/.."
mkdir -p "go"
export GOPATH="$(pwd)/go"
- # export PATH="$PATH:$GOPATH/bin" ?
- # fix for broken versions of this package
+ # make sure GOPATH is set to writeable
chmod u+w -R "$GOPATH"
cd "$srcdir/$_pkgname"
-# # dirty fix go1.18
-# sed -i -r 's,^go 1\.[0-9]+,go 1.18,' go.mod
- go get -d -v ./... # old fetch
+ export CGO_LDFLAGS="$LDFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
+
+ # dirty fix go1.18
+ sed -i -r 's,^go 1\.[0-9]+,go 1.18,' go.mod
+ go mod tidy
+ go mod vendor
+
+ # go get -d -v ./... # old fetch
}