[buildout]

extends =
  ../../stack/slapos.cfg
  ../../component/autoconf/buildout.cfg
  ../../component/cmake/buildout.cfg
  ../../component/flex/buildout.cfg
  ../../component/fonts/buildout.cfg
  ../../component/noVNC/buildout.cfg
  ../../component/nginx/buildout.cfg
  ../../component/lxml-python/buildout.cfg
  ../../component/numpy/openblas.cfg
  ../../component/matplotlib/buildout.cfg
  ../../component/wxpython/buildout.cfg
  ../../component/matiec/buildout.cfg
  ../../component/mesa/buildout.cfg
  ../../component/libvnc/buildout.cfg
  ../../component/open62541/buildout.cfg
  ../../component/sikuli/buildout.cfg
  ../../component/fluxbox/buildout.cfg
  ../../component/pygolang/buildout.cfg
  ../../component/xorg/buildout.cfg
  ../../component/pytest/buildout.cfg
  ../../component/opencv/buildout.cfg
  ../../component/xterm/buildout.cfg
  ../../stack/monitor/buildout.cfg
  ../../stack/nxdtest.cfg
  ./buildout.hash.cfg

parts +=
  slapos-cookbook
  beremiz-eggs
  open62541
  Modbus
  xterm
  instance

[gcc]
# Always build GCC for Fortran (see openblas).
max_version = 0

[python]
# Beremiz works with python2.7 for now, the code is not yet upgraded for python3
part = python2.7

[open62541]
# Beremiz need it to be in folder parts/open62541
# as Beremiz search for open62541 to BEREMIZ_PATH/../open62541
configure-options =
  -DBUILD_SHARED_LIBS=OFF
  -DCMAKE_BUILD_TYPE=Release
  -DCMAKE_INSTALL_PREFIX=@@LOCATION@@
  -DUA_ENABLE_PUBSUB=ON
  -DUA_ENABLE_SUBSCRIPTIONS=ON
  -DUA_NAMESPACE_ZERO=REDUCED
  -DUA_ENABLE_ENCRYPTION=OPENSSL
  -DOPENSSL_ROOT_DIR=${openssl:location}
shared = false
post-install =
  mkdir -p @@LOCATION@@/build/bin
  ln -sf @@LOCATION@@/lib/libopen62541.a @@LOCATION@@/build/bin/libopen62541.a

[twisted]
recipe  = zc.recipe.egg:custom
egg     =  twisted
setup-eggs =
    six
    pathlib
    incremental

[beremiz-eggs]
recipe = zc.recipe.egg
eggs =
  ${wxPython:egg}
  ${python-cryptography:egg}
  ${matplotlib:egg}
  future
  zeroconf2
  enum34
  pyro
  ${twisted:egg}
  nevow
  autobahn
  pycountry
  fonttools
  ${beremiz-setup:egg}
  opcua
  msgpack

[python-interpreter]
eggs +=
  ${beremiz-eggs:eggs}

[beremiz]
recipe = slapos.recipe.build:download-unpacked
# download beremiz at revision caee3ad3b7bb2865c77328de5ffdaeec61dbf49f
url = https://github.com/beremiz/beremiz/archive/caee3ad3b7bb2865c77328de5ffdaeec61dbf49f.tar.gz
md5sum = 52f9407e1706cdecf01fabfc61090276

[beremiz-setup]
recipe  = zc.recipe.egg:develop
egg = beremiz
setup = ${beremiz:location}

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

[instance]
recipe = slapos.recipe.template:jinja2
output = ${buildout:directory}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
python-bin = ${buildout:bin-directory}/${python-interpreter:interpreter}
type = beremiz
context =
    key autoconf_location  autoconf:location
    key automake_location  automake:location
    key cmake_location cmake:location
    key bash_location bash:location
    key beremiz_location beremiz-setup:setup
    key bin_directory buildout:bin-directory
    key buildout_egg_directory buildout:eggs-directory
    key buildout_develop_directory buildout:develop-eggs-directory
    key buildout_directory buildout:directory
    key template_fluxbox_menu template-fluxbox-menu.in:target
    key template_fonts_conf_target template-fonts-conf:output
    key template_monitor_cfg monitor2-template:output
    key template_instance_beremiz template-instance-beremiz:target
    key template_instance_beremiz_test template-instance-beremiz-test:target
    key template_logrotate template-logrotate-base:output
    key template_nginx template-nginx_conf.in:target
    key fontconfig_location fontconfig:location
    key font_dejavu dejavu-fonts:location
    key font_liberation liberation-fonts:location
    key logrotate_cfg template-logrotate-base:output
    key bison_location bison:location
    key flex_location flex:location
    key fluxbox_location fluxbox:location
    key gcc_location gcc:prefix
    key git_location git:location
    key gtk3_location gtk-3:location
    key instance_template_type :type
    key matiec_location matiec:location
    key mesa_location mesa:location
    key nginx_executable nginx-output:nginx
    key nginx_mime nginx-output:mime
    key novnc_location noVNC:location
    key nxdtest_template nxdtest-instance.cfg:output
    key python_bin :python-bin
    key opencv_location opencv:location
    key openssl_location openssl:location
    key sikulix_bin sikuli:output
    key xdotool_location xdotool:location
    key xserver_location xserver:location
    key xterm_location xterm:location
    key x11vnc_location x11vnc:location
    key wmctrl_location wmctrl:location

[template-instance-beremiz]
<= download-template
output = ${buildout:directory}/instance-beremiz.cfg.jinja2

[template-instance-beremiz-test]
<= download-template
output = ${buildout:directory}/instance-beremiz-test.cfg.jinja2

[template-fluxbox-menu.in]
<= download-template
output = ${buildout:directory}/fluxbox-menu.in

[template-nginx_conf.in]
<= download-template
output = ${buildout:directory}/nginx_conf.in

[versions]
Pillow = 6.2.2
matplotlib = 2.2.5
kiwisolver = 1.1.0
cycler = 0.10.0
Pyro = 3.16
zeroconf2 = 0.19.2
cython = 0.29.24
sphinx = 1.8.5
doc2dash = 2.3.0
Twisted = 20.3.0
autobahn = 19.11.2
attrs = 19.2.0
Automat = 0.3.0
zope.interface = 4.4.2
Nevow = 0.14.5
PyHamcrest = 2.0.3
constantly = 15.1.0
hyperlink = 21.0.0
incremental = 21.3.0
future = 0.18.2
pycountry = 18.12.8
fonttools = 3.44.0
idna = 2.10
PyHamcrest = 2.0.2
txaio = 18.8.1
characteristic = 14.3.0
typing = 3.10.0.0
ifcfg = 0.22
opcua = 0.98.13
futures = 3.3.0
trollius = 2.2.1
pathlib = 1.0.1
ddt = 1.4.4
