# ChangeLog for net-mail/dovecot
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.83 2007/01/07 19:48:38 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.84 2007/01/08 14:52:05 uberlord Exp $
+
+ 08 Jan 2007; Roy Marples <uberlord@gentoo.org> dovecot-1.0_rc17.ebuild:
+ Use docert from ssl-cert eclass to make our certs.
+ Touch certs in pkg_postinst so newer portages don't remove them.
*dovecot-1.0_rc17 (07 Jan 2007)
MD5 a596a1b95c83e1cc117c46e927131d29 dovecot-1.0_rc16.ebuild 5689
RMD160 61dbf78e03f4b6c47d0f1140a18e916744d6ddb1 dovecot-1.0_rc16.ebuild 5689
SHA256 f4326361d84ab84b6afb4fe907b71cd55f6606ac2551050fd15b71c3dab9c187 dovecot-1.0_rc16.ebuild 5689
-EBUILD dovecot-1.0_rc17.ebuild 5689 RMD160 a052f5b0648ea2c71b8cb0ffc18cbab51b010e00 SHA1 d319207251e788f4f381c4ee1ea5ca58d6b175fc SHA256 7a202e807b3e1265fb6c5785a48898e9760d0be51e5351afef18c31b01166522
-MD5 4cc0f6eca0792b00ab6aa72c566733fd dovecot-1.0_rc17.ebuild 5689
-RMD160 a052f5b0648ea2c71b8cb0ffc18cbab51b010e00 dovecot-1.0_rc17.ebuild 5689
-SHA256 7a202e807b3e1265fb6c5785a48898e9760d0be51e5351afef18c31b01166522 dovecot-1.0_rc17.ebuild 5689
-MISC ChangeLog 14294 RMD160 10844ed2ddd2809cc03e21ff14f3eaf616de0bab SHA1 8e55e4c0502b95a76f54d49938d61f0412441b6a SHA256 8499eb84fb1e2a52de8e8318154adc4c786b5049fed135f0abfdbcfde089417a
-MD5 2828c58c92c71d918578766a4e37b50a ChangeLog 14294
-RMD160 10844ed2ddd2809cc03e21ff14f3eaf616de0bab ChangeLog 14294
-SHA256 8499eb84fb1e2a52de8e8318154adc4c786b5049fed135f0abfdbcfde089417a ChangeLog 14294
+EBUILD dovecot-1.0_rc17.ebuild 6057 RMD160 393215c69a3050d4299d334f0dc5c5d7162b3630 SHA1 308682abce347745db13cab0a1a0188488533cc2 SHA256 ab0ed7789eeaaba6d1ce48a820bd556537e21f95fe9dcb82f846bd95c79c1d9c
+MD5 23be4b3c6c1002fcf31390ebea13f5e6 dovecot-1.0_rc17.ebuild 6057
+RMD160 393215c69a3050d4299d334f0dc5c5d7162b3630 dovecot-1.0_rc17.ebuild 6057
+SHA256 ab0ed7789eeaaba6d1ce48a820bd556537e21f95fe9dcb82f846bd95c79c1d9c dovecot-1.0_rc17.ebuild 6057
+MISC ChangeLog 14489 RMD160 bc04ac724ad0159f146b4a8ae61e1b48da06db8f SHA1 f706f5f92664016156e4b46f75c814ccda0c9c77 SHA256 4f863d54fa3280d01a545767c3a7adb2c84808a99b83f17d4433fd2910c32a54
+MD5 57ad2c0badc8ce41b05c8927a391e20b ChangeLog 14489
+RMD160 bc04ac724ad0159f146b4a8ae61e1b48da06db8f ChangeLog 14489
+SHA256 4f863d54fa3280d01a545767c3a7adb2c84808a99b83f17d4433fd2910c32a54 ChangeLog 14489
MISC metadata.xml 252 RMD160 97c0c41abc4b61586ab48653ced79067cb964aa6 SHA1 57de811cfb02936b35c4bef2108018e6b2697a99 SHA256 419ffa57f459d89a62dd42ee4bb01934f03e6913b470323f5b2b8a7c89e2dc66
MD5 b6ff89c08602229bdd234da83a89df77 metadata.xml 252
RMD160 97c0c41abc4b61586ab48653ced79067cb964aa6 metadata.xml 252
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0_rc17.ebuild,v 1.1 2007/01/07 19:48:38 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0_rc17.ebuild,v 1.2 2007/01/08 14:52:05 uberlord Exp $
-inherit autotools eutils
+inherit autotools eutils ssl-cert
MY_P="${P/_/.}"
S="${WORKDIR}/${MY_P}"
sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" || die
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
+
+ # Let's not make a new certificate if we already have one
+ if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
+ -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
+ insinto "${ROOT}"/etc/ssl/dovecot
+ docert server
+ fowners dovecot:mail /etc/ssl/dovecot/server.{key,pem}
+ fi
+ fi
+
# Install SQL configuration
if use mysql || use postgres ; then
cp doc/dovecot-sql.conf "${D}"/etc/dovecot
dodoc doc/dovecot-ldap.conf
fi
- # Create SSL certificates
- if use ssl ; then
- dodir /etc/ssl/certs
- dodir /etc/ssl/private
- # Let's not make a new certificate if we already have one
- if ! [[ -e /etc/ssl/certs/dovecot.pem && \
- -e /etc/ssl/private/dovecot.pem ]]; then
- einfo "Generating X.509 certificate for SSL"
- pushd doc >/dev/null && \
- SSLDIR="${D}"/etc/ssl sh mkcert.sh && \
- popd >/dev/null
- fi
- dodoc doc/*.cnf doc/mkcert.sh
- fi
-
# Install sieve plugin
if use sieve ; then
make -C "${SIEVE_S}" DESTDIR="${D}" install || die "make install failed"
}
pkg_postinst() {
+ # Touch ssl certs so that they are modified outisde of src_install
+ # We do this so portage does't unmerge them - silly portage
+ if use ssl ; then
+ touch "${ROOT}"/etc/ssl/dovecot/server.{key,pem}
+ fi
+
einfo "The dovecot configuration has vastly changed since 0.99."
einfo "You are encouraged to start afresh with a new configuration file."
einfo "see http://wiki.dovecot.org/ for configuration examples."