# Go language - https://golang.org/
[buildout]
extends =
  ../findutils/buildout.cfg

parts = golang

[golang]
<= golang19


[golang-common]
recipe = slapos.recipe.cmmi
configure-command = :
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-binary =
make-targets= cd src && ./all.bash && cp -alf .. ${:location}
# some testdata files have an issue with slapos.extension.strip.
post-install = ${findutils:location}/bin/find ${:location}/src -type d -name testdata -exec rm -rf {} \; || true
environment =
  GOROOT_FINAL=${:location}
  ${:environment-extra}


[golang14]
<= golang-common
url = https://storage.googleapis.com/golang/go1.4-bootstrap-20170531.tar.gz
md5sum = d2cc61cb9f829b3510ee39c0c5568014
environment-extra =


[golang18]
<= golang-common
url = https://storage.googleapis.com/golang/go1.8.3.src.tar.gz
md5sum = 64e9380e07bba907e26a00cf5fcbe77e

# go1.8 needs go1.4 to bootstrap
environment-extra =
  GOROOT_BOOTSTRAP=${golang14:location}

[golang19]
<= golang-common
url = https://storage.googleapis.com/golang/go1.9.1.src.tar.gz
md5sum = 27bce1ffb05f4f6bd90d90081e5d4169

# go1.9 needs go1.4 to bootstrap
environment-extra =
  GOROOT_BOOTSTRAP=${golang14:location}
