# Template file for 'go1.24-bootstrap'
pkgname=go1.24-bootstrap
version=1.24.6
revision=1
archs="x86_64* i686* armv[67]l* aarch64* ppc64le*"
short_desc="Go 1.24 (bootstrap compiler)"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://golang.org"
nostrip=yes
noverifyrdeps=yes
nocross=yes
lib32disabled=yes
repository=bootstrap

if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
	depends+=" gcompat"
fi

case "$XBPS_TARGET_MACHINE" in
	x86_64*)
		_dist_arch="amd64"
		checksum="bbca37cc395c974ffa4893ee35819ad23ebb27426df87af92e93a9ec66ef8712"
		;;
	i686*)
		_dist_arch="386"
		checksum="bb5bf69d75e7edbc93339824753a1a4655a928451a2c5e13ff90959ad69e065b"
		;;
	arm*)
		_dist_arch="armv6l"
		checksum="7feb4d25f5e72f94fda81c99d4adb6630dfa2c35211e0819417d53af6e71809e"
		;;
	aarch64*)
		_dist_arch="arm64"
		checksum="124ea6033a8bf98aa9fbab53e58d134905262d45a022af3a90b73320f3c3afd5"
		;;
	ppc64le*)
		_dist_arch="ppc64le"
		checksum="63fc9559a3d6dfd63aa902f714375b879bbc848466181c035c122489b9646e27"
		;;
esac

distfiles="https://dl.google.com/go/go${version}.linux-${_dist_arch}.tar.gz"

do_install() {
	vmkdir usr/lib/go${version}
	vcopy bin usr/lib/go${version}
	vcopy src usr/lib/go${version}
	vcopy pkg usr/lib/go${version}
	vlicense LICENSE
}
