[buildout] 
parts = 
  open62541
  osie-repository
#  compile-coupler

extends =   
  https://lab.nexedi.com/nexedi/slapos/raw/master/stack/slapos.cfg
  https://lab.nexedi.com/nexedi/slapos/raw/master/component/cmake/buildout.cfg
  https://lab.nexedi.com/nexedi/slapos/raw/master/component/git/buildout.cfg
  https://lab.nexedi.com/nexedi/slapos/raw/master/component/python3/buildout.cfg

# we need to have bootstrap Python for buildout in Python3 due to
# https://bugs.kde.org/show_bug.cgi?id=344802
[python]
part = python3

[open62541-source]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/open62541/open62541.git
branch = master
git-executable = ${git:location}/bin/git

[open62541]
recipe = slapos.recipe.cmmi
path = ${open62541-source:location}
configure-command =
  ${git:location}/bin/git submodule update --init --recursive
  ${cmake:location}/bin/cmake
configure-options =
  -DBUILD_SHARED_LIBS=OFF
  -DCMAKE_BUILD_TYPE=RelWithDebInfo
  -DCMAKE_INSTALL_PREFIX=@@LOCATION@@
  -DUA_ENABLE_PUBSUB=ON
  -DUA_ENABLE_PUBSUB_MONITORING=ON
  -DUA_NAMESPACE_ZERO=FULL
  -DUA_ENABLE_AMALGAMATION=ON

[osie-repository]
recipe  = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
# token must be removed if going public!!!
repository = https://gitlab+deploy-token-4:pLwtBu8TbusqZDKPUpZA@lab.nexedi.com/nexedi/osie.git
location = ${buildout:parts-directory}/osie

[compile-coupler]
recipe = slapos.recipe.cmmi
path = ${open62541:location}