# Dovecot
# https://doc.dovecot.org/

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

[dovecot]
recipe = slapos.recipe.cmmi
url = https://dovecot.org/releases/2.3/dovecot-2.3.20.tar.gz
md5sum = b8add62d0311dcc95ac25b379e8ba043
location = @@LOCATION@@
configure-options =
  --enable-maintainer-mode
  --prefix=${:location}
  --exec-prefix=${:location}
  --with-systemd=no
  --with-lua=yes
  --with-libcrypto=${openssl:location}
environment =
  PATH=${pkgconfig:location}/bin:%(PATH)s
  PKG_CONFIG_PATH=${lua:location}/lib/pkgconfig
  LUA_LIBS=-L${lua:location}/lib -Wl,-rpath=${lua:location}/lib -llua -lm
  LUA_CFLAGS=-I${lua:location}/include
  LDFLAGS=-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
make-targets = install
post-install = cp -r ${:location}/share/doc/dovecot/example-config/* ${:location}/etc/dovecot/
