[buildout]

extends =
  ../bzip2/buildout.cfg
  ../cmake/buildout.cfg
  ../zlib/buildout.cfg

parts = libzip

[libzip]
recipe = slapos.recipe.cmmi
url = https://libzip.org/download/libzip-1.5.2.tar.xz
md5sum = f9dd38d273bcdec5d3d1498fe6684f42
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = 
  mkdir build && cd build && \
  ${cmake:location}/bin/cmake \
    -DCMAKE_INSTALL_PREFIX=${:location} \
    -DCMAKE_INCLUDE_PATH=${zlib:location}/include:${bzip2:location}/include \
    -DCMAKE_LIBRARY_PATH=${zlib:location}/lib:${bzip2:location}/lib \
    ..
make-binary =
  cd build && make
environment =
  PATH=${cmake:location}/bin:%(PATH)s
  CMAKE_INCLUDE_PATH=${zlib:location}/include:${bzip2:location}/include
  CMAKE_LIBRARY_PATH=${zlib:location}/lib:${bzip2:location}/lib