aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/courier-imap/Makefile23
-rw-r--r--mail/courier-imap/pkg-plist2
2 files changed, 23 insertions, 2 deletions
diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile
index 70b75f5ba198..fdbf8beb07b7 100644
--- a/mail/courier-imap/Makefile
+++ b/mail/courier-imap/Makefile
@@ -25,6 +25,8 @@ USE_GMAKE= YES
# WITH_VPOPMAIL: Build in vpopmail support
# WITH_MYSQL: Build in mysql support
# WITH_POSTGRESQL: Build in postgresql support
+# WITH_LDAP: Build in ldap support with openldap 2.x
+# WITH_LDAP1: Build in ldap support with openldap 1.x
#
.if !defined(WITHOUT_OPENSSL)
@@ -34,8 +36,7 @@ PLIST_SUB= OPENSSLFLAG=
PLIST_SUB= OPENSSLFLAG="@comment "
.endif
-CONFIGURE_ARGS= --without-authldap --with-authldaprc=filename \
- --without-authshadow \
+CONFIGURE_ARGS= --without-authshadow \
--without-authcram \
--sysconfdir=${PREFIX}/etc/courier-imap \
--with-userdb=${PREFIX}/etc/userdb \
@@ -54,6 +55,24 @@ CONFIGURE_ARGS+= \
BUILD_DEPENDS+= ${VPOPMAILDIR}/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail
.endif
+.if !defined(WITH_LDAP) && !defined(WITH_LDAP1)
+CONFIGURE_ARGS+= \
+ --without-authldap
+PLIST_SUB+= LDAPFLAG="@comment "
+.else
+CONFIGURE_ARGS+= \
+ --with-authldap
+PLIST_SUB+= LDAPFLAG=""
+
+.if defined(WITH_LDAP)
+LIB_DEPENDS= ldap.2:${PORTSDIR}/net/openldap2 \
+ lber.2:${PORTSDIR}/net/openldap2
+.else
+LIB_DEPENDS= ldap.1:${PORTSDIR}/net/openldap \
+ lber.1:${PORTSDIR}/net/openldap
+.endif
+.endif
+
.if !defined(WITH_MYSQL)
CONFIGURE_ARGS+= \
--without-authmysql
diff --git a/mail/courier-imap/pkg-plist b/mail/courier-imap/pkg-plist
index 53cbf4e9229b..622e0d8fb339 100644
--- a/mail/courier-imap/pkg-plist
+++ b/mail/courier-imap/pkg-plist
@@ -5,6 +5,7 @@ bin/pop3d
etc/courier-imap/authdaemonrc.dist
%%MYSQLFLAG%%etc/courier-imap/authmysqlrc.dist
%%PGSQLFLAG%%etc/courier-imap/authpgsqlrc.dist
+%%LDAPFLAG%%etc/courier-imap/authldaprc.dist
etc/courier-imap/imapd-ssl.dist
etc/courier-imap/imapd.cnf.dist
etc/courier-imap/imapd.dist
@@ -18,6 +19,7 @@ libexec/courier-imap/authlib/authdaemon
libexec/courier-imap/authlib/authdaemond
%%MYSQLFLAG%%libexec/courier-imap/authlib/authdaemond.mysql
%%PGSQLFLAG%%libexec/courier-imap/authlib/authdaemond.pgsql
+%%LDAPFLAG%%libexec/courier-imap/authlib/authdaemond.ldap
libexec/courier-imap/authlib/authdaemond.plain
libexec/courier-imap/couriertcpd
libexec/courier-imap/deliverquota