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

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

parts = postfix

[postfix]
recipe = slapos.recipe.cmmi
url = http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-2.10.0.tar.gz
#md5sum = b3922ededd3fd6051f759e58a4ada3ae
location = ${buildout:parts-directory}/${:_buildout_section_name_}
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}
patch-options = -p1
patches =
  ${initgroups.patch:location}/${initgroups.patch:filename}
  ${session.patch:location}/${session.patch:filename}
  ${noroot.patch:location}/${noroot.patch:filename}
  ${libdb.patch:location}/${libdb.patch:filename}

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

[session.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = session.patch
download-only = true
md5sum = 41af4ac75d9bafc85385f0688727bf45

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

[libdb.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = libdb.patch
download-only = true
#md5sum = 9ecec894597f35a38bdaded881af561b