Go was originally updated to 1.11.5 already, as a part of thea2f0a976d1
commit, which the2b4f08ec80
commit did not assume, resulting in a partial merge of #8064 that changes short desc but does not bump. [ci skip]
81 lines
2 KiB
Bash
81 lines
2 KiB
Bash
# Template file for 'go'
|
|
pkgname=go
|
|
version=1.11.5
|
|
revision=2
|
|
create_wrksrc=yes
|
|
build_wrksrc=go
|
|
hostmakedepends="go1.4-bootstrap"
|
|
short_desc="Go Programming Language"
|
|
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="http://golang.org/"
|
|
distfiles="https://golang.org/dl/go${version}.src.tar.gz"
|
|
checksum=bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e
|
|
|
|
nostrip=yes
|
|
noverifyrdeps=yes
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
aarch64*) _goarch=arm64 ;;
|
|
arm*) _goarch=arm ;;
|
|
mips*) _goarch=mips ;;
|
|
i686*) _goarch=386 ;;
|
|
x86_64*) _goarch=amd64 ;;
|
|
*) _goarch=${XBPS_TARGET_MACHINE} ;;
|
|
esac
|
|
|
|
do_build() {
|
|
unset GCC CC CXX LD CFLAGS
|
|
# FIXME: work around leaking go build-style vars when built as a
|
|
# dependency
|
|
unset CGO_CXXFLAGS CGO_CFLAGS CGO_ENABLED
|
|
|
|
|
|
export GOCACHE=off
|
|
export GOROOT=$PWD
|
|
export GOROOT_FINAL="/usr/lib/go"
|
|
export GOROOT_BOOTSTRAP="/usr/lib/go1.4"
|
|
export GOARCH=${_goarch}
|
|
|
|
cd "src"
|
|
|
|
bash make.bash --no-clean -v
|
|
}
|
|
|
|
do_install() {
|
|
local bindir
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
bindir=bin/linux_${_goarch}
|
|
else
|
|
bindir=bin
|
|
fi
|
|
|
|
vmkdir usr/bin
|
|
vmkdir usr/lib/go
|
|
vmkdir usr/share/go
|
|
cp -d --preserve=all ${bindir}/* ${DESTDIR}/usr/bin || true
|
|
cp -a pkg src lib ${DESTDIR}/usr/lib/go
|
|
cp -r doc misc -t ${DESTDIR}/usr/share/go
|
|
ln -s /usr/share/go/doc ${DESTDIR}/usr/lib/go/doc
|
|
|
|
# This is to make go get code.google.com/p/go-tour/gotour and
|
|
# then running the gotour executable work out of the box.
|
|
#
|
|
# Also, /usr/bin is the place for system-wide executables,
|
|
# not /usr/lib/go/bin. Users should use different paths by
|
|
# setting the appropriate environment variables.
|
|
#
|
|
ln -sf /usr/bin ${DESTDIR}/usr/lib/go/bin
|
|
|
|
# <dominikh> sigh. well, someone fix the template and add
|
|
# a symlink, usr/lib/go/misc -> /usr/share/go/misc
|
|
ln -sfr ${DESTDIR}/usr/share/go/misc ${DESTDIR}/usr/lib/go/misc
|
|
|
|
rm -f ${DESTDIR}/usr/share/go/doc/articles/wiki/get.bin
|
|
rm -f ${DESTDIR}/usr/lib/go/pkg/tool/*/api
|
|
rm -rf ${DESTDIR}/usr/lib/go/pkg/bootstrap
|
|
rm -rf ${DESTDIR}/usr/lib/go/pkg/obj
|
|
|
|
vlicense LICENSE
|
|
}
|