2006-12-01 18:57:28 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.66 2006/12/01 23:57:28 espie Exp $
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
COMMENT-server= "compact IMAP/POP3 server"
|
|
|
|
COMMENT-sieve= "sieve mail filtering for Dovecot"
|
2004-05-27 12:38:30 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
V_DOVECOT= 1.0.rc15
|
|
|
|
V_SIEVE= 1.0
|
|
|
|
|
|
|
|
PKGNAME-server= dovecot-${V_DOVECOT}
|
|
|
|
PKGNAME-sieve= dovecot-sieve-${V_SIEVE}
|
|
|
|
|
|
|
|
DISTNAME= dovecot-${V_DOVECOT}
|
2003-07-14 19:44:28 -04:00
|
|
|
CATEGORIES= mail
|
2004-07-21 10:19:19 -04:00
|
|
|
MASTER_SITES= ${HOMEPAGE}releases/
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
DISTFILES= dovecot-${V_DOVECOT}.tar.gz \
|
|
|
|
sieve/dovecot-sieve-${V_SIEVE}.tar.gz
|
|
|
|
|
|
|
|
HOMEPAGE= http://www.dovecot.org/
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2004-06-22 17:05:20 -04:00
|
|
|
MAINTAINER= Brad Smith <brad@openbsd.org>
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2006-02-10 23:10:08 -05:00
|
|
|
# MIT/LGPL
|
2003-07-14 19:44:28 -04:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2006-12-01 18:30:49 -05:00
|
|
|
|
|
|
|
WANTLIB-server= c crypto ssl z
|
|
|
|
WANTLIB-sieve=
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2004-08-10 05:14:47 -04:00
|
|
|
MODULES= converters/libiconv
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
MULTI_PACKAGES= -server
|
2006-12-01 18:57:28 -05:00
|
|
|
SUBPACKAGE?= -server
|
2006-12-01 18:30:49 -05:00
|
|
|
|
|
|
|
PSEUDO_FLAVORS= no_sieve
|
|
|
|
FLAVORS= ldap mysql postgresql
|
2005-02-13 13:42:46 -05:00
|
|
|
FLAVOR?=
|
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
USE_LIBTOOL= Yes
|
|
|
|
CONFIGURE_STYLE= autoconf
|
|
|
|
AUTOCONF_VERSION= 2.59
|
|
|
|
AUTOCONF_DIR= ${WRKSRC}
|
|
|
|
CONFIGURE_ARGS+= --localstatedir=/var \
|
|
|
|
--with-ioloop=kqueue \
|
|
|
|
--with-ssl=openssl \
|
|
|
|
--with-ssldir=/etc/ssl \
|
|
|
|
--without-pam \
|
|
|
|
--without-shadow \
|
|
|
|
--without-vpopmail
|
|
|
|
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
|
|
|
|
LDFLAGS="-L${LOCALBASE}/lib"
|
|
|
|
|
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
|
|
|
MULTI_PACKAGES+= -sieve
|
|
|
|
SIEVE_DIR= ${WRKDIR}/dovecot-sieve-${V_SIEVE}
|
|
|
|
AUTOCONF_DIR+= ${SIEVE_DIR}
|
|
|
|
RUN_DEPENDS-sieve+= ::mail/dovecot
|
|
|
|
.endif
|
|
|
|
|
2005-10-06 13:03:21 -04:00
|
|
|
.if ${FLAVOR:L:Mldap}
|
|
|
|
CONFIGURE_ARGS+= --with-ldap
|
2006-12-01 18:30:49 -05:00
|
|
|
LIB_DEPENDS-server+= lber,ldap::databases/openldap
|
|
|
|
WANTLIB-server+= sasl2 asn1 com_err gssapi krb5
|
2005-10-06 13:03:21 -04:00
|
|
|
.endif
|
|
|
|
|
2005-02-13 13:42:46 -05:00
|
|
|
.if ${FLAVOR:L:Mmysql}
|
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
2006-12-01 18:30:49 -05:00
|
|
|
LIB_DEPENDS-server+= lib/mysql/mysqlclient.>=10::databases/mysql
|
|
|
|
WANTLIB-server+= m
|
2005-02-13 13:42:46 -05:00
|
|
|
.endif
|
|
|
|
|
2005-07-23 15:34:22 -04:00
|
|
|
.if ${FLAVOR:L:Mpostgresql}
|
|
|
|
CONFIGURE_ARGS+= --with-pgsql
|
2006-12-01 18:30:49 -05:00
|
|
|
LIB_DEPENDS-server+= pq.>=4::databases/postgresql
|
2005-07-23 15:34:22 -04:00
|
|
|
.endif
|
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
|
|
|
post-configure:
|
|
|
|
(cd ${WRKSRC}; ${MAKE_PROGRAM} dovecot-config)
|
|
|
|
(cd ${SIEVE_DIR}; ${SETENV} ${CONFIGURE_ENV} \
|
|
|
|
./configure --with-dovecot=${WRKSRC})
|
|
|
|
.endif
|
2005-09-04 14:22:30 -04:00
|
|
|
|
|
|
|
pre-build:
|
|
|
|
@perl -pi -e s#_PREFIX_#\${PREFIX}#g ${WRKSRC}/dovecot-example.conf
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
|
|
|
post-build:
|
|
|
|
(cd ${SIEVE_DIR}; ${MAKE_PROGRAM} ${MAKE_FLAGS})
|
|
|
|
.endif
|
|
|
|
|
2003-07-14 19:44:28 -04:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dovecot
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf \
|
2005-09-04 14:22:30 -04:00
|
|
|
${WRKSRC}/doc/dovecot-sql.conf \
|
2005-10-06 13:03:21 -04:00
|
|
|
${WRKSRC}/doc/dovecot-ldap.conf \
|
2005-09-04 14:22:30 -04:00
|
|
|
${WRKSRC}/dovecot-example.conf \
|
2005-07-23 16:38:17 -04:00
|
|
|
${PREFIX}/share/examples/dovecot
|
2003-07-14 19:44:28 -04:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh \
|
|
|
|
${PREFIX}/sbin/dovecot-mkcert.sh
|
2006-12-01 18:30:49 -05:00
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
|
|
|
${INSTALL_DATA} \
|
|
|
|
${SIEVE_DIR}/src/.libs/lib90_cmusieve_plugin.so \
|
|
|
|
${PREFIX}/lib/dovecot
|
|
|
|
ln -s ../lib90_cmusieve_plugin.so ${PREFIX}/lib/dovecot/lda
|
|
|
|
.endif
|
2003-07-14 19:44:28 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|