2013-06-04 17:47:06 +02:00
|
|
|
# Created by: Dominic Marks <dominic.marks@btinternet.com>
|
2002-09-01 16:17:07 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= dovecot
|
2011-07-17 16:32:40 +02:00
|
|
|
PORTVERSION= 1.2.17
|
2014-10-21 01:13:25 +02:00
|
|
|
PORTREVISION= 5
|
2002-09-01 16:17:07 +02:00
|
|
|
CATEGORIES= mail ipv6
|
2014-05-18 19:05:12 +02:00
|
|
|
MASTER_SITES= http://www.dovecot.org/releases/${PORTVERSION:R}/ \
|
|
|
|
http://www.rename-it.nl/dovecot/${PORTVERSION:R}/
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2014-06-30 19:33:21 +02:00
|
|
|
MAINTAINER= bdrewery@FreeBSD.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
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
LICENSE= LGPL21 MIT
|
|
|
|
LICENSE_COMB= dual
|
2010-12-23 05:42:02 +01:00
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
CONFLICTS= dovecot2-2.[0-9].*
|
2009-08-19 03:28:50 +02:00
|
|
|
|
2009-07-03 16:29:55 +02:00
|
|
|
######################################################################
|
2010-07-05 07:39:49 +02:00
|
|
|
# Anytime PORTVERSION changes please bump PORTREVISIONs of #
|
2011-07-18 02:57:51 +02:00
|
|
|
# mail/dovecot-antispam, mail/dovecot-managesieve and #
|
|
|
|
# mail/dovecot-sieve. Please see ports/135311 and ports/146029 for #
|
|
|
|
# an explanation. #
|
2009-08-24 19:05:26 +02:00
|
|
|
# #
|
|
|
|
# Please be careful when updating this port as changes to this port #
|
|
|
|
# can break mail/dovecot-sieve and mail/dovecot-managesieve. In #
|
2009-08-24 19:16:57 +02:00
|
|
|
# order to ensure the least amount of breakage possible please #
|
|
|
|
# consult the maintainer of those ports before updating this one. #
|
2009-07-03 16:29:55 +02:00
|
|
|
######################################################################
|
2009-08-19 03:28:50 +02:00
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
USES= iconv libtool:keepla
|
2012-08-06 01:19:36 +02:00
|
|
|
USE_RC_SUBR= dovecot
|
2014-10-21 01:13:25 +02:00
|
|
|
USE_OPENSSL= yes
|
2004-05-29 23:57:54 +02:00
|
|
|
|
2014-06-30 19:33:21 +02:00
|
|
|
PORTSCOUT= limit:^1\.2
|
|
|
|
|
2002-09-01 16:17:07 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2014-05-18 19:05:12 +02:00
|
|
|
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
|
|
|
CONFIGURE_ARGS= --localstatedir=/var \
|
|
|
|
--with-statedir=/var/db/dovecot \
|
|
|
|
--without-shadow
|
|
|
|
|
2011-09-24 00:26:39 +02:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2014-05-18 19:05:12 +02:00
|
|
|
|
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
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
USERS= dovecot
|
|
|
|
GROUPS= ${USERS}
|
2008-09-08 08:42:28 +02:00
|
|
|
|
2009-12-10 16:30:08 +01:00
|
|
|
PROTOCOLS= imap pop3
|
2007-01-08 00:50:55 +01:00
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
# Default requirement for dovecot rc script
|
|
|
|
_REQUIRE= LOGIN
|
|
|
|
|
2014-07-15 18:14:15 +02:00
|
|
|
OPTIONS_DEFINE= KQUEUE SSL MANAGESIEVE GSSAPI VPOPMAIL BDB LDAP PGSQL MYSQL SQLITE DOCS
|
2013-06-04 17:47:06 +02:00
|
|
|
OPTIONS_DEFAULT= KQUEUE SSL MANAGESIEVE
|
|
|
|
KQUEUE_DESC= kqueue(2) support
|
|
|
|
MANAGESIEVE_DESC= ManageSieve support
|
|
|
|
VPOPMAIL_DESC= VPopMail support
|
2004-05-29 23:57:54 +02:00
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
OPTIONS_SUB= yes
|
|
|
|
BDB_CFLAGS= -I${BDB_INCLUDE_DIR} -L${BDB_LIB_DIR}
|
|
|
|
BDB_CONFIGURE_WITH= db
|
|
|
|
BDB_USE= BDB=48+
|
|
|
|
DOCS_CONFIGURE_WITH= docs
|
|
|
|
GSSAPI_CONFIGURE_WITH= gssapi
|
|
|
|
GSSAPI_LDFLAGS= -lgssapi_krb5
|
|
|
|
KQUEUE_CONFIGURE_ON= --with-ioloop=kqueue
|
|
|
|
LDAP_CONFIGURE_WITH= ldap
|
|
|
|
LDAP_USE= OPENLDAP=yes
|
|
|
|
MYSQL_CONFIGURE_WITH= mysql
|
|
|
|
MYSQL_USE= MYSQL=yes
|
|
|
|
PGSQL_CONFIGURE_WITH= pgsql
|
2014-11-22 20:13:49 +01:00
|
|
|
PGSQL_USES= pgsql
|
2014-05-18 19:05:12 +02:00
|
|
|
SQLITE_CONFIGURE_WITH= sqlite
|
|
|
|
SQLITE_USE= SQLITE=3
|
|
|
|
SSL_CONFIGURE_OFF= --without-ssl
|
|
|
|
SSL_CONFIGURE_ON= --with-ssl=openssl
|
|
|
|
VPOPMAIL_BUILD_DEPENDS= ${LOCALBASE}/vpopmail/bin/vchkpw:${PORTSDIR}/mail/vpopmail
|
|
|
|
VPOPMAIL_CONFIGURE_WITH=vpopmail
|
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
2003-05-03 23:50:26 +02:00
|
|
|
|
2012-09-04 05:05:23 +02:00
|
|
|
.if ${ARCH} == "arm"
|
|
|
|
BROKEN= Does not build on arm
|
|
|
|
.endif
|
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README
|
|
|
|
PORTDOCS= *
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSSL}
|
|
|
|
PROTOCOLS+= imaps pop3s
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MLDAP}
|
|
|
|
_REQUIRE+= slapd
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MPGSQL}
|
|
|
|
_REQUIRE+= postgresql
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MMYSQL}
|
|
|
|
_REQUIRE+= mysql
|
|
|
|
.endif
|
|
|
|
|
|
|
|
SUB_LIST+= REQUIRE="${_REQUIRE}"
|
|
|
|
SUB_FILES+= pkg-deinstall pkg-message
|
2008-06-27 00:02:59 +02:00
|
|
|
|
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;
|
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
.if ${PORT_OPTIONS:MBDB}
|
|
|
|
REINPLACE+= s!^\#(dict_db_config)!\1!;
|
2006-10-31 01:23:04 +01:00
|
|
|
.endif
|
|
|
|
|
2013-06-04 17:47:06 +02:00
|
|
|
.if ${PORT_OPTIONS:MMANAGESIEVE}
|
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
|
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
.if ${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MSQLITE}
|
|
|
|
PLIST_SUB+= SQL=""
|
2008-09-08 08:42:28 +02:00
|
|
|
.else
|
2014-05-18 19:05:12 +02:00
|
|
|
PLIST_SUB+= SQL="@comment "
|
2008-09-08 08:42:28 +02:00
|
|
|
.endif
|
|
|
|
|
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
|
|
|
|
@${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
|
|
|
|
|
|
|
post-install:
|
2014-05-18 19:05:12 +02:00
|
|
|
${FIND} ${STAGEDIR}${PREFIX}/lib/ -name \*.so | ${XARGS} strip
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/dovecot.conf ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-db.conf ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-dict-sql.conf ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-ldap.conf ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-sql.conf ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
|
2013-06-04 17:47:06 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2014-05-18 19:05:12 +02:00
|
|
|
${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
|
2008-09-08 08:42:28 +02:00
|
|
|
.endif
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2014-05-18 19:05:12 +02:00
|
|
|
.include <bsd.port.mk>
|