# Postfix
# http://www.postfix.org/

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

parts = postfix

[noroot.patch]
recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename}
filename = ${:_buildout_section_name_}
download-only = true
md5sum = b27031282a7c1cfc2c43a721c2b8802f

[skip-libdb-check.patch]
recipe = hexagonit.recipe.download
url =${:_profile_base_location_}/${:filename}
filename = ${:_buildout_section_name_}
download-only = true
md5sum = 55751726c33d75ab31827bf5e4f4be5d

[postfix]
recipe = slapos.recipe.cmmi
url = ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.10.0.tar.gz
md5sum = b2a563b2d5c53462952886e6fc4e4b7b
location = ${buildout:parts-directory}/${:_buildout_section_name_}
patch-options = -p1
patches =
  ${noroot.patch:location}/${noroot.patch:filename}
  ${skip-libdb-check.patch:location}/${skip-libdb-check.patch:filename}
configure-command = make
configure-options = makefiles CCARGS='-DUSE_TLS -DHAS_PCRE -DHAS_DB -I${libdb:location}/include -I${pcre:location}/include -I${openssl:location}/include' AUXLIBS='-L${openssl:location}/lib -L${pcre:location}/lib -L${libdb:location}/lib -lssl -lpcre -ldb -lcrypto -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${libdb:location}/lib'
make-targets = non-interactive-package install_root=${:location}