[buildout]
extends =
  ../../software/erp5/software.cfg
  buildout.hash.cfg

parts +=
  vifib-fix-products-paths


# SlapOS Master needs to use Wendelin.core 2.
# Wendelin.core 2 works with either ZODB4-wc2, or ZODB5, but not with ZODB4.
# ERP5 does not currently work with ZODB5.
# -> this leaves ZODB4-wc2 as the only choice.
[ZODB]
major = 4-wc2

[erp5-defaults]
wcfs-enable-default = true

[local-bt5-repository]
# Same as bt5-repository, but only local repository.
# Used to generate bt5lists.
list = ${erp5:location}/bt5 ${erp5:location}/product/ERP5/bootstrap ${erp5-bin:location}/bt5 ${erp5-doc:location}/bt5 ${vifib:location}/master/bt5

[erp5_repository_list]
repository_id_list = erp5 erp5-bin erp5-doc vifib/master

[erp5]
branch = erp5-vifib

[vifib]
<= erp5
repository = https://lab.nexedi.com/nexedi/slapos.core.git
branch = master

[slapos-bin]
<= erp5
repository = https://lab.nexedi.com/nexedi/slapos-bin.git
branch = master

[vifib-fix-products-paths]
recipe = plone.recipe.command
stop-on-error = true
command =
  for DIR in "${vifib:location}/master"; do cd "$DIR"; rm -f Products ; ln -s product Products; touch product/__init__.py; done
update-command = ${:command}

[eggs]
eggs +=
  slapos.core
  
dummy +=
  ${vifib:location}
  ${slapos-bin:location}
  
extra-paths +=
  ${vifib:location}/master
  ${slapos-bin:location}


### Overwrite recipes to introduce customized changes
[download-base-part]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}

[template-erp5]
< = download-base-part
filename = instance-erp5.cfg.in

[template-balancer]
< = download-base-part
filename = instance-balancer.cfg.in

[template-apache-backend-conf]
url = ${:_profile_base_location_}/${:filename}

[template-haproxy-cfg]
url = ${:_profile_base_location_}/${:filename}

[versions]
python-memcached = 1.47
xml-marshaller = 1.0.2