[buildout]

extends =
  ../../component/dash/buildout.cfg
  ../../component/dcron/buildout.cfg
  ../../component/gzip/buildout.cfg
  ../../component/openssl/buildout.cfg
  ../../component/logrotate/buildout.cfg
  ../../component/apache/buildout.cfg
  ../../component/pycurl/buildout.cfg
  ../../component/python-cryptography/buildout.cfg
  ../../stack/slapos.cfg

# Monitoring stack (keep on bottom)
  ../../stack/monitor/buildout.cfg

parts +=
  slapos-cookbook
  eggs
  dash
  template

[eggs]
recipe = zc.recipe.egg
eggs =
  ${lxml-python:egg}
  ${pycurl:egg}
  ${python-cryptography:egg}
  slapos.toolbox
scripts =
  slapos-kill
  monitor.bootstrap
  monitor.collect
  monitor.genstatus
  monitor.configwrite
  is-process-older-than-dependency-set

[extra-eggs]
recipe = zc.recipe.egg
interpreter = pythonwitheggs
eggs =
  ${lxml-python:egg}
  ${python-cffi:egg}
  ${python-cryptography:egg}
  pyOpenSSL
  re6stnet

[download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
mode = 644

[template-jinja2-base]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${buildout:directory}/${:filename}
# XXX: extra-context is needed because we cannot append to a key of an extended
# section.
extra-context =
context =
    key bin_directory buildout:bin-directory
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    ${:extra-context}


[template]
< = template-jinja2-base
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 610fc6fd0444d3bab3fca4478572749a
extra-context =
    key apache_location apache:location
    key dash_location dash:location
    key logrotate_location logrotate:location
    key openssl_location openssl:location
    key template_apache_conf template-apache-conf:target
    key template_re6stnet template-re6stnet:target
    key template_re6st_registry_conf template-re6st-registry-conf:target
    key template_logrotate_base template-logrotate-base:rendered
    key template_wrapper template-wrapper:target
    key template_registry_run template-registry-run:target
    key monitor2_template_rendered monitor2-template:rendered
    raw python_with_eggs ${buildout:directory}/bin/${extra-eggs:interpreter}

[template-re6stnet]
< = download-base
filename = instance-re6stnet.cfg.in
md5sum = 09683c66c16361b77867d8f2e1140a35

[template-apache-conf]
< = download-base
filename = apache.conf.in
md5sum = d64cafda1139b740a49a9f5e30a1b57b

[template-re6st-registry-conf]
< = download-base
filename = re6st-registry.conf.in
md5sum = b0f0facfea82a4481f4fb5b0b263e09a

[template-wrapper]
< = download-base
filename = wrapper.in
md5sum = 69e63cb58267335e21da772bd867657e

[template-registry-run]
< = download-base
filename = registry-run.in
md5sum = 0bf4f2c03e06b55c6c6cc55fa33e65d6

[versions]
re6stnet = 0.533
slapos.recipe.template = 4.3

# Required by:
# re6stnet==0.533
miniupnpc = 1.9

