diff options
Diffstat (limited to 'mail/dovecot/Makefile')
-rw-r--r-- | mail/dovecot/Makefile | 112 |
1 files changed, 34 insertions, 78 deletions
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index 24521d844aae..995f4aaa0308 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -6,11 +6,11 @@ # PORTNAME= dovecot -PORTVERSION= 0.99.10.2 +PORTVERSION= 0.99.10.4 CATEGORIES= mail ipv6 MASTER_SITES= http://dovecot.procontrol.fi/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= robin@isometry.net COMMENT= Secure and compact IMAP and POP3 servers LIB_DEPENDS= iconv.3:${PORTSDIR}/converters/libiconv @@ -25,84 +25,62 @@ CONFIGURE_ARGS= --without-shadow --enable-ipv6 \ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" -.include <bsd.port.pre.mk> +PKGMESSAGE= ${WRKDIR}/pkg-message -# -# Feature Autodetection -# -.if exists(${LOCALBASE}/lib/libsasl.so.2) -WITH_SASL2= yes -.endif +DOCS= auth.txt configuration.txt design.txt \ + index.txt mail-storages.txt mkcert.sh multiaccess.txt \ + nfs.txt dovecot-ldap.conf dovecot-pgsql.conf \ + dovecot-openssl.cnf securecoding.txt -.if exists(${LOCALBASE}/vpopmail/bin/vckpw) -WITH_VPOPMAIL= yes -.endif +#.include <bsd.port.pre.mk> -.if exists(${LOCALBASE}/lib/libldap.so.2) -WITH_LDAP2= yes -.endif - -.if exists(${LOCALBASE}/lib/libpq.so.3) -WITH_PGSQL= yes -.endif - -# -# SASL2 support +## SASL2 support -> WITH_SASL2=1 # # SASL provides authentication support to # session-based protocols. This is can be # used by dovecot for authentication sources. # -.if WITH_SASL2 +.if defined(WITH_SASL2) LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2 CONFIGURE_ARGS+= --with-cyrus-sasl2 .endif -# -# VPopMail Support +## VPopMail Support -> WITH_VPOPMAIL=1 # # vpopmail provides easy authentication and # multi-domain features. It was originally # created for use with Qmail. # -.if WITH_VPOPMAIL +.if defined(WITH_VPOPMAIL) VPOPMAIL= ${LOCALBASE}/vpopmail/bin/vchkpw BUILD_DEPENDS+= ${VPOPMAIL}:${PORTSDIR}/mail/vpopmail CONFIGURE_ARGS+= --with-vpopmail .endif -# -# OpenLDAP Support +## OpenLDAP Support -> WITH_LDAP=1 # # LDAP is the light-weight directory access # protocol and can be used by Dovecot for its # user database. # -.if WITH_LDAP2 -LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap21-client +.if defined(WITH_LDAP) +USE_OPENLDAP= yes CONFIGURE_ARGS+= --with-ldap .endif +## PostgreSQL Support -> WITH_PGSQL=1 # -# PostgreSQL Support -# -# PostgreSQL is a powerful SQL database which +# PostgreSQL is a powerful SQL database that # can be used to store user tables. # -.if WITH_PGSQL +.if defined(WITH_PGSQL) LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7 CONFIGURE_ARGS+= --with-pgsql .endif pre-everything:: - @${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} "==> ------------------------------------------" + @${ECHO_MSG} "==> Dovecot options: see ${MAKEFILE} for descriptions" + @${SED} -ne 's,^##,==> ,p' ${MAKEFILE} pre-build: @${REINPLACE_CMD} -e 's,%%SSLDIR%%,/var/dovecot/ssl,' \ @@ -111,11 +89,9 @@ pre-build: @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \ ${WRKSRC}/dovecot-example.conf -pre-install: - @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" \ - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - do-install: + @${SETENV} ${SCRIPTS_ENV} \ + ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL @${MKDIR} ${PREFIX}/libexec/dovecot ${INSTALL_PROGRAM} \ ${WRKSRC}/src/imap/imap \ @@ -126,41 +102,21 @@ do-install: ${PREFIX}/libexec/dovecot/ ${INSTALL_DATA} ${WRKSRC}/dovecot-example.conf ${PREFIX}/etc/ ${INSTALL_PROGRAM} ${WRKSRC}/src/master/dovecot ${PREFIX}/sbin/ - -post-install: - @${MKDIR} /var/dovecot - @${MKDIR} /var/dovecot/ssl - @${MKDIR} /var/dovecot/ssl/certs - @${MKDIR} /var/dovecot/ssl/private - @${MKDIR} /var/dovecot/auth - @${CHOWN} -R dovecot:dovecot /var/dovecot - @${MKDIR} /var/dovecot/login - @${CHOWN} root:dovecot /var/dovecot/login - @${MKDIR} /var/run/dovecot - @${CHMOD} 0700 /var/run/dovecot - @${CHOWN} root:dovecot /var/run/dovecot + @${SETENV} ${SCRIPTS_ENV} \ + ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dovecot.sh.sample \ ${PREFIX}/etc/rc.d/dovecot.sh.sample .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} - @${INSTALL_DATA} \ - ${WRKSRC}/doc/auth.txt \ - ${WRKSRC}/doc/design.txt \ - ${WRKSRC}/doc/index.txt \ - ${WRKSRC}/doc/multiaccess.txt \ - ${WRKSRC}/doc/nfs.txt \ - ${WRKSRC}/doc/configuration.txt \ - ${WRKSRC}/doc/mail-storages.txt \ - ${WRKSRC}/doc/dovecot-ldap.conf \ - ${WRKSRC}/doc/dovecot-pgsql.conf \ - ${WRKSRC}/doc/dovecot-openssl.cnf \ - ${WRKSRC}/doc/mkcert.sh \ - ${FILESDIR}/README.FreeBSD \ - ${DOCSDIR} +.for document in ${DOCS} + @${INSTALL_DATA} ${WRKSRC}/doc/${document} ${DOCSDIR} +.endfor + @${INSTALL_DATA} ${FILESDIR}/README.FreeBSD ${DOCSDIR} .endif - @${CP} ${PKGMESSAGE} ${WRKDIR}/pkg-message - @${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \ - ${WRKDIR}/pkg-message - @${CAT} ${WRKDIR}/pkg-message + @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \ + -e 's,%%DOCSDIR%%,${DOCSDIR},g' \ + ${.CURDIR}/pkg-message >${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} -.include <bsd.port.post.mk> +#.include <bsd.port.post.mk> +.include <bsd.port.mk> |