--- /usr/portage/net-mail/dovecot/dovecot-1.0_rc14.ebuild 2006-11-12 14:35:23.000000000 -0600 +++ dovecot-1.0_rc14-r1.ebuild 2006-11-18 08:38:18.165345258 -0600 @@ -8,13 +8,15 @@ HOMEPAGE="http://dovecot.org/" MY_P="${P/_/.}" S="${WORKDIR}/${MY_P}" -SRC_URI="http://dovecot.org/releases/${MY_P}.tar.gz" +SIEVE="dovecot-sieve-1.0" +SIEVE_S="${WORKDIR}/${SIEVE}" +SRC_URI="http://dovecot.org/releases/${MY_P}.tar.gz sieve? ( http://dovecot.org/releases/sieve/${SIEVE}.tar.gz )" SLOT="0" LICENSE="LGPL-2.1" KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" -IUSE="debug doc ipv6 kerberos ldap mbox mysql pop3d pam postgres ssl vpopmail" +IUSE="debug doc ipv6 kerberos ldap mbox mysql pop3d pam postgres sieve ssl vpopmail" # Developer documentation, controlled by the doc USE flag DEVDOCS="auth-protocol index multiaccess securecoding" @@ -38,11 +40,12 @@ } src_compile() { - local myconf="--sysconfdir=/etc/dovecot --with-ioloop=best --with-poll=best" + local myconf="--with-ioloop=best --with-poll=best" use ssl && myconf="${myconf} --with-ssl=openssl" \ || myconf="${myconf} --without-ssl" econf --localstatedir=/var \ + --sysconfdir=/etc/dovecot \ $(use_enable debug) \ $(use_enable ipv6) \ $(use_with kerberos gssapi) \ @@ -54,6 +57,24 @@ $(use_with vpopmail) \ ${myconf} || die "configure failed" emake || die "make failed" + + if use sieve ; then + cd "${SIEVE_S}" + econf --localstatedir=/var \ + --sysconfdir=/etc/dovecot \ + --with-dovecot="${S}" \ + $(use_enable debug) \ + $(use_enable ipv6) \ + $(use_with kerberos gssapi) \ + $(use_with ldap) \ + $(use_with mysql) \ + $(use_with pam) \ + $(use_with pop3d) \ + $(use_with postgres pgsql) \ + $(use_with vpopmail) \ + ${myconf} || die "configure failed" + emake || die "make failed" + fi } src_install () { @@ -83,7 +104,7 @@ # .maildir is the Gentoo default, but we need to support mbox to local mail_location="maildir:~/.maildir" if use mbox ; then - mail_loctation="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" + mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" keepdir /var/dovecot sed -i -e 's|#mail_extra_groups =|mail_extra_groups = mail|' "${conf}" fi @@ -132,6 +153,11 @@ fi dodoc doc/*.cnf doc/mkcert.sh fi + # Install sieve plugin + if use sieve ; then + cd "${SIEVE_S}" + make DESTDIR="${D}" install || die "make install failed" + fi dodir /var/run/dovecot fowners root:0 /var/run/dovecot