I think I found it. At first I tried build it with pacaur and it failed. I tried then manually with makepkg and it worked.
It seems that pacaur discards env variables between prepare and build sections. It means it's better to set them twice like this:
prepare() {
export GOPATH="${srcdir}/.go"
export GOBIN="$GOPATH/bin"
mkdir -p "$GOPATH"
rm -rf "$GOPATH/src"
ln -sf "$srcdir/$pkgname-$pkgver/vendor" "$GOPATH/src"
}
build() {
export GOPATH="${srcdir}/.go"
export GOBIN="$GOPATH/bin"
cd "$srcdir/$pkgname-$pkgver"
go build -v -o ${pkgname} -ldflags "-s -w -X main.version=${pkgver}"
}
Pinned Comments
jguer commented on 2024-03-16 08:06 (UTC)
This will happen if you upgrade pacman and yay separately If you have this error you need to manually recompile yay
jguer commented on 2019-04-16 14:08 (UTC)
I cannot delete the spam comments appearing regularly in this page, which has also led me to disable notifications from here. I remind that the best way to receive support or report a problem is through the Upstream URL.