[buildout]
extends =
  buildout.hash.cfg
  ../../component/git/buildout.cfg
  ../../component/matiec/buildout.cfg
  ../../component/open62541/buildout.cfg
  ../../component/numpy/buildout.cfg
  ../../component/lxml-python/buildout.cfg
  ../../component/python-sslpsk/buildout.cfg
  ../../component/defaults.cfg
  ../../stack/monitor/buildout.cfg
  ../../stack/slapos.cfg

parts =
  beremiz-source
  slapos-cookbook
  instance-profile
  python-interpreter
  matiec
  open62541

[python]
part = python2.7

[gcc]
# we want this SR to use a fixed gcc (so that we have the same gcc as open62541 component)
max_version = 0

[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}

# Beremiz need it to be in folder parts/open62541
# as Beremiz search for open62541 to BEREMIZ_PATH/../open62541
shared = false
post-install =
  mkdir -p @@LOCATION@@/build/bin
  ln -sf @@LOCATION@@/lib/libopen62541.a @@LOCATION@@/build/bin/libopen62541.a

[beremiz-source]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/beremiz/beremiz.git
revision = d0925aa2e32b0143fde5f51eb3ddd3bbb28975ba
git-executable = ${git:location}/bin/git

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

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

[python-interpreter]
recipe = zc.recipe.egg
interpreter = pythonwitheggs
eggs = click
       prompt_toolkit
       pygments
       bitarray
       future
       six
       Pyro
       zeroconf-py2compat
       pathlib
       Nevow
       msgpack
       autobahn
       ${numpy:egg}
       ${lxml-python:egg}
       cycler
       opcua
       ${beremiz:egg}
       ${Twisted:egg}
       ${python-sslpsk:egg}

[instance-profile]
recipe = slapos.recipe.template:jinja2
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
  section buildout  buildout
  raw template_monitor ${monitor2-template:output}
  key openssl_location openssl:location
  key gcc_location gcc:prefix

[versions]
Twisted = 20.3.0
attrs = 19.2.0
Automat = 0.3.0
zope.interface = 4.4.2
Nevow = 0.14.5
PyHamcrest = 2.0.2
Pyro = 3.16
bitarray = 2.1.3
constantly = 15.1.0
future = 0.18.2
hyperlink = 21.0.0
incremental = 21.3.0
pathlib = 1.0.1
zeroconf-py2compat = 0.19.10

# Required by:
# Automat==0.3.0
characteristic = 14.3.0

# Required by:
# zeroconf-py2compat==0.19.10
ifcfg = 0.21

# Required by:
# hyperlink==21.0.0
typing = 3.10.0.0

autobahn = 19.11.2
txaio = 18.8.1
idna = 2.10

click = 7.1.2
opcua = 0.98.13
trollius = 2.2.1
futures = 3.3.0
cycler = 0.10.0
sslpsk = 1.0.0
