ports/61905: Maintainer update: mail/dovecot
Robin Breathe
robin at isometry.net
Sun Jan 25 21:00:56 UTC 2004
>Number: 61905
>Category: ports
>Synopsis: Maintainer update: mail/dovecot
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 25 13:00:36 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Robin Breathe
>Release: FreeBSD 5.2-RELEASE i386
>Organization:
>Environment:
>Description:
Updates:
- Fix build on -CURRENT following deprecation of EAI_NODATA (see RFC 3493)
- Use PORTDOCS macro
- Use OPTIONS macro for 'make config'
- USE_RC_SUBR
>How-To-Repeat:
>Fix:
1) Delete ports/mail/dovecot/files/dovecot.sh.sample
2) Apply the following diff against dovecot-0.99.10.4_1:
--- dovecot-0.99.10.4_2.diff begins here ---
diff -ruN dovecot-0.99.10.4/Makefile dovecot/Makefile
--- dovecot-0.99.10.4/Makefile Sun Jan 25 20:32:56 2004
+++ dovecot/Makefile Sun Jan 25 20:39:02 2004
@@ -1,3 +1,4 @@
+# ex:ts=8
# New ports collection makefile for: dovecot
# Date created: 12/08/2002
# Whom: Dominic Marks <dominic.marks at btinternet.com>
@@ -7,7 +8,7 @@
PORTNAME= dovecot
PORTVERSION= 0.99.10.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail ipv6
MASTER_SITES= http://www.dovecot.org/
@@ -28,60 +29,68 @@
PKGMESSAGE= ${WRKDIR}/pkg-message
-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 !defined(NOPORTDOCS)
+PORTDOCS= 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
+.endif
-#.include <bsd.port.pre.mk>
+.include <bsd.port.pre.mk>
-## SASL2 support -> WITH_SASL2=1
+## SASL2 support
+OPTIONS+= SASL2 "SASL2 support" off
#
# SASL provides authentication support to
# session-based protocols. This is can be
# used by dovecot for authentication sources.
#
.if defined(WITH_SASL2)
-LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
+LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
CONFIGURE_ARGS+= --with-cyrus-sasl2
.endif
-## VPopMail Support -> WITH_VPOPMAIL=1
+## VPopMail Support
+OPTIONS+= VPOPMAIL "VPopMail support" off
#
# vpopmail provides easy authentication and
# multi-domain features. It was originally
# created for use with Qmail.
#
.if defined(WITH_VPOPMAIL)
-VPOPMAIL= ${LOCALBASE}/vpopmail/bin/vchkpw
-BUILD_DEPENDS+= ${VPOPMAIL}:${PORTSDIR}/mail/vpopmail
+VPOPMAIL= ${LOCALBASE}/vpopmail/bin/vchkpw
+BUILD_DEPENDS+= ${VPOPMAIL}:${PORTSDIR}/mail/vpopmail
CONFIGURE_ARGS+= --with-vpopmail
.endif
-## OpenLDAP Support -> WITH_LDAP=1
+## OpenLDAP Support
+OPTIONS+= LDAP "OpenLDAP support" off
#
# LDAP is the light-weight directory access
# protocol and can be used by Dovecot for its
# user database.
#
.if defined(WITH_LDAP)
-USE_OPENLDAP= yes
+USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-ldap
.endif
-## PostgreSQL Support -> WITH_PGSQL=1
+## PostgreSQL Support
+OPTIONS+= PGSQL "PostgreSQL support" off
#
# PostgreSQL is a powerful SQL database that
# can be used to store user tables.
#
.if defined(WITH_PGSQL)
-LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
+LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
CONFIGURE_ARGS+= --with-pgsql
.endif
-pre-configure:
- @${ECHO_MSG} "=> ${PORTNAME} options: see ${MAKEFILE} for descriptions"
- @${SED} -ne 's,^##,=> ,p' ${MAKEFILE}
+.if ${OSVERSION} >= 500038
+RC_SUBR?= /etc/rc.subr
+.else
+USE_RC_SUBR= yes
+.endif
pre-build:
@${REINPLACE_CMD} -e 's,%%SSLDIR%%,/var/dovecot/ssl,' \
@@ -90,9 +99,13 @@
@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},' \
${WRKSRC}/dovecot-example.conf
+post-build:
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
+ ${FILESDIR}/dovecot.sh >${WRKDIR}/dovecot.sh
+
do-install:
- @${SETENV} ${SCRIPTS_ENV} \
- ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
@${MKDIR} ${PREFIX}/libexec/dovecot
${INSTALL_PROGRAM} \
${WRKSRC}/src/imap/imap \
@@ -103,21 +116,18 @@
${PREFIX}/libexec/dovecot/
${INSTALL_DATA} ${WRKSRC}/dovecot-example.conf ${PREFIX}/etc/
${INSTALL_PROGRAM} ${WRKSRC}/src/master/dovecot ${PREFIX}/sbin/
- @${SETENV} ${SCRIPTS_ENV} \
- ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
- ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dovecot.sh.sample \
- ${PREFIX}/etc/rc.d/dovecot.sh.sample
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ ${INSTALL_SCRIPT} ${WRKDIR}/dovecot.sh ${PREFIX}/etc/rc.d/
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
-.for document in ${DOCS}
- @${INSTALL_DATA} ${WRKSRC}/doc/${document} ${DOCSDIR}
-.endfor
+ @${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}
@${INSTALL_DATA} ${FILESDIR}/README.FreeBSD ${DOCSDIR}
.endif
+
+post-install:
@${SED} -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
- ${.CURDIR}/pkg-message >${PKGMESSAGE}
+ ${.CURDIR}/pkg-message >${PKGMESSAGE}
@${CAT} ${PKGMESSAGE}
-#.include <bsd.port.post.mk>
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -ruN dovecot-0.99.10.4/files/dovecot.sh dovecot/files/dovecot.sh
--- dovecot-0.99.10.4/files/dovecot.sh Thu Jan 1 00:00:00 1970
+++ dovecot/files/dovecot.sh Sun Jan 25 20:36:42 2004
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: dovecot
+# REQUIRE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dovecot:
+#
+#dovecot_enable="YES"
+#
+dovecot_enable="NO"
+
+. %%RC_SUBR%%
+
+name=dovecot
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/${name}
+required_files=%%PREFIX%%/etc/${name}.conf
+
+load_rc_config ${name}
+run_rc_command "$1"
diff -ruN dovecot-0.99.10.4/files/patch-network.c dovecot/files/patch-network.c
--- dovecot-0.99.10.4/files/patch-network.c Thu Jan 1 00:00:00 1970
+++ dovecot/files/patch-network.c Sun Jan 25 20:25:18 2004
@@ -0,0 +1,11 @@
+--- src/lib/network.c Sun Jun 22 23:09:48 2003
++++ network.c Sun Jan 25 20:22:17 2004
+@@ -591,7 +591,7 @@
+ int net_hosterror_notfound(int error)
+ {
+ #ifdef HAVE_IPV6
+- return error != 1 && (error == EAI_NONAME || error == EAI_NODATA);
++ return error != 1 && (error == EAI_NONAME);
+ #else
+ return error == HOST_NOT_FOUND || error == NO_ADDRESS;
+ #endif
diff -ruN dovecot-0.99.10.4/pkg-message dovecot/pkg-message
--- dovecot-0.99.10.4/pkg-message Sun Jan 25 20:32:56 2004
+++ dovecot/pkg-message Sun Jan 25 20:31:42 2004
@@ -1,15 +1,15 @@
---------------------------------------------------------------------
You can get default configured IMAP and POP3 services running by
- copying the following sample files to the given locations. In this
- simple configuration Dovecot will authenticate users against the
- systems passwd file and use the default /var/mail/$USER mbox files.
+ copying the sample configuration file to the given location and then
+ enabling dovecot in /etc/rc.conf.
+ In this simple configuration Dovecot will authenticate users against
+ the systems passwd file and use the default /var/mail/$USER mbox
+ files.
- %%PREFIX%%/etc/dovecot-example.conf
- -> %%PREFIX%%/etc/dovecot.conf
+ cd %%PREFIX%%/etc; cp dovecot-example.conf dovecot.conf
- %%PREFIX%%/etc/rc.d/dovecot.sh.sample
- -> %%PREFIX%%/etc/rc.d/dovecot.sh
+ echo dovecot_enable="YES" >> /etc/rc.conf
Further information on configuration can be found in:
diff -ruN dovecot-0.99.10.4/pkg-plist dovecot/pkg-plist
--- dovecot-0.99.10.4/pkg-plist Sun Jan 25 20:32:56 2004
+++ dovecot/pkg-plist Sun Jan 25 19:33:14 2004
@@ -1,5 +1,5 @@
etc/dovecot-example.conf
-etc/rc.d/dovecot.sh.sample
+etc/rc.d/dovecot.sh
libexec/dovecot/dovecot-auth
libexec/dovecot/imap
libexec/dovecot/imap-login
@@ -7,20 +7,6 @@
libexec/dovecot/pop3-login
@dirrm libexec/dovecot
sbin/dovecot
-%%PORTDOCS%%%%DOCSDIR%%/auth.txt
-%%PORTDOCS%%%%DOCSDIR%%/configuration.txt
-%%PORTDOCS%%%%DOCSDIR%%/design.txt
-%%PORTDOCS%%%%DOCSDIR%%/index.txt
-%%PORTDOCS%%%%DOCSDIR%%/mail-storages.txt
-%%PORTDOCS%%%%DOCSDIR%%/mkcert.sh
-%%PORTDOCS%%%%DOCSDIR%%/multiaccess.txt
-%%PORTDOCS%%%%DOCSDIR%%/nfs.txt
-%%PORTDOCS%%%%DOCSDIR%%/dovecot-ldap.conf
-%%PORTDOCS%%%%DOCSDIR%%/dovecot-pgsql.conf
-%%PORTDOCS%%%%DOCSDIR%%/dovecot-openssl.cnf
-%%PORTDOCS%%%%DOCSDIR%%/securecoding.txt
-%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
@unexec rmdir /var/dovecot/auth 2>/dev/null || true
@unexec rmdir /var/dovecot/login 2>/dev/null || true
@unexec rmdir /var/dovecot/ssl/certs 2>/dev/null || true
--- dovecot-0.99.10.4_2.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list