[buildout]
parts =
  nftables

extends =
  ../defaults.cfg
  ../gmp/buildout.cfg


[libnml]
recipe = slapos.recipe.cmmi
url = http://www.netfilter.org/projects/libmnl/files/libmnl-1.0.4.tar.bz2
md5sum = be9b4b5328c6da1bda565ac5dffadb2d

[libnftnl]
recipe = slapos.recipe.cmmi
url = http://www.netfilter.org/projects/libnftnl/files/libnftnl-1.1.9.tar.bz2
md5sum = e03cefd53f4b076d959abe36de5c38f8
environment =
  PKG_CONFIG_PATH=${libnml:location}/lib/pkgconfig
  PATH=${pkgconfig:location}/bin:%(PATH)s

[jansson]
recipe = slapos.recipe.cmmi
url = https://digip.org/jansson/releases/jansson-2.13.1.tar.gz
md5sum = 570af45b8203e95876d71fecd56cee20

[iptables]
recipe = slapos.recipe.cmmi
url = http://www.netfilter.org/projects/iptables/files/iptables-1.8.7.tar.bz2
md5sum = 602ba7e937c72fbb7b1c2b71c3b0004b
location = @@LOCATION@@
environment =
  PKG_CONFIG_PATH=${libnml:location}/lib/pkgconfig:${libnftnl:location}/lib/pkgconfig
  PATH=${pkgconfig:location}/bin:%(PATH)s
  LDFLAGS=-Wl,-rpath=${:location}/lib

[nftables]
recipe = slapos.recipe.cmmi
url = http://www.netfilter.org/projects/nftables/files/nftables-0.9.8.tar.bz2
md5sum = 77bf0bd43e65e92212fc73139a2e47fc
python-egg = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/python${python:version}/site-packages
environment =
  PKG_CONFIG_PATH=${libnml:location}/lib/pkgconfig:${libnftnl:location}/lib/pkgconfig
  PATH=${pkgconfig:location}/bin:%(PATH)s
  LDFLAGS = -L${gmp:location}/lib -L${jansson:location}/lib
  CFLAGS = -I${gmp:location}/include -I${jansson:location}/include
configure-options =
  --enable-python
  --with-json
  --without-cli
  --with-python-bin=${buildout:executable}

