[buildout]
extends =
  ../cmake/buildout.cfg
  ../git/buildout.cfg
  ../openssl/buildout.cfg
  ../icu/buildout.cfg
  ../boost-lib/buildout.cfg
  ../gperftools/buildout.cfg
  ../zlib/buildout.cfg


[boost-lib]
<= boost-lib-1.53

[erp5_login_worker]
# TODO: a profile / egg for this ?
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/erp5_login_worker.py
output = ${buildout:bin-directory}/erp5_login_worker.py
#md5sum = 
mode = 0755

[palo_olap-repository.git]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.cn/jerome/palo_olap.git
branch = 5.1
git-executable = ${git:location}/bin/git

[palo_olap]
recipe = slapos.recipe.cmmi
path = ${palo_olap-repository.git:location}
configure-command = ${cmake:location}/bin/cmake
configure-options =
  -DCMAKE_INSTALL_PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
  -DLIB_ICU_ROOT_DIR=${icu:location}
  -DLIB_OPENSSL_ROOT_DIR=${openssl:location}
  -DLIB_BOOST_ROOT_DIR=${boost-lib:location}
  -DLIB_PERFTOOLS_ROOT_DIR=${gperftools:location}
environment =
  CMAKE_PROGRAM_PATH=${cmake:location}/bin
  CMAKE_INCLUDE_PATH=${openssl:location}/include:${boost-lib:location}/include:${gperftools:location}/include:${icu:location}/include:${zlib:location}/include
  CMAKE_LIBRARY_PATH=${openssl:location}/lib:${boost-lib:location}/lib:${gperftools:location}/lib:${icu:location}/lib:${zlib:location}/lib
  LDFLAGS=-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${boost-lib:location}/lib -Wl,-rpath=${boost-lib:location}/lib -L${gperftools:location}/lib -Wl,-rpath=${gperftools:location}/lib -L${icu:location}/lib -Wl,-rpath=${icu:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
