openbsd-ports/mail/dovecot/Makefile
sthen 7bbaba5867 Add some bug-fix patches; at this point in the Dovecot release cycle
most work is on 1.1, so it makes sense to add them locally for now.

- If SSL function fails and there are no errors, return "Unknown error"
instead of "Success" as the reason.
- Fixed a memory leak in ACL plugin.
- Send the success reply in one write.
- If remote disconnects, log "Connection closed: reason" just like IMAP does.
- STORE: Ignore flag changes for read-only (especially EXAMINEd) mailboxes.
- random_fill(): If read(/dev/urandom) returned EINTR, it could have written
random data before the given buffer.
- BODY/BODYSTRUCTURE fetch: Don't crash if we already had message parts
parsed.

From Brad, tested on various arch production servers.
2008-05-22 07:55:08 +00:00

121 lines
2.9 KiB
Makefile

# $OpenBSD: Makefile,v 1.94 2008/05/22 07:55:08 sthen Exp $
SHARED_ONLY= Yes
COMMENT-server= compact IMAP/POP3 server
COMMENT-sieve= sieve mail filtering for Dovecot
V_MAJOR= 1.0
V_DOVECOT= 1.0.13
V_SIEVE= 1.0.2
PKGNAME= dovecot-${V_DOVECOT}
PKGNAME-server= dovecot-${V_DOVECOT}p2
PKGNAME-sieve= dovecot-sieve-${V_SIEVE}p8
DISTNAME= dovecot-${V_DOVECOT}
CATEGORIES= mail
MASTER_SITES= ${HOMEPAGE}releases/${V_MAJOR}/
MASTER_SITES0= ${HOMEPAGE}releases/sieve/
DISTFILES= dovecot-${V_DOVECOT}.tar.gz \
dovecot-sieve-${V_SIEVE}.tar.gz:0
HOMEPAGE= http://www.dovecot.org/
MAINTAINER= Brad Smith <brad@comstyle.com>
# MIT/LGPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB-server= c crypto gssapi krb5 ssl z
WANTLIB-sieve=
MODULES= converters/libiconv
MULTI_PACKAGES= -server
SUBPACKAGE?= -server
PSEUDO_FLAVORS= no_sieve
FLAVORS= ldap mysql postgresql sqlite
FLAVOR?=
USE_LIBTOOL= Yes
AUTOCONF_VERSION= 2.61
CONFIGURE_STYLE= autoconf
CONFIGURE_ARGS+= --localstatedir=/var \
--with-ioloop=kqueue \
--with-ssl=openssl \
--with-ssldir=/etc/ssl \
--with-gssapi \
--without-pam \
--without-shadow \
--without-vpopmail
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I/usr/include/kerberosV -I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
.if !${FLAVOR:L:Mno_sieve}
MULTI_PACKAGES+= -sieve
SIEVE_DIR= ${WRKDIR}/dovecot-sieve-${V_SIEVE}
AUTOCONF_DIR+= ${WRKSRC} ${SIEVE_DIR}
RUN_DEPENDS-sieve= ::${BUILD_PKGPATH}
LIB_DEPENDS-sieve= ${MODLIBICONV_LIB_DEPENDS}
.endif
.if ${FLAVOR:L:Mldap}
CONFIGURE_ARGS+= --with-ldap
LIB_DEPENDS+= lber,ldap::databases/openldap
WANTLIB-server+= sasl2 asn1 com_err
.endif
.if ${FLAVOR:L:Mmysql}
CONFIGURE_ARGS+= --with-mysql
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
WANTLIB-server+= m
.endif
.if ${FLAVOR:L:Mpostgresql}
CONFIGURE_ARGS+= --with-pgsql
LIB_DEPENDS+= pq.>=4::databases/postgresql
.endif
.if ${FLAVOR:L:Msqlite}
CONFIGURE_ARGS+= --with-sqlite
LIB_DEPENDS+= sqlite3::databases/sqlite3
.endif
.if !${FLAVOR:L:Mno_sieve}
post-configure:
(cd ${WRKSRC}; ${MAKE_PROGRAM} dovecot-config)
(cd ${SIEVE_DIR}; ${SETENV} ${CONFIGURE_ENV} \
./configure --with-dovecot=${WRKSRC})
.endif
pre-build:
@perl -pi -e s#_PREFIX_#\${PREFIX}#g ${WRKSRC}/dovecot-example.conf
.if !${FLAVOR:L:Mno_sieve}
post-build:
(cd ${SIEVE_DIR}; ${MAKE_PROGRAM} ${MAKE_FLAGS})
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dovecot
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf \
${WRKSRC}/doc/dovecot-sql-example.conf \
${WRKSRC}/doc/dovecot-ldap-example.conf \
${WRKSRC}/dovecot-example.conf \
${PREFIX}/share/examples/dovecot
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh \
${PREFIX}/sbin/dovecot-mkcert.sh
.if !${FLAVOR:L:Mno_sieve}
${INSTALL_DATA} \
${SIEVE_DIR}/src/.libs/lib90_cmusieve_plugin.so \
${PREFIX}/lib/dovecot/lda
.endif
.include <bsd.port.mk>