summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2009-09-10 17:18:07 +0000
committerPatrick Lauer <patrick@gentoo.org>2009-09-10 17:18:07 +0000
commit60a418f9b0b6872c4a1901767630643c0e63647e (patch)
tree4c85d5f4c4b7917e13570f45872778e52dc67185 /net-mail
parentFix bug #284355, testsuite failed due to inheritance from kde4-base.eclass wh... (diff)
downloadgentoo-2-60a418f9b0b6872c4a1901767630643c0e63647e.tar.gz
gentoo-2-60a418f9b0b6872c4a1901767630643c0e63647e.tar.bz2
gentoo-2-60a418f9b0b6872c4a1901767630643c0e63647e.zip
Bump to 1.2.4. Many new features and useflags, thanks to Robert Foerster, Bjoern, Thomas Arnett and Eray Aslan for the patches and all the testers. Fixes #276480
(Portage version: 2.2_rc40/cvs/Linux x86_64)
Diffstat (limited to 'net-mail')
-rw-r--r--net-mail/dovecot/ChangeLog12
-rw-r--r--net-mail/dovecot/dovecot-1.2.4.ebuild210
-rw-r--r--net-mail/dovecot/metadata.xml2
3 files changed, 222 insertions, 2 deletions
diff --git a/net-mail/dovecot/ChangeLog b/net-mail/dovecot/ChangeLog
index 241a8dfc7e31..171cd88fa59c 100644
--- a/net-mail/dovecot/ChangeLog
+++ b/net-mail/dovecot/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-mail/dovecot
-# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.204 2009/06/09 07:01:35 wschlich Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.205 2009/09/10 17:18:07 patrick Exp $
+
+*dovecot-1.2.4 (10 Sep 2009)
+
+ 10 Sep 2009; Patrick Lauer <patrick@gentoo.org> +dovecot-1.2.4.ebuild,
+ metadata.xml:
+ Bump to 1.2.4. Many new features and useflags, thanks to Robert Foerster,
+ Bjoern, Thomas Arnett and Eray Aslan for the patches and all the testers.
+ Fixes #276480
*dovecot-1.1.16 (09 Jun 2009)
diff --git a/net-mail/dovecot/dovecot-1.2.4.ebuild b/net-mail/dovecot/dovecot-1.2.4.ebuild
new file mode 100644
index 000000000000..049e26ec12c3
--- /dev/null
+++ b/net-mail/dovecot/dovecot-1.2.4.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.2.4.ebuild,v 1.1 2009/09/10 17:18:07 patrick Exp $
+
+EAPI="2"
+
+inherit eutils versionator
+
+major_minor="$( get_version_component_range 1-2 "${PV}" )"
+sieve_version="0.1.12"
+managesieve_version="0.11.9"
+SRC_URI="http://dovecot.org/releases/${major_minor}/${P}.tar.gz
+ sieve? ( http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-sieve-${sieve_version}.tar.gz )
+ managesieve? (
+ http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${PV}-managesieve-${managesieve_version}.diff.gz
+ http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-managesieve-${managesieve_version}.tar.gz
+ )"
+DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
+HOMEPAGE="http://www.dovecot.org/"
+
+SLOT="0"
+LICENSE="LGPL-2.1" # MIT too?
+KEYWORDS="~amd64 ~x86"
+
+IUSE="berkdb bzip2 caps cydir dbox doc kerberos ldap maildir managesieve mbox mysql pam postgres sieve sqlite ssl suid vpopmail zlib"
+
+DEPEND="berkdb? ( sys-libs/db )
+ caps? ( sys-libs/libcap )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( virtual/postgresql-base )
+ sqlite? ( dev-db/sqlite )
+ ssl? ( dev-libs/openssl )
+ vpopmail? ( net-mail/vpopmail )"
+
+RDEPEND="${DEPEND}
+ >=net-mail/mailbase-0.00-r8"
+
+pkg_setup() {
+ if use managesieve && ! use sieve; then
+ eerror "managesieve USE flag selected but sieve USE flag unselected"
+ die "USE flag problem"
+ fi
+
+ # Add user and group for login process (same as for fedora/redhat)
+ enewgroup dovecot 97
+ enewuser dovecot 97 -1 /dev/null dovecot
+}
+
+src_prepare() {
+ use managesieve && epatch "${WORKDIR}"/dovecot-${PV}-managesieve-${managesieve_version}.diff
+}
+
+src_configure() {
+ local conf=""
+
+ if use postgres || use mysql || use sqlite; then
+ conf="${conf} --with-sql=plugin"
+ fi
+
+ use ldap && conf="${conf} --with-ldap=plugin"
+ use kerberos && conf="${conf} --with-gssapi=plugin"
+
+ local storages=""
+ for storage in cydir dbox maildir mbox; do
+ use ${storage} && storages="${storage} ${storages}"
+ done
+ [ "${storages}" ] || storages="maildir"
+
+ econf \
+ --sysconfdir=/etc/dovecot \
+ --localstatedir=/var \
+ --with-moduledir="/usr/$( get_libdir )/dovecot" \
+ $( use_with berkdb db ) \
+ $( use_with bzip2 bzlib ) \
+ $( use_with caps libcap ) \
+ $( use_with mysql ) \
+ $( use_with pam ) \
+ $( use_with postgres pgsql ) \
+ $( use_with sqlite ) \
+ $( use_with ssl ) \
+ $( use_with vpopmail ) \
+ $( use_with zlib ) \
+ --with-storages="${storages}" \
+ --with-pic \
+ --enable-header-install \
+ ${conf} \
+ || die "configure failed"
+
+ if use sieve; then
+ # The sieve plugin needs this file to be build to determine the plugin
+ # directory and the list of libraries to link to.
+ emake dovecot-config || die "emake dovecot-config failed"
+ cd "../dovecot-${major_minor}-sieve-${sieve_version}"
+ econf --with-dovecot="${S}"
+
+ if use managesieve; then
+ cd "../dovecot-${major_minor}-managesieve-${managesieve_version}"
+ econf --with-dovecot="${S}" --with-dovecot-sieve="../dovecot-${major_minor}-sieve-${sieve_version}"
+ fi
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed"
+
+ if use sieve; then
+ cd "../dovecot-${major_minor}-sieve-${sieve_version}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed"
+
+ if use managesieve; then
+ cd "../dovecot-${major_minor}-managesieve-${managesieve_version}"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed"
+ fi
+ fi
+}
+
+src_install () {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ use suid && fperms u+s /usr/libexec/dovecot/deliver
+
+ rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf
+
+ newinitd "${FILESDIR}"/dovecot.init-r2 dovecot
+
+ rm -rf "${D}"/usr/share/doc/dovecot
+ use doc && dodoc AUTHORS NEWS README TODO dovecot-example.conf doc/dovecot-{db,dict-sql}-example.conf doc/{securecoding,auth-protocol,documentation}.txt doc/dovecot-openssl.cnf
+
+ # Create the dovecot.conf file from the dovecot-example.conf file that
+ # the dovecot folks nicely left for us....
+ local conf="${D}/etc/dovecot/dovecot.conf"
+ mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf
+
+ # .maildir is the Gentoo default, but we need to support mbox to
+ local mail_location="maildir:~/.maildir"
+ if use mbox; then
+ mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
+ keepdir /var/dovecot
+ sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' "${conf}"
+ fi
+ sed -i -e \
+ "s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \
+ || die "failed to update mail location settings in dovecot.conf"
+
+ # We're using pam files (imap and pop3) provided by mailbase
+ if use pam; then
+ sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
+ "${conf}" || die "failed to update PAM settings in dovecot.conf"
+ # mailbase does not provide a managesieve pam file
+ use managesieve && dosym imap /etc/pam.d/managesieve
+ fi
+
+ # Listen on ipv6 and ipv4
+ if use ipv6; then
+ sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" \
+ || die "failed to update listen settings in dovecot.conf"
+ fi
+
+ # Update ssl cert locations
+ if use ssl; then
+ sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \
+ -e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \
+ "${conf}" || die "failed to update SSL settings in dovecot.conf"
+ fi
+
+ # Install SQL configuration
+ if use mysql || use postgres; then
+ cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf
+ fperms 600 /etc/dovecot/dovecot-sql.conf
+ sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \
+ || die "failed to update SQL settings in dovecot-sql.conf"
+ dodoc doc/dovecot-sql-example.conf
+ fi
+
+ # Install LDAP configuration
+ if use ldap; then
+ cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf
+ fperms 600 /etc/dovecot/dovecot-ldap.conf
+ sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \
+ || die "failed to update LDAP settings in dovecot-ldap.conf"
+ dodoc doc/dovecot-ldap-example.conf
+ fi
+
+ if use sieve; then
+ cd "../dovecot-${major_minor}-sieve-${sieve_version}"
+ emake DESTDIR="${D}" install || die "make install failed (sieve)"
+
+ if use managesieve; then
+ cd "../dovecot-${major_minor}-managesieve-${managesieve_version}"
+ emake DESTDIR="${D}" install || die "make install failed (managesieve)"
+ fi
+ fi
+
+ dodir /var/run/dovecot
+ fowners root:root /var/run/dovecot
+ fperms 0755 /var/run/dovecot
+ keepdir /var/run/dovecot/login
+ fowners root:dovecot /var/run/dovecot/login
+ fperms 0750 /var/run/dovecot/login
+
+ ewarn "If you are upgrading from Dovecot 1.1, read "
+ ewarn " http://wiki.dovecot.org/Upgrading/1.2"
+ if use sieve; then
+ ewarn " http://wiki.dovecot.org/LDA/Sieve/Dovecot#Migration_from_CMUSieve"
+ ewarn " In particular, do not forget to change cmusieve to sieve"
+ fi
+}
diff --git a/net-mail/dovecot/metadata.xml b/net-mail/dovecot/metadata.xml
index 3be3b0ab2a61..7d7de8b7c156 100644
--- a/net-mail/dovecot/metadata.xml
+++ b/net-mail/dovecot/metadata.xml
@@ -8,6 +8,8 @@
<description>Primary maintainer</description>
</maintainer>
<use>
+ <flag name="cydir">Adds cydir storage support</flag>
+ <flag name="dbox">Adds cydir storage support</flag>
<flag name="managesieve">Adds managesieve protocol support</flag>
<flag name="pop3d">Build pop3d support</flag>
<flag name="sieve">Build the sieve plugin</flag>