# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
checksums rmd160 29039eab60b395b6112c1f4320c33932ca17389c \
sha256 f66ceda3e5aa853e13f417302dfb83b312709e95f1bbcdafcd6214d76a94e79a
license {GPL-3 OpenSSLException}
long_description This package contains the standalone Courier IMAP server, \
which is used to provide IMAP access to local mailboxes. \
Courier-IMAP is provided here as a separate package that \
can be used with other mail servers as well.
homepage http://www.courier-mta.org/imap/
master_sites sourceforge:project/courier/imap/${version} freebsd
depends_lib port:courier-authlib path:lib/libssl.dylib:openssl port:db48
set authdaemondir ${prefix}/var/run/authdaemon.courier-imap
configure.args --bindir=${prefix}/bin \
--mandir=${prefix}/share/man \
--sysconfdir=${prefix}/etc/${name} \
--datadir=${prefix}/share/${name} \
--localstatedir=${prefix}/var/run \
--with-piddir=${prefix}/var/run \
--with-authdaemonvar=${authdaemondir} \
--enable-unicode --disable-root-check
configure.cflags "-I${prefix}/include/db48 -I${prefix}/include"
configure.cppflags "-I${prefix}/include/db48 -I${prefix}/include"
configure.ldflags "-L${prefix}/lib/db48 -L${prefix}/lib"
destroot.target install install-configure
xinstall -m 755 -d ${destroot}${authdaemondir}
destroot.keepdirs ${destroot}${authdaemondir}
". ${prefix}/etc/courier-imap/imapd\n. ${prefix}/etc/courier-imap/imapd-ssl\n"
startupitem.start "${prefix}/libexec/imapd-ssl.rc start"
startupitem.stop "${prefix}/libexec/imapd-ssl.rc stop"
# Limit the length of the minor and patch version components to avoid picking
# up development versions (that contain a YYYYMMDD timestamp).
livecheck.regex "[quotemeta ${name}]-(\\d+(\\.\\d{1,7})*)[quotemeta ${extract.suffix}]"