65 lines
1.6 KiB
Bash
65 lines
1.6 KiB
Bash
# Template file for 'go1.12-bootstrap'
|
|
pkgname=go1.12-bootstrap
|
|
version=1.12.16
|
|
revision=1
|
|
archs="x86_64* i686* armv[67]l* aarch64* ppc64le*"
|
|
wrksrc="go"
|
|
short_desc="Go 1.12 (bootstrap compiler)"
|
|
maintainer="q66 <daniel@octaforge.org>"
|
|
license="BSD-3-Clause"
|
|
homepage="https://golang.org"
|
|
nostrip=yes
|
|
noverifyrdeps=yes
|
|
nocross=yes
|
|
lib32disabled=yes
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
|
depends+=" gcompat"
|
|
hostmakedepends+=" patchelf"
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
x86_64*)
|
|
_dist_arch="amd64"
|
|
checksum="bf3a85d75658144c06ce986ba05e07ef08af4320089b74b1d41de3b0f340ea7e"
|
|
;;
|
|
i686*)
|
|
_dist_arch="386"
|
|
checksum="e6ebf5622203f2ceee138af16c765818bf65b74668d5e73c1da6491c3e890a88"
|
|
;;
|
|
arm*)
|
|
_dist_arch="armv6l"
|
|
checksum="2f77688eaf25d8ae58adc5164de0fc13d600705c2ebadc6e1138e5ce9ceadc41"
|
|
;;
|
|
aarch64*)
|
|
_dist_arch="arm64"
|
|
checksum="a01df310bfeffc67480982cf6ad50c9b83f9aaf4ac855d5e581b95eb727bb24c"
|
|
;;
|
|
ppc64le*)
|
|
_dist_arch="ppc64le"
|
|
checksum="7c133932d1beae68a483dbac69bb0e1023fa08196ebee100594b79c0672ce67c"
|
|
;;
|
|
esac
|
|
|
|
distfiles="https://dl.google.com/go/go${version}.linux-${_dist_arch}.tar.gz"
|
|
|
|
post_build() {
|
|
[ "$XBPS_TARGET_LIBC" != "musl" ] && return 0
|
|
|
|
# we don't have lib64 compatibility path on musl 64-bit systems
|
|
# use patchelf to replace /lib64/<dynlinker> with /lib/<dynlinker>
|
|
|
|
local _interp=$(patchelf --print-interpreter ${wrksrc}/bin/go)
|
|
|
|
patchelf --set-interpreter ${_interp/lib64\//lib\/} ${wrksrc}/bin/go
|
|
patchelf --set-interpreter ${_interp/lib64\//lib\/} ${wrksrc}/bin/godoc
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir usr/lib/go1.12
|
|
vcopy bin usr/lib/go1.12
|
|
vcopy src usr/lib/go1.12
|
|
vcopy pkg usr/lib/go1.12
|
|
vlicense LICENSE
|
|
}
|