########################################################
# Dropbear - a secure shell client and server for *nix #
#                                                      #
# http://matt.ucc.asn.au/dropbear/dropbear.html        #
########################################################

[buildout]
extends = 
  ../zlib/buildout.cfg

parts =
  dropbear

[dropbear-userspace-patch]
recipe = hexagonit.recipe.download
md5sum = 89f575b9a9586b04ef9073c9c3af13ae
url = ${:_profile_base_location_}/${:filename}
filename = userspace.patch
download-only = true

[dropbear-ipv6-patch]
recipe = hexagonit.recipe.download
md5sum = b30dd58d68829a80eee69188134382ef
url = ${:_profile_base_location_}/${:filename}
filename = ipv6-support.patch
download-only = true

[dropbear]
recipe = hexagonit.recipe.cmmi
md5sum = 0284ea239083f04c8b874e08e1aca243
# XXX: We still use an old version of dropbear instead of the last one
#      in order have all patches working.
url = http://matt.ucc.asn.au/dropbear/releases/dropbear-0.53.1.tar.bz2

configure-options =
  --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
  --with-zlib=${zlib:location}
  CFLAGS="-DENABLE_SINGLEUSER "

environment =
  CPPFLAGS =-I${zlib:location}/include
  LDFLAGS =-Wl,-rpath=${zlib:location}/lib -L${zlib:location}/lib

patches=
  ${dropbear-userspace-patch:location}/${dropbear-userspace-patch:filename}
  ${dropbear-ipv6-patch:location}/${dropbear-ipv6-patch:filename}

patch-options=
  -p1