software.cfg 2.37 KB
Newer Older
1 2
[buildout]
parts =
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
  open62541
  compile-coupler
  slapos-cookbook
  instance-profile

extends =
  ../../component/git/buildout.cfg
  ../../component/mbedtls/buildout.cfg
  ../../component/open62541/buildout.cfg
  ../../stack/monitor/buildout.cfg
  ../../stack/slapos.cfg

# we need open62541's sources even after compiling and linking in [open62541]
# section. Reasons is that coupler's C application depends on it.
[open62541-source]
recipe = slapos.recipe.build:download-unpacked
shared = true
url = ${open62541:url}
md5sum = ${open62541:md5sum}

[open62541]
configure-options =
  -DBUILD_SHARED_LIBS=ON
  -DCMAKE_BUILD_TYPE=Release
  -DCMAKE_INSTALL_PREFIX=@@LOCATION@@
  -DUA_ENABLE_PUBSUB=ON
  -DUA_ENABLE_PUBSUB_MONITORING=ON
  -DUA_ENABLE_PUBSUB_ETH_UADP=ON
  -DUA_NAMESPACE_ZERO=REDUCED
  -DUA_ENABLE_ENCRYPTION=MBEDTLS
  -DUA_ENABLE_ENCRYPTION_MBEDTLS=ON
  -DMBEDTLS_INCLUDE_DIRS=${mbedtls:location}/include
  -DMBEDTLS_LIBRARY=${mbedtls:location}/lib/libmbedtls.so
  -DMBEDX509_LIBRARY=${mbedtls:location}/lib/libmbedx509.so
  -DMBEDCRYPTO_LIBRARY=${mbedtls:location}/lib/libmbedcrypto.so
  -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON
  -DUA_ENABLE_PUBSUB_MQTT=ON
40 41
environment +=
  LDFLAGS=-L${mbedtls:location}/lib -Wl,-rpath=${mbedtls:location}/lib
42 43 44 45 46

[osie-repository]
recipe  = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/nexedi/osie.git
47
revision = 35228392c4f2eb24eee478cd98349e0f613a4ff2
48 49 50 51

[compile-coupler]
recipe = slapos.recipe.cmmi
path = ${osie-repository:location}/coupler/opc-ua-server/
52
bin_dir = ${:path}/bin/
53 54 55
environment =
  OPEN62541_HOME = ${open62541:location}
  OPEN62541_SOURCE_HOME = ${open62541-source:location}
56
  C_COMPILER_EXTRA_FLAGS = -L ${mbedtls:location}/lib -Wl,-rpath=${mbedtls:location}/lib -l:libopen62541.so -L${open62541:location}/lib -Wl,-rpath=${open62541:location}/lib -I${open62541:location}/include -I${open62541-source:location}/src/pubsub/ -I${open62541-source:location}/deps
57 58 59 60 61 62 63 64 65
configure-command = true

[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
mode = 0644
rendered = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
66
  section buildout buildout
67 68 69
  raw template_monitor ${monitor2-template:output}
  key open62541_location open62541:location
  key mbedtls_location mbedtls:location
70
  key coupler_location compile-coupler:bin_dir