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

parts =
  stunnel

[stunnel]
<= stunnel-4
recipe = slapos.recipe.cmmi

[stunnel-4-hook-download]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
md5sum = 5b099b386c34c5b8d0664c0292ba322a
download-only=true
filename = stunnel-4-hooks.py

[stunnel-4]
recipe = slapos.recipe.cmmi
url = https://www.stunnel.org/downloads/stunnel-4.56.tar.gz
md5sum = ac4c4a30bd7a55b6687cbd62d864054c
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options =
  --enable-ipv6
  --disable-libwrap
  --disable-fips
  --with-ssl=${openssl:location}
environment =
  CPPFLAGS=-I${zlib:location}/include
  LDFLAGS=-Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib

[stunnel:cygwin]
url = http://cygwin.mirrorcatalogs.com/release/stunnel/stunnel-4.56-1-src.tar.bz2
md5sum = 056323d58b84db350087485b5c8dc301
configure-command = cygport
configure-options =
  stunnel.cygport
  download
  prep
  compile
  install
make-binary = true