[buildout]
extends =
  buildout.hash.cfg
  ../../stack/slapos.cfg
  ../../component/cmake/buildout.cfg
  ../../component/bison/buildout.cfg
  ../../component/flex/buildout.cfg

parts =
  slapos-cookbook
  fluent-bit
  instance-profile

[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg
context =
  section buildout buildout
  key fluentbit_source_location fluent-bit:location

[fluent-bit]
recipe = slapos.recipe.cmmi
url = https://github.com/fluent/fluent-bit/archive/refs/tags/v1.9.7.tar.gz
environment =
  PATH=${bison:location}/bin:${flex:location}/bin:${fluent-bit:location}:%(PATH)s
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command =
  cd build && ${cmake:location}/bin/cmake .. -DFLB_CONFIG_YAML=Off .
make-targets =
make-binary =
  cd build && make
