[buildout]
extends =
  ../../stack/cloudooo.cfg
  ../../stack/logrotate/buildout.cfg
parts =
  ${cloudooo-buildout:parts}

[cloudooo-buildout]
parts =
  ${stack-cloudooo-buildout:parts}
# Local development
  cloudooo-develop
  slapos-cookbook-develop
  slapos-cookbook

[slap-parameters]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}

[template-cloudooo]
< = template-cloudooo-base
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 4543e62c41726ef074454252c4951ac8
mode = 640

[template-cloudooo-base]
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key template_cloudooo_instance template-cloudooo-instance:target
    section dynamic_template_cloudooo_instance_parameter_dict dynamic-template-cloudooo-instance-parameter-dict
    section cloudooo_parameter_dict cloudooo-software-parameter-dict

[dynamic-template-cloudooo-instance-parameter-dict]
apache = ${apache:location}
buildout-bin-directory = ${buildout:bin-directory}
cairo = ${cairo:location}
coreutils = ${coreutils:location}
cups = ${cups:location}
dash = ${dash:location}
dbus = ${dbus:location}
dbus-glib = ${dbus-glib:location}
file = ${file:location}
fontconfig = ${fontconfig:location}
fonts = ${fonts:location}
freetype = ${freetype:location}
glib = ${glib:location}
glu = ${glu:location}
haproxy = ${haproxy:location}
imagemagick = ${imagemagick:location}
libICE = ${libICE:location}
libSM = ${libSM:location}
libX11 = ${libX11:location}
libXau = ${libXau:location}
libXdmcp = ${libXdmcp:location}
libXext = ${libXext:location}
libXrender = ${libXrender:location}
libexpat = ${libexpat:location}
libffi = ${libffi:location}
libpng12 = ${libpng12:location}
libreoffice-bin = ${libreoffice-bin:location}
libxcb = ${libxcb:location}
mesa = ${mesa:location}
openssl = ${openssl:location}
onlyoffice-x2t = ${onlyoffice-x2t:location}
poppler = ${poppler:location}
pixman = ${pixman:location}
wkhtmltopdf = ${wkhtmltopdf:location}
xdamage = ${xdamage:location}
xfixes = ${xfixes:location}
xserver = ${xserver:location}
zlib = ${zlib:location}
template-apache-conf = ${template-apache-backend-conf:target}
template-logrotate-base = ${template-logrotate-base:rendered}

[template-cloudooo-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudooo.cfg.in
md5sum = 3de0b4732e5132448027c1387a4de3c9
mode = 640