pkg:setup if [[ -z "$(which go)" ]]; then echo "************************" 1>&2 echo "Downloading a bootstrap." 1>&2 echo "************************" 1>&2 export GOROOT_BOOTSTRAP="$(${PKG_DATA}/bootstrap.sh)" export PATH="${GOROOT_BOOTSTRAP}/bin:${PATH}" fi export GOARCH=arm64 export GOOS=darwin export GOROOT_FINAL="${PKG_TAPF}/lib/go" export CGO_ENABLED=1 export CC_FOR_TARGET="${PKG_TARG}-gcc" export CXX_FOR_TARGET="${PKG_TARG}-g++" pushd src ./make.bash --no-clean popd for file in \ pkg/obj \ pkg/bootstrap \ bin/go \ bin/gofmt \ favicon.ico \ AUTHORS \ CONTRIBUTING.md \ CONTRIBUTORS \ README.md \ robots.txt \ misc/android \ misc/arm \ misc/git \ misc/ios \ misc/trace \ misc/swig \ pkg/tool/linux_amd64 \ pkg/tool/darwin_amd64 \ pkg/linux_amd64 \ pkg/darwin_amd64 do rm -rf ${file} || : done ln -rsf bin/*/go* bin/ pkg: mkdir -p "${GOROOT_FINAL}" pkg: mkdir -p /etc/profile.d pkg: mkdir -p "${PKG_TAPF}"/bin cp -r * "${PKG_DEST}"/"${GOROOT_FINAL}" cp "${PKG_DATA}"/go.sh.in "${PKG_DEST}"/etc/profile.d/go.sh pkg: sed -i "s|@PREFIX@|${GOROOT_FINAL}|" /etc/profile.d/go.sh pkg: ln -rsf "${GOROOT_FINAL}"/bin/go "${PKG_TAPF}"/bin/ pkg: ln -rsf "${GOROOT_FINAL}"/bin/gofmt "${PKG_TAPF}"/bin/