7757a088fd
fix update-alternatives usage OBS-URL: https://build.opensuse.org/request/show/497883 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=283
41 lines
623 B
Bash
41 lines
623 B
Bash
# go toolchain env paths
|
|
export GOOS="linux"
|
|
case "$(uname -m)" in
|
|
*86)
|
|
export GOARCH=386
|
|
libdir=lib
|
|
;;
|
|
aarch64)
|
|
export GOARCH=arm64
|
|
libdir=lib64
|
|
;;
|
|
x86_64)
|
|
export GOARCH=amd64
|
|
libdir=lib64
|
|
;;
|
|
ppc64)
|
|
export GOARCH=ppc64
|
|
libdir=lib64
|
|
;;
|
|
ppc64le)
|
|
export GOARCH=ppc64le
|
|
libdir=lib64
|
|
;;
|
|
arm*)
|
|
export GOARCH=arm
|
|
libdir=lib
|
|
;;
|
|
s390x)
|
|
export GOARCH=s390x
|
|
libdir=lib64
|
|
;;
|
|
esac
|
|
export GOROOT=/usr/$libdir/go/$go_api
|
|
export GOBIN=/usr/bin
|
|
export GOPATH=/usr/share/go/$go_api/contrib
|
|
|
|
if [ `id -u` != 0 ]; then
|
|
export GOPATH=$HOME/go:/usr/share/go/$go_api/contrib
|
|
unset GOBIN
|
|
fi
|