[buildout]

extends =
  ../patch/buildout.cfg
  ../attr/buildout.cfg
  ../libcap/buildout.cfg

parts = lxc

[lxc]
<= lxc-0.8

[lxc-0.8.0-rc2-libexecdir-patch]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
filename = libexecdir-fix.patch
download-only = true
md5sum = d674463ccb3a7c205c2326fb4ab5436b

[lxc-0.8.0-rc2-lxc-ls-patch]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
filename = lxc-ls-fix.patch
download-only = true
md5sum = 28c155a554d4f4856351085494585c73

[lxc-0.8.0-rc2-cap_get_flag-patch]
recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/${:filename}
filename = cap_get_flag-fix.patch
download-only = true
md5sum = 8d3706a9bd60b6ebfea33998644b1a99

[lxc-0.8]
recipe = slapos.recipe.cmmi
url = http://lxc.sourceforge.net/download/lxc/lxc-0.8.0-rc2.tar.gz
md5sum = 9bd6988542fd7dd198d056ef3a2db9f6
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
  ${lxc-0.8.0-rc2-cap_get_flag-patch:location}/${lxc-0.8.0-rc2-cap_get_flag-patch:filename}
  ${lxc-0.8.0-rc2-libexecdir-patch:location}/${lxc-0.8.0-rc2-libexecdir-patch:filename}
  ${lxc-0.8.0-rc2-lxc-ls-patch:location}/${lxc-0.8.0-rc2-lxc-ls-patch:filename}
environment =
  PATH=%(PATH)s:${attr:location}/bin/:${libcap:location}/sbin/
  CFLAGS=-I${libcap:location}/usr/include
  LDFLAGS=-L${libcap:location}/lib/ -Wl,-rpath=${libcap:location}/lib/