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
|
2003-06-27 06:32:51 +02:00
|
|
|
PORTVERSION= 0.99.10
|
2002-09-01 16:17:07 +02:00
|
|
|
CATEGORIES= mail ipv6
|
2003-03-31 11:18:00 +02:00
|
|
|
MASTER_SITES= http://dovecot.procontrol.fi/
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2003-06-24 03:06:04 +02:00
|
|
|
MAINTAINER= dominic.marks@btinternet.com
|
2003-03-31 11:18:00 +02:00
|
|
|
COMMENT= Secure and compact IMAP and POP3 servers
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2003-04-19 19:42:27 +02:00
|
|
|
LIB_DEPENDS= iconv.3:${PORTSDIR}/converters/libiconv
|
|
|
|
|
2002-11-06 15:58:41 +01:00
|
|
|
USE_REINPLACE= yes
|
2002-09-01 16:17:07 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2003-02-16 00:13:10 +01:00
|
|
|
CONFIGURE_ARGS+= --without-shadow --enable-ipv6 \
|
2003-05-03 23:50:26 +02:00
|
|
|
--localstatedir=/var --with-ssl=openssl \
|
2003-02-16 00:13:10 +01:00
|
|
|
--with-ssldir=/var/dovecot/ssl --with-pop3d \
|
2003-05-03 23:50:26 +02:00
|
|
|
--with-pam
|
2003-04-19 19:42:27 +02:00
|
|
|
CONFIGURE_ENV+= CPPFLAGS=-I${LOCALBASE}/include \
|
|
|
|
LDFLAGS=-L${LOCALBASE}/lib
|
2003-02-16 00:13:10 +01:00
|
|
|
|
2003-05-03 23:50:26 +02:00
|
|
|
#
|
|
|
|
# Feature Autodetection
|
|
|
|
#
|
|
|
|
.if exists(${LOCALBASE}/lib/libsasl.so.2)
|
|
|
|
WITH_SASL2= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${LOCALBASE}/vpopmail/bin/vckpw)
|
|
|
|
WITH_VPOPMAIL= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${LOCALBASE}/lib/libldap.so.2)
|
|
|
|
WITH_LDAP2= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${LOCALBASE}/lib/libpq.so.3)
|
|
|
|
WITH_PGSQL= yes
|
|
|
|
.endif
|
|
|
|
|
2003-02-16 00:13:10 +01:00
|
|
|
#
|
|
|
|
# SASL2 support
|
|
|
|
#
|
|
|
|
# SASL provides authentication support to
|
|
|
|
# session-based protocols. This is can be
|
|
|
|
# used by dovecot for authentication sources.
|
|
|
|
#
|
|
|
|
.if WITH_SASL2
|
|
|
|
LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
|
|
|
|
CONFIGURE_ARGS+= --with-cyrus-sasl2
|
|
|
|
.endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# VPopMail Support
|
|
|
|
#
|
|
|
|
# vpopmail provides easy authentication and
|
|
|
|
# multi-domain features. It was originally
|
|
|
|
# created for use with Qmail.
|
|
|
|
#
|
|
|
|
.if WITH_VPOPMAIL
|
|
|
|
VPOPMAIL= ${LOCALBASE}/vpopmail/bin/vchkpw
|
|
|
|
BUILD_DEPENDS+= ${VPOPMAIL}:${PORTSDIR}/mail/vpopmail
|
|
|
|
CONFIGURE_ARGS+= --with-vpopmail
|
|
|
|
.endif
|
|
|
|
|
2003-05-03 23:50:26 +02:00
|
|
|
#
|
|
|
|
# OpenLDAP Support
|
|
|
|
#
|
|
|
|
# LDAP is the light-weight directory access
|
|
|
|
# protocol and can be used by Dovecot for its
|
|
|
|
# user database.
|
|
|
|
#
|
|
|
|
.if WITH_LDAP2
|
2003-07-03 13:59:04 +02:00
|
|
|
LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap21
|
2003-05-03 23:50:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-ldap
|
|
|
|
.endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# PostgreSQL Support
|
|
|
|
#
|
|
|
|
# PostgreSQL is a powerful SQL database which
|
|
|
|
# can be used to store user tables.
|
|
|
|
#
|
|
|
|
.if WITH_PGSQL
|
2003-07-06 13:51:21 +02:00
|
|
|
LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
|
2003-05-03 23:50:26 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql
|
|
|
|
.endif
|
|
|
|
|
2003-06-27 06:32:51 +02:00
|
|
|
pre-everything::
|
2003-05-03 23:50:26 +02:00
|
|
|
@${ECHO_MSG} "==> Dovecot Options"
|
|
|
|
@${ECHO_MSG} "==> See the Makefile for descriptions."
|
|
|
|
@${ECHO_MSG} "==> ------------------------------------------"
|
|
|
|
@${ECHO_MSG} "==> o SASL2 Support + WITH_SASL2"
|
|
|
|
@${ECHO_MSG} "==> o VPoPMail Support + WITH_VPOPMAIL"
|
|
|
|
@${ECHO_MSG} "==> o OpenLDAP2 Support + WITH_LDAP2"
|
|
|
|
@${ECHO_MSG} "==> o PostgreSQL Support + WITH_PGSQL"
|
|
|
|
@${ECHO_MSG} "==> ------------------------------------------"
|
|
|
|
|
|
|
|
pre-build:
|
|
|
|
@${REINPLACE_CMD} -e 's,%%SSLDIR%%,/var/dovecot/ssl,' \
|
|
|
|
${WRKSRC}/doc/mkcert.sh \
|
|
|
|
${WRKSRC}/dovecot-example.conf
|
2002-11-06 15:58:41 +01:00
|
|
|
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
|
|
|
|
${WRKSRC}/dovecot-example.conf
|
2002-09-01 16:17:07 +02:00
|
|
|
|
|
|
|
pre-install:
|
2002-11-06 15:58:41 +01:00
|
|
|
@${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" \
|
|
|
|
${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
2002-09-01 16:17:07 +02:00
|
|
|
|
2003-01-12 18:40:06 +01:00
|
|
|
do-install:
|
2003-05-03 23:50:26 +02:00
|
|
|
@${MKDIR} ${PREFIX}/libexec/dovecot
|
2003-01-12 18:40:06 +01:00
|
|
|
${INSTALL_PROGRAM} \
|
|
|
|
${WRKSRC}/src/imap/imap \
|
2003-02-16 00:13:10 +01:00
|
|
|
${WRKSRC}/src/pop3/pop3 \
|
|
|
|
${WRKSRC}/src/auth/dovecot-auth \
|
|
|
|
${WRKSRC}/src/imap-login/imap-login \
|
|
|
|
${WRKSRC}/src/pop3-login/pop3-login \
|
2003-05-03 23:50:26 +02:00
|
|
|
${PREFIX}/libexec/dovecot/
|
2003-02-16 00:13:10 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/dovecot-example.conf ${PREFIX}/etc/
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/src/master/dovecot ${PREFIX}/sbin/
|
2003-01-12 18:40:06 +01:00
|
|
|
|
2002-09-01 16:17:07 +02:00
|
|
|
post-install:
|
|
|
|
@${MKDIR} /var/dovecot
|
2003-01-12 18:40:06 +01:00
|
|
|
@${MKDIR} /var/dovecot/ssl
|
2003-05-03 23:50:26 +02:00
|
|
|
@${MKDIR} /var/dovecot/ssl/certs
|
|
|
|
@${MKDIR} /var/dovecot/ssl/private
|
2002-09-01 16:17:07 +02:00
|
|
|
@${MKDIR} /var/dovecot/auth
|
2003-05-03 23:50:26 +02:00
|
|
|
@${CHOWN} -R dovecot:dovecot /var/dovecot
|
2002-09-01 16:17:07 +02:00
|
|
|
@${MKDIR} /var/dovecot/login
|
2003-05-03 23:50:26 +02:00
|
|
|
@${CHOWN} root:dovecot /var/dovecot/login
|
|
|
|
@${MKDIR} /var/run/dovecot
|
|
|
|
@${CHMOD} 0700 /var/run/dovecot
|
|
|
|
@${CHOWN} root:dovecot /var/run/dovecot
|
|
|
|
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dovecot.sh.sample \
|
|
|
|
${PREFIX}/etc/rc.d/dovecot.sh.sample
|
2002-09-01 16:17:07 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${PREFIX}/share/doc/dovecot
|
|
|
|
@${INSTALL_DATA} \
|
|
|
|
${WRKSRC}/doc/auth.txt \
|
|
|
|
${WRKSRC}/doc/design.txt \
|
|
|
|
${WRKSRC}/doc/index.txt \
|
|
|
|
${WRKSRC}/doc/multiaccess.txt \
|
|
|
|
${WRKSRC}/doc/nfs.txt \
|
2003-01-12 18:40:06 +01:00
|
|
|
${WRKSRC}/doc/configuration.txt \
|
|
|
|
${WRKSRC}/doc/mail-storages.txt \
|
2003-03-31 11:18:00 +02:00
|
|
|
${WRKSRC}/doc/dovecot-ldap.conf \
|
2003-05-03 23:50:26 +02:00
|
|
|
${WRKSRC}/doc/dovecot-pgsql.conf \
|
2003-03-31 11:18:00 +02:00
|
|
|
${WRKSRC}/doc/dovecot-openssl.cnf \
|
|
|
|
${WRKSRC}/doc/mkcert.sh \
|
2003-05-03 23:50:26 +02:00
|
|
|
${FILESDIR}/README.FreeBSD \
|
2003-01-12 18:40:06 +01:00
|
|
|
${PREFIX}/share/doc/dovecot
|
2002-09-01 16:17:07 +02:00
|
|
|
.endif
|
2003-05-03 23:50:26 +02:00
|
|
|
@${CP} ${PKGMESSAGE} ${WRKDIR}/pkg-message
|
|
|
|
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
|
|
|
|
${WRKDIR}/pkg-message
|
|
|
|
@${CAT} ${WRKDIR}/pkg-message
|
2002-09-01 16:17:07 +02:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|