set Go env vars in environment
This way, a template can overwrite do_build but still have good defaults for GOPATH, GOARCH and GOARM.
This commit is contained in:
@@ -3,3 +3,12 @@ if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" go-cross-linux"
|
||||
fi
|
||||
nostrip=yes
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
armv6*) export GOARCH=arm; export GOARM=6;;
|
||||
armv7*) export GOARCH=arm; export GOARM=7;;
|
||||
i686*) export GOARCH=386;;
|
||||
x86_64*) export GOARCH=amd64;;
|
||||
esac
|
||||
|
||||
export GOPATH="${wrksrc}/_build-${pkgname}-xbps"
|
||||
|
||||
Reference in New Issue
Block a user