[buildout]

extends = 
  ../patchelf/buildout.cfg
  ../zlib/buildout.cfg

parts = 
  java-jdk


[java-jdk]
recipe = slapos.recipe.build
update =
  from zc.buildout import UserError
  raise UserError("unsupported platform")


[java-jdk:linux and platform.machine() == 'x86_64']
recipe = slapos.recipe.cmmi
shared = true
url = https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz
md5sum = f5da6f4dec81bdd2a096184ec1d69216
configure-command = :
make-binary = :
post-install =
  mv * %(location)s
  for file in %(location)s/bin/* ; do
    echo appending rpath to $file
    ${patchelf:location}/bin/patchelf --set-rpath %(rpath)s $file
  done
rpath = ${zlib:location}/lib:@@LOCATION@@/lib