[buildout]
versions = versions

parts =
  template
  apache-php
  mariadb
  eggs
  instance-recipe-egg
  downloadcache-workaround
  
extends =
  ../../stack/lamp.cfg

[application]
recipe = slapos.recipe.build:download-unpacked
url = http://www.silverstripe.org/assets/downloads/SilverStripe-v2.4.6.tar.gz
md5sum = 6490d9fe5b72911ba5bda314cfc2d9dc
  
[instance-recipe]
egg = slapos.cookbook
module = lamp.simple

[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
#md5sum = Student shall put md5 of instance.cfg here
output = ${buildout:directory}/template.cfg
mode = 0644

[instance-recipe-egg]
recipe = zc.recipe.egg
python = ${buildout:python}
eggs = 
    ${mysql-python:egg}
    ${instance-recipe:egg}
    slapos.toolbox[lampconfigure]

[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.5.3-dev-SlapOS-010
slapos.cookbook = 0.32

[downloadcache-workaround]
# workaround irritating problem of hexagonit.recipe.cmmi which automatically
# creates download cache, which in turn switches builout to "semi-offline" mode
recipe = plone.recipe.command
# in hexagonit.recipe.cmmi if there is no ${buildout:download-cache} set it resolves
# to ${buildout:directory}/downloads but this variable is available late, that's
# why it is hardcoded only for required case
download-cache = ${buildout:directory}/downloads
command = [ -d ${:download-cache} ] && rm -fr ${:download-cache}/* || exit 0
update-command = ${:command}
stop-on-error = True