[buildout]
extensions =
  buildout-versions
  
extends =
  ../../component/dcron/buildout.cfg
  ../../component/git/buildout.cfg
  ../../component/gnutls/buildout.cfg
  ../../component/libpng/buildout.cfg
  ../../component/libuuid/buildout.cfg
  ../../component/lxml-python/buildout.cfg
  ../../component/noVNC/buildout.cfg
  ../../component/openssl/buildout.cfg
  ../../component/python-2.7/buildout.cfg
  ../../component/rdiff-backup/buildout.cfg
  ../../stack/shacache-client.cfg

develop =
  ${:parts-directory}/websockify

parts =
  template
  kvm
  eggs
  check-local-eggs

find-links +=
  http://www.nexedi.org/static/packages/source/slapos.buildout/

versions = versions

# Use only quite well working sites.
allow-hosts =
  *.nexedi.org
  *.python.org
  *.sourceforge.net
  alastairs-place.net
  dist.repoze.org
  effbot.org
  github.com
  peak.telecommunity.com
  psutil.googlecode.com
  www.dabeaz.com
  www.owlfish.com

#XXX-Cedric : Currently, one can only access to KVM using noVNC.
#             Ideally one should be able to access KVM by using either NoVNC or VNC.
#             Problem is : no native crypto support in web browsers. So we have to disable ssl
#             In qemu builtin vnc server, and make it available only for localhost 
#             so that only novnc can listen to it.

#XXX-Cedric: Check status of https://github.com/kanaka/noVNC/issues/13 to see
#            When qemu has builtin support for websockets in vnc server to get rid of 
#            Websockify (socket <-> websocket proxy server) when it is ready.
#            May solve previous XXX depending on the implementation.

#XXX-Cedric: Check status of 
#            https://www.tiolive.com/nexedi/bug_module/20110819-11F4F70 for
#            Chrome >= 14 and Firefox >=7 can access to noVNC. (should be solved)

#XXX-Cedric : add list of keyboard layouts (azerty/us querty/...) parameter to qemu

[kvm]
recipe = hexagonit.recipe.cmmi
url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.15.1/qemu-kvm-0.15.1.tar.gz
md5sum = 8800a7d6b3aa4a168ea7f78dc66c0320
configure-options =
  --disable-sdl
  --disable-xen
  --enable-vnc-tls
  --disable-vnc-sasl
  --disable-curses
  --disable-curl
  --enable-kvm
  --disable-docs
  --enable-vnc-png
  --disable-vnc-jpeg
  --extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${zlib:location}/include -I${libpng:location}/include"
  --extra-ldflags="-Wl,-rpath -Wl,${glib:location}/lib -L${glib:location}/lib -Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -L${gettext:location}/lib -Wl,-rpath -Wl,${gettext:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls"
  --disable-werror
environment =
  PATH=${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${gnutls:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig

[websockify]
# XXX-Cedric : use official egg from pypi when it is released
recipe = plone.recipe.command
stop-on-error = true
commit = e7363f43443deb9982bdb5c3db50eec475584b06
repository = https://github.com/desaintmartin/websockify.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
git-binary = ${git:location}/bin/git
command = export GIT_SSL_NO_VERIFY=true; (${:git-binary} clone --quiet ${:repository} ${:location} && cd ${:location} && ${:git-binary} reset --hard ${:commit}) || (rm -fr ${:location}; exit 1)
update-command =

[check-local-eggs]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/websockify.egg-link
depends = ${eggs:dummy}

[eggs]
python = python2.7
recipe = z3c.recipe.scripts
dummy =
  ${websockify:location}
eggs =
  ${lxml-python:egg}
  slapos.cookbook
  websockify
  
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 298b146e4efce41bfd58b3f85d064ff1
output = ${buildout:directory}/template.cfg
mode = 0644

[versions]
zc.buildout = 1.5.3-dev-SlapOS-010

slapos.cookbook = 0.37
Jinja2 = 2.6
Werkzeug = 0.8.1
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3.2
meld3 = 0.6.7
plone.recipe.command = 1.1
slapos.recipe.template = 2.2
z3c.recipe.scripts = 1.0.1

# Required by:
# slapos.core==0.20
Flask = 0.8

# Required by:
# slapos.cookbook==0.37
PyXML = 0.8.4

# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0

# Required by:
# slapos.cookbook==0.37
netaddr = 0.7.6

# Required by:
# slapos.core==0.20
netifaces = 0.6

# Required by:
# websockify==0.1-dev
numpy = 1.6.1

# Required by:
# slapos.cookbook==0.37
# slapos.core==0.20
# zc.buildout==1.5.3-dev-SlapOS-010
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846

# Required by:
# slapos.cookbook==0.37
slapos.core = 0.20

# Required by:
# slapos.core==0.20
supervisor = 3.0a10

# Required by:
# slapos.cookbook==0.37
xml-marshaller = 0.9.7

# Required by:
# slapos.cookbook==0.37
zc.recipe.egg = 1.3.2

# Required by:
# slapos.core==0.20
zope.interface = 3.8.0