[buildout]
extends =
  ../xz-utils/buildout.cfg
parts =
  coreutils-output

[coreutils]
recipe = slapos.recipe.cmmi
url = http://ftp.gnu.org/gnu/coreutils/coreutils-8.21.tar.xz
md5sum = 065ba41828644eca5dd8163446de5d64
configure-options =
  --prefix=${buildout:parts-directory}/${:_buildout_section_name_} --enable-install-program=tr,basename,uname,cat,cp,ls
environment =
  PATH=${xz-utils:location}/bin:%(PATH)s
  LDFLAGS =-Wl,--as-needed

[coreutils-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${:test} -x ${:test} -a -x ${:cat} -a -x ${:rm} -a -x ${:echo} -a -x ${:date} -a -x ${:md5sum} -a -x ${:basename} -a -x ${:sort} -a -x ${:tail}
test = ${coreutils:location}/bin/test
cat = ${coreutils:location}/bin/cat
rm = ${coreutils:location}/bin/rm
echo = ${coreutils:location}/bin/echo
date = ${coreutils:location}/bin/date
md5sum = ${coreutils:location}/bin/md5sum
basename = ${coreutils:location}/bin/basename
sort = ${coreutils:location}/bin/sort
tail = ${coreutils:location}/bin/tail