2002-09-01 16:17:07 +02:00
|
|
|
# New ports collection makefile for: dovecot
|
|
|
|
# Date created: 12/08/2002
|
2003-06-27 06:32:51 +02:00
|
|
|
# Whom: Dominic Marks <dominic.marks@btinternet.com>
|
2002-09-01 16:17:07 +02:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= dovecot
|
2009-08-14 23:30:42 +02:00
|
|
|
PORTVERSION= 1.2.3
|
2002-09-01 16:17:07 +02:00
|
|
|
CATEGORIES= mail ipv6
|
2009-08-19 03:28:50 +02:00
|
|
|
MASTER_SITES= http://www.dovecot.org/releases/${DOVECOTVERSION}/ \
|
|
|
|
http://www.rename-it.nl/dovecot/${DOVECOTVERSION}/
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2008-11-16 05:51:41 +01:00
|
|
|
MAINTAINER= yds@CoolRat.org
|
2003-03-31 11:18:00 +02:00
|
|
|
COMMENT= Secure and compact IMAP and POP3 servers
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2009-08-19 03:28:50 +02:00
|
|
|
DOVECOTVERSION= 1.2
|
|
|
|
|
2009-07-03 16:29:55 +02:00
|
|
|
######################################################################
|
|
|
|
# Anytime PORTVERSION changes please bump PORTREVISION of #
|
|
|
|
# mail/dovecot-antispam. Please see ports/135311 for an explanation. #
|
|
|
|
######################################################################
|
2009-08-19 03:28:50 +02:00
|
|
|
|
2004-03-30 21:20:22 +02:00
|
|
|
USE_ICONV= yes
|
2006-02-12 21:12:06 +01:00
|
|
|
USE_RC_SUBR= dovecot.sh
|
2004-05-29 23:57:54 +02:00
|
|
|
|
2002-09-01 16:17:07 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2008-09-08 08:42:28 +02:00
|
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
2008-11-28 15:38:26 +01:00
|
|
|
CONFIGURE_ARGS= --localstatedir=/var \
|
|
|
|
--with-statedir=/var/db/dovecot \
|
|
|
|
--without-shadow
|
2003-11-16 15:48:57 +01:00
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
|
|
|
LDFLAGS="-L${LOCALBASE}/lib"
|
2006-08-19 16:43:12 +02:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/dovecot \
|
|
|
|
${PREFIX}/lib/dovecot/imap \
|
|
|
|
${PREFIX}/lib/dovecot/pop3 \
|
|
|
|
${PREFIX}/lib/dovecot/lda
|
2003-02-16 00:13:10 +01:00
|
|
|
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(NOPORTDOCS)
|
2006-02-12 21:12:06 +01:00
|
|
|
CONFIGURE_ARGS+= --without-docs
|
2008-09-08 08:42:28 +02:00
|
|
|
.else
|
|
|
|
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README
|
|
|
|
PORTDOCS= *.txt wiki ${DOCS}
|
2006-02-12 21:12:06 +01:00
|
|
|
.endif
|
2003-05-03 23:50:26 +02:00
|
|
|
|
2007-01-08 00:50:55 +01:00
|
|
|
DOVECOT_UID?= 143
|
|
|
|
DOVECOT_GID?= 143
|
2008-09-08 08:42:28 +02:00
|
|
|
|
|
|
|
PROTOCOLS= imap
|
2007-01-08 00:50:55 +01:00
|
|
|
|
2006-06-19 18:19:25 +02:00
|
|
|
OPTIONS= KQUEUE "kqueue(2) support" on \
|
2006-10-31 01:23:04 +01:00
|
|
|
SSL "SSL support" on \
|
|
|
|
IPV6 "IPv6 support" on \
|
|
|
|
POP3 "POP3 support" on \
|
|
|
|
LDA "LDA support" on \
|
2008-07-30 04:15:52 +02:00
|
|
|
MANAGESIEVE "ManageSieve support" off \
|
2005-12-20 12:55:11 +01:00
|
|
|
GSSAPI "GSSAPI support" off \
|
2004-05-29 23:57:54 +02:00
|
|
|
VPOPMAIL "VPopMail support" off \
|
2008-09-08 08:42:28 +02:00
|
|
|
BDB "BerkleyDB support" off \
|
2004-05-29 23:57:54 +02:00
|
|
|
LDAP "OpenLDAP support" off \
|
2004-06-21 20:56:29 +02:00
|
|
|
PGSQL "PostgreSQL support" off \
|
2005-10-27 13:26:38 +02:00
|
|
|
MYSQL "MySQL support" off \
|
2006-10-31 01:23:04 +01:00
|
|
|
SQLITE "SQLite support" off
|
2004-05-29 23:57:54 +02:00
|
|
|
|
2004-02-01 17:01:30 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
2003-05-03 23:50:26 +02:00
|
|
|
|
2008-06-27 00:02:59 +02:00
|
|
|
# Default requirement for dovecot rc script
|
|
|
|
_REQUIRE= LOGIN
|
|
|
|
|
2008-09-08 08:42:28 +02:00
|
|
|
# sed script for dovecot.conf
|
2009-01-18 04:41:05 +01:00
|
|
|
REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\
|
2008-09-08 08:42:28 +02:00
|
|
|
s!/usr/!${PREFIX}/!g;\
|
|
|
|
s!=/usr!=${PREFIX}!g;\
|
|
|
|
s!=/etc !=${PREFIX}/etc !g;\
|
|
|
|
s!/etc/dovecot!${PREFIX}&!g;\
|
|
|
|
s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\
|
|
|
|
s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g;
|
|
|
|
|
2006-02-12 21:12:06 +01:00
|
|
|
## kqueue(2) support
|
|
|
|
#
|
2006-07-24 18:29:10 +02:00
|
|
|
.if !defined(WITHOUT_KQUEUE)
|
2006-08-19 16:43:12 +02:00
|
|
|
CONFIGURE_ARGS+= --with-ioloop=kqueue
|
2005-10-20 22:55:00 +02:00
|
|
|
.endif
|
|
|
|
|
2006-10-31 01:23:04 +01:00
|
|
|
## SSL support
|
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_SSL) && !defined(WITHOUT_SSL)
|
|
|
|
PROTOCOLS+= imaps
|
|
|
|
.else
|
2006-10-31 01:23:04 +01:00
|
|
|
CONFIGURE_ARGS+= --without-ssl
|
|
|
|
.endif
|
|
|
|
|
|
|
|
## IPv6 support
|
|
|
|
#
|
2007-10-04 01:34:16 +02:00
|
|
|
.if defined(WITHOUT_IPV6)
|
2006-10-31 01:23:04 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-ipv6
|
|
|
|
.endif
|
|
|
|
|
|
|
|
## POP3 support
|
|
|
|
#
|
|
|
|
.if defined(WITHOUT_POP3)
|
|
|
|
CONFIGURE_ARGS+= --without-pop3d
|
|
|
|
PLIST_SUB+= POP3="@comment "
|
|
|
|
.else
|
2008-09-08 08:42:28 +02:00
|
|
|
PROTOCOLS+= pop3
|
|
|
|
.if defined(WITH_SSL) && !defined(WITHOUT_SSL)
|
|
|
|
PROTOCOLS+= pop3s
|
|
|
|
.endif
|
2006-10-31 01:23:04 +01:00
|
|
|
PLIST_SUB+= POP3=""
|
|
|
|
.endif
|
|
|
|
|
|
|
|
## LDA support
|
|
|
|
#
|
|
|
|
.if defined(WITHOUT_LDA)
|
|
|
|
CONFIGURE_ARGS+= --without-deliver
|
|
|
|
PLIST_SUB+= LDA="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= LDA=""
|
|
|
|
.endif
|
|
|
|
|
2008-07-30 04:15:52 +02:00
|
|
|
## ManageSieve support
|
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_MANAGESIEVE) && !defined(WITHOUT_MANAGESIEVE)
|
2008-07-30 04:15:52 +02:00
|
|
|
MANAGESIEVEVERSION!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V PORTVERSION
|
|
|
|
PATCH_SITES!= ${MAKE} -C ${.CURDIR}/../dovecot-managesieve -V MASTER_SITES
|
|
|
|
PATCHFILES+= dovecot-${PORTVERSION}-managesieve-${MANAGESIEVEVERSION}.diff.gz
|
|
|
|
PATCH_DIST_STRIP= -p1
|
2008-09-08 08:42:28 +02:00
|
|
|
PROTOCOLS+= managesieve
|
|
|
|
DOCS+= README.managesieve
|
2008-07-30 04:15:52 +02:00
|
|
|
.endif
|
|
|
|
|
2005-12-20 12:55:11 +01:00
|
|
|
## GSSAPI support
|
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_GSSAPI) && !defined(WITHOUT_GSSAPI)
|
2005-12-20 12:55:11 +01:00
|
|
|
CONFIGURE_ARGS+= --with-gssapi
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-gssapi
|
|
|
|
.endif
|
|
|
|
|
2004-02-01 17:01:30 +01:00
|
|
|
## VPopMail Support
|
2003-02-16 00:13:10 +01:00
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_VPOPMAIL) && !defined(WITHOUT_VPOPMAIL)
|
2004-02-01 17:01:30 +01:00
|
|
|
VPOPMAIL= ${LOCALBASE}/vpopmail/bin/vchkpw
|
|
|
|
BUILD_DEPENDS+= ${VPOPMAIL}:${PORTSDIR}/mail/vpopmail
|
2003-02-16 00:13:10 +01:00
|
|
|
CONFIGURE_ARGS+= --with-vpopmail
|
2004-07-28 14:18:11 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-vpopmail
|
2003-02-16 00:13:10 +01:00
|
|
|
.endif
|
|
|
|
|
2008-09-08 08:42:28 +02:00
|
|
|
## BDB Support
|
|
|
|
#
|
|
|
|
.if defined(WITH_BDB) && !defined(WITHOUT_BDB)
|
2009-05-22 23:48:10 +02:00
|
|
|
USE_BDB= 42+
|
2008-09-08 08:42:28 +02:00
|
|
|
CONFIGURE_ARGS+= --with-db
|
|
|
|
CFLAGS+= -I${BDB_INCLUDE_DIR} -L${BDB_LIB_DIR}
|
|
|
|
PLIST_SUB+= BDB=""
|
2009-01-18 04:41:05 +01:00
|
|
|
REINPLACE+= s!^\#(dict_db_config)!\1!;
|
2008-09-08 08:42:28 +02:00
|
|
|
.else
|
|
|
|
PLIST_SUB+= BDB="@comment "
|
|
|
|
.endif
|
|
|
|
|
2004-02-01 17:01:30 +01:00
|
|
|
## OpenLDAP Support
|
2003-05-03 23:50:26 +02:00
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_LDAP) && !defined(WITHOUT_LDAP)
|
2004-02-01 17:01:30 +01:00
|
|
|
USE_OPENLDAP= yes
|
2003-05-03 23:50:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-ldap
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= LDAP=""
|
2008-06-27 00:02:59 +02:00
|
|
|
_REQUIRE+= slapd
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-ldap
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= LDAP="@comment "
|
2003-05-03 23:50:26 +02:00
|
|
|
.endif
|
|
|
|
|
2004-02-01 17:01:30 +01:00
|
|
|
## PostgreSQL Support
|
2003-05-03 23:50:26 +02:00
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_PGSQL) && !defined(WITHOUT_PGSQL)
|
2005-01-31 01:35:55 +01:00
|
|
|
USE_PGSQL= yes
|
2003-05-03 23:50:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= SQL=""
|
2008-06-27 00:02:59 +02:00
|
|
|
_REQUIRE+= postgresql
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-pgsql
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= SQL="@comment "
|
2003-05-03 23:50:26 +02:00
|
|
|
.endif
|
|
|
|
|
2004-06-21 20:56:29 +02:00
|
|
|
## MySQL Support
|
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_MYSQL) && !defined(WITHOUT_MYSQL)
|
2004-06-21 20:56:29 +02:00
|
|
|
USE_MYSQL= yes
|
2004-07-28 14:18:11 +02:00
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= SQL=""
|
2008-06-27 00:02:59 +02:00
|
|
|
_REQUIRE+= mysql
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-mysql
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= SQL="@comment "
|
2004-06-21 20:56:29 +02:00
|
|
|
.endif
|
|
|
|
|
2006-02-12 21:12:06 +01:00
|
|
|
## SQLite Support
|
|
|
|
#
|
2008-09-08 08:42:28 +02:00
|
|
|
.if defined(WITH_SQLITE) && !defined(WITHOUT_SQLITE)
|
2006-02-12 21:12:06 +01:00
|
|
|
USE_SQLITE= 3
|
|
|
|
CONFIGURE_ARGS+= --with-sqlite
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= SQL=""
|
2008-06-27 00:02:59 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-sqlite
|
2008-09-08 08:42:28 +02:00
|
|
|
PLIST_SUB+= SQL="@comment "
|
2005-12-20 12:55:11 +01:00
|
|
|
.endif
|
|
|
|
|
2008-09-08 08:42:28 +02:00
|
|
|
SUB_LIST+= REQUIRE="${_REQUIRE}" DOVECOT_UID=${DOVECOT_UID} DOVECOT_GID=${DOVECOT_GID}
|
|
|
|
SUB_FILES+= pkg-install pkg-deinstall pkg-message
|
2008-06-27 00:02:59 +02:00
|
|
|
|
2006-10-01 02:47:55 +02:00
|
|
|
post-patch:
|
2009-01-18 04:41:05 +01:00
|
|
|
@${REINPLACE_CMD} -E -e '${REINPLACE}' \
|
2008-09-08 08:42:28 +02:00
|
|
|
${WRKSRC}/dovecot-example.conf
|
|
|
|
@${REINPLACE_CMD} -E -e'\
|
|
|
|
s!-example\.conf[[:>:]]!.conf!g;\
|
|
|
|
s!^(confdir[[:space:]]+=[[:space:]]+)\$$\(sysconfdir\)!\1${EXAMPLESDIR}!g;\
|
|
|
|
' ${WRKSRC}/*/Makefile.in ${WRKSRC}/Makefile.in
|
2006-10-01 02:47:55 +02:00
|
|
|
.if defined(WITH_GSSAPI)
|
2008-09-08 08:42:28 +02:00
|
|
|
@${REINPLACE_CMD} -e '\
|
|
|
|
s!<gssapi/gssapi\.h>!<gssapi.h>!;\
|
|
|
|
' ${WRKSRC}/src/auth/mech-gssapi.c ${WRKSRC}/configure
|
2006-10-01 02:47:55 +02:00
|
|
|
.endif
|
2008-09-08 08:42:28 +02:00
|
|
|
@${LN} -f ${WRKSRC}/dovecot-example.conf ${WRKSRC}/dovecot.conf
|
|
|
|
@${LN} -f ${WRKSRC}/doc/dovecot-db-example.conf ${WRKSRC}/doc/dovecot-db.conf
|
2009-08-14 23:30:42 +02:00
|
|
|
@${LN} -f ${WRKSRC}/doc/dovecot-dict-sql-example.conf ${WRKSRC}/doc/dovecot-dict-sql.conf
|
2008-09-08 08:42:28 +02:00
|
|
|
@${LN} -f ${WRKSRC}/doc/dovecot-ldap-example.conf ${WRKSRC}/doc/dovecot-ldap.conf
|
|
|
|
@${LN} -f ${WRKSRC}/doc/dovecot-sql-example.conf ${WRKSRC}/doc/dovecot-sql.conf
|
2004-02-01 17:01:30 +01:00
|
|
|
|
|
|
|
pre-install:
|
|
|
|
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
|
|
|
|
|
|
|
post-install:
|
2008-09-08 08:42:28 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/dovecot.conf ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-db.conf ${EXAMPLESDIR}
|
2009-08-14 23:30:42 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-dict-sql.conf ${EXAMPLESDIR}
|
2008-09-08 08:42:28 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-ldap.conf ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-sql.conf ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf ${EXAMPLESDIR}
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh ${EXAMPLESDIR}
|
|
|
|
@${GREP} '^@exec ' ${TMPPLIST} \
|
|
|
|
| ${SED} -e 's:^@exec ::; s:%D:${PREFIX}:g;' \
|
|
|
|
> ${WRKDIR}/.PLIST.exec \
|
|
|
|
&& ${SH} ${WRKDIR}/.PLIST.exec
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
.for f in ${DOCS}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
2004-02-01 17:01:30 +01:00
|
|
|
@${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
2003-12-08 17:08:14 +01:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2004-02-01 17:01:30 +01:00
|
|
|
.include <bsd.port.post.mk>
|