diff options
author | 2012-04-10 03:43:35 +0000 | |
---|---|---|
committer | 2012-04-10 03:43:35 +0000 | |
commit | d430b90c634b055f524fe2a20334f01e85b2cdf8 (patch) | |
tree | 7eba4d29c77b8a6faa94eb898643284274dfaf26 /net-mail | |
parent | www-servers/gatling: Unbreak diet mode (bug #314115) (diff) | |
download | historical-d430b90c634b055f524fe2a20334f01e85b2cdf8.tar.gz historical-d430b90c634b055f524fe2a20334f01e85b2cdf8.tar.bz2 historical-d430b90c634b055f524fe2a20334f01e85b2cdf8.zip |
version bump
Package-Manager: portage-2.1.10.56/cvs/Linux x86_64
Diffstat (limited to 'net-mail')
-rw-r--r-- | net-mail/dovecot/ChangeLog | 9 | ||||
-rw-r--r-- | net-mail/dovecot/Manifest | 26 | ||||
-rw-r--r-- | net-mail/dovecot/dovecot-2.0.20.ebuild | 281 | ||||
-rw-r--r-- | net-mail/dovecot/dovecot-2.1.4.ebuild | 275 |
4 files changed, 584 insertions, 7 deletions
diff --git a/net-mail/dovecot/ChangeLog b/net-mail/dovecot/ChangeLog index bba7c66a0439..ab562667208d 100644 --- a/net-mail/dovecot/ChangeLog +++ b/net-mail/dovecot/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-mail/dovecot # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.353 2012/03/18 19:05:45 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.354 2012/04/10 03:43:35 eras Exp $ + +*dovecot-2.1.4 (10 Apr 2012) +*dovecot-2.0.20 (10 Apr 2012) + + 10 Apr 2012; Eray Aslan <eras@gentoo.org> +dovecot-2.0.20.ebuild, + +dovecot-2.1.4.ebuild: + version bump 18 Mar 2012; Raúl Porcel <armin76@gentoo.org> dovecot-2.0.17.ebuild: alpha/ia64/s390/sh/sparc stable wrt #403849 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest index 4aeffa288d4e..d67a3e24f6c4 100644 --- a/net-mail/dovecot/Manifest +++ b/net-mail/dovecot/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 AUX dovecot-1.2.init 1701 RMD160 89cdc58d6ad9ac41f8946fabf3c80e0b9f4b61ea SHA1 9cbf10e9d1997ad3703ee1ae37edbcfad6f16b79 SHA256 44b308537454362b00f8ab87257c4a0d8eb5a183452ca2e3487f74b642fac8e0 AUX dovecot.init-r3 1609 RMD160 971a603d1507f40c5377aeedf5fd99485944c525 SHA1 329cf561d55a6dceb7bddd3fd09fb83522a9b548 SHA256 b4fb8ffb9aa7fd270d45512a657dcb5597ae5fe516b1f8e0078aa1892de8ecaa @@ -15,11 +15,13 @@ DIST dovecot-2.0.16.tar.gz 3317662 RMD160 dfe0cf2bbd211a07bb492c2f0d944a6a9f1c5f DIST dovecot-2.0.17.tar.gz 3329794 RMD160 108399bdaf0e03e013b78b79e39c5c8a5dd2f62d SHA1 4c12f1a074c52b17cb64fcc73c41f0a2820a88fe SHA256 3f0d4289067d2355b4ce4a00265bf2b4bf6540bca8fdcecfc6ad20611da145d2 DIST dovecot-2.0.18.tar.gz 3353149 RMD160 e6260b009e3b0f5b58113dd71a2755edee665e0e SHA1 117e90053be3d51ab3cf2674f2c04536729474d7 SHA256 92fc68af6ef0309990c749fcab39eeebce56ea8888c3d73ba812b65a74d1fa1b DIST dovecot-2.0.19.tar.gz 3357056 RMD160 8f0fda1393133a98f76eacdb9ef84d226d0b43be SHA1 54adccd4297e0a63af2a17ff676aadeac7009cce SHA256 50e49e181acea7f2c08008c5a61500c01803dc36b5ae1e6ffe24c1c56e3c69b4 +DIST dovecot-2.0.20.tar.gz 3360751 RMD160 4fb3efe6cea1cda473601280835573e8db4634c7 SHA1 c421e9acb6fb4e509a6c9bbd82970209543cfff0 SHA256 fa630159127e710dcd623b99bc655d1f5f85891fd1615f194ea72d4fe3cf82c0 DIST dovecot-2.1-pigeonhole-0.3.0.tar.gz 1277277 RMD160 64692b03b60079b9ed22b069de947da7f4a32114 SHA1 e465536ce14690804665b4eea0916969562dc926 SHA256 2aeee8aa6dc700483b0a5a3d31f535abce71698ed1d467f11e931aeace2b0ada DIST dovecot-2.1.0.tar.gz 3662969 RMD160 302b6628cbcb14c1334d4bb14293f8ebc4216451 SHA1 1434746a230b0ab554036c00d11ae16aed2746bc SHA256 61d1a776bf02c72272f2401ee4b7b4f1ce530dd2695a774c1ebedb61a228238b DIST dovecot-2.1.1.tar.gz 3667894 RMD160 6f6204a8703c589c18b03d7218829a234b553782 SHA1 d7e2458fc405de1cc7070ee8b17e3a6dfb269334 SHA256 f233a2d40f86785b0e568291a08312d5c15247c12de011be916c1eaf96276191 DIST dovecot-2.1.2.tar.gz 3724620 RMD160 4236b7ff794559915c41ff411d0d6139f58c5be6 SHA1 768dcdbfaa82d4f414b72992381ac43b2bda8e26 SHA256 8cdf14d2c68a1a6d53006611bbd1bd4d0ed8c160e48bf499f0fd70a818d755f3 DIST dovecot-2.1.3.tar.gz 3724550 RMD160 c5130de9737ee93fba896e02a7dba9725e4176c7 SHA1 b11d9dc3e058c291243e75d9cfda86241cf65f8a SHA256 a0becf924b967ade8f319519e3ea0ae527ef749b319a5996407829fd79d56a24 +DIST dovecot-2.1.4.tar.gz 3748512 RMD160 b5df814f3aca6611a571a3ae16a8323be76128ea SHA1 fcb706f430bcc9d50575edb9ab302f470d8e75f7 SHA256 366be58966448ab3c4ad8f46bbc4bc7dcca2da475842128ae376ab123a2c7e69 EBUILD dovecot-1.2.17.ebuild 8779 RMD160 e7e72abbabba9b996c5c22b696064a9ea6be6e23 SHA1 abc5692a012d84b17efee7706fd53257106c9b37 SHA256 d98318a83549c639f579d039653a97ac1c41cd0da98f0d5524baa6a82593865d EBUILD dovecot-2.0.15.ebuild 8888 RMD160 cc5172a57be6bd944c3320ff46d305df49c85ac2 SHA1 6ccb2632f814a9a7c6e1b4db016fba99288915b8 SHA256 1ac5143e0384c8a4bdfa617aa5b59c66eef3104ca7818843836f073cebbcd69b EBUILD dovecot-2.0.16-r1.ebuild 8822 RMD160 c2ce983c76a557f04515118bcee8d716e5379dbb SHA1 36b29dc68f57fec8a314ffbfd82bacc0bd480fa3 SHA256 c542c8906b7f9f7baf7e13bbe1691b20b971b5a600898b0bf48319681ff271a2 @@ -27,16 +29,28 @@ EBUILD dovecot-2.0.16.ebuild 8809 RMD160 be475bd89f87cf2bab857febd4d2de968069548 EBUILD dovecot-2.0.17.ebuild 8811 RMD160 a09b341946bc896eef0ba3b4fbcf7b68844bb534 SHA1 8b3720783d417399386a52fdbf06c1c5dbaf0172 SHA256 caaf54a37f6be693c45dd7f654052d92f34bff492dd479965b665abf8ba1a37c EBUILD dovecot-2.0.18.ebuild 8819 RMD160 0ccf90a6a18847c61f5e04364309173330a08e17 SHA1 68c2817db52f3d182543821ec4c67e25b745da5c SHA256 ecbafef7e5093bc36ed6e0741b7ec3ddf4bd315ea8a3e8319ec0012a3417f733 EBUILD dovecot-2.0.19.ebuild 8819 RMD160 6f8d62c80fbe1737825c0d09986eb76383f19924 SHA1 539f7342dd5f389d7cf84aabae39cafbc796be11 SHA256 4a5ef8b7455b45f2109fd9fd0b6d1452af28bfb6eed3763c37326481ab3cbf25 +EBUILD dovecot-2.0.20.ebuild 8819 RMD160 900d7b84f5c766b1d906380ac7c394714d07d226 SHA1 a55a9018b61c680281f833e57c78cbc8c23762d7 SHA256 dda778e127884503bba4630eb7686e26ebcdfde951736df8305e71f052d8a76b EBUILD dovecot-2.1.0.ebuild 8991 RMD160 0453db88a26c332630a0337c0d83186b064eb7a7 SHA1 5b60a4feef3b11b7e1ca230c004d3f8c08536bd2 SHA256 10f4c89e4aaed1f41271edd61c208b1f19b78e6b07f8b15f325f90814fb4f942 EBUILD dovecot-2.1.1.ebuild 8991 RMD160 31a16e57b7fe073ae41a9609e774a0a7cf148a0a SHA1 a98ce62992698b2f571a31ebf548376c304d070f SHA256 2e5b856feb12c0c46da84b123f65f332a08ec2e55aaa8bb22b0dd6ba857548b2 EBUILD dovecot-2.1.2.ebuild 8489 RMD160 d311e2d1fc393573c186766ee9b1507ea317b312 SHA1 4966d7fcd64cd4867c9d869e6ab49175e79d2417 SHA256 622812590b0cd879a77913a6bb67055e2e2cfb10fb30df28ba418ce41c07d7e3 EBUILD dovecot-2.1.3.ebuild 8490 RMD160 a5fbf6e4caf1c0f224e3b13ed677bb0e5450a55f SHA1 4eccd9426bc49978469401741c57161fd959386b SHA256 cc0acbe852770555f117e36450a2807db70bace37822bffdc83a46b021aa1cb7 -MISC ChangeLog 54402 RMD160 b0bb848f62bcc4b9f92397805042e5ef9e2af06e SHA1 a0ab4e4e16a9a0a7b2b1398312c5c46af2c6a081 SHA256 c844b0faf9b5a82ef09389869407ed3ae3cceafcb8d5dd4e9917104dbae13aea +EBUILD dovecot-2.1.4.ebuild 8453 RMD160 6600a8d222fc963d96aea6a0e33c6f1be6913514 SHA1 fc9756855d6374bced8d47bf916640544c7ea221 SHA256 d68b205a11910f980ac77cb1d7dcc30eedb958bc575286220872738fb16684b5 +MISC ChangeLog 54568 RMD160 3a0acf63d574857cc6b7bf18af6db3c5ab91f65a SHA1 997056747a2b2c052e9d35c42106a775502eea72 SHA256 dfa5c0c74b5678681db632485a9a351f4410489bda2dd06c50ba54d85a794fad MISC metadata.xml 871 RMD160 8e53e66f2ad0b595ef424cf855c108d103a87f49 SHA1 ea5616a16a1cb3394600ad17a1422383acb100f5 SHA256 64805284b8602318ba8b8902d58adc8b4edacba0468037a9c8abae4aac46ddb8 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) +Version: GnuPG v2.0.19 (GNU/Linux) -iEYEARECAAYFAk9mMg8ACgkQuQc30/atMkDLuACfUsT1Wo4PhcurZb8GAducNOKZ -FtcAnAgOxuzfrRcjpjux7GhnAIK+6JdC -=GzAn +iQIcBAEBCAAGBQJPg6x1AAoJEHfx8XVYajsfNzoP/jGE0vpntD3Y6ypMmll41+In +3UGpWtJWh2RKYBb/8Q+aP6Ieu7+in6IixzyLMtdi/HpLdEXxCL3xxgNwzeJPtKYO +uE07lU3FKhhnjN8li1gHprwYEyYDxbNabDHv/NQypVbwKmN/jM13YTGOFOIdLfE2 +oUTrfLvsqnhFbtzlogAWxViELUHit7hDpUe+TOoQuYaeNVUwvwW5F5gamJWYy7ZP +WMsU9AgVT/fCf3LxAEBQ4GuweIGtns0+9B190MB1cReB2thl5j/zZsGSLMFvdcW3 +v6MON5y35YSQ6tm4YroUzg7DGrXzPlYnjlrO75JlMyOAfVpW52IPuQ0uUGYHcj00 +LLswqwWfUCg16/2AIOis01tpPUWZtAx5YkJ1PLP+JKOjk3lWbq6PPUdaVlDpqX7Y +wlhT25EvNZyIyv4JLfSHuiMtZ1a4FBAVZT6mT/PUjxdKBf2Xvi6ijiKpU8WkMDMZ +jc0Q071nUqldZrcmkRh7kVfORwT4MJfMy0SvQK9M5FTf4nUXB+I2SEJ+BgMwaCAV +CMIRdwuKN9MWyPGSrE8czL0vKNhFVIrDvPgTUo8NgSMsKFRAZAp95jwYSofgW4Rz +3znn5y1S5wTv4pHWYu2Z5qAxusUPQhveZTmCtzoPUkdiBq9qmT+MsosoMiJS8YXR +vpzgFzCzQ4h9rhTzD7Ht +=1nPz -----END PGP SIGNATURE----- diff --git a/net-mail/dovecot/dovecot-2.0.20.ebuild b/net-mail/dovecot/dovecot-2.0.20.ebuild new file mode 100644 index 000000000000..c1ed4fafa4e2 --- /dev/null +++ b/net-mail/dovecot/dovecot-2.0.20.ebuild @@ -0,0 +1,281 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.0.20.ebuild,v 1.1 2012/04/10 03:43:35 eras Exp $ + +EAPI=4 + +inherit eutils versionator ssl-cert + +MY_P="${P/_/.}" +major_minor="$( get_version_component_range 1-2 )" +sieve_version="0.2.6" +SRC_URI="http://dovecot.org/releases/${major_minor}/${MY_P}.tar.gz + sieve? ( + http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.tar.gz + ) + managesieve? ( + http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_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" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" + +IUSE="bzip2 caps cydir sdbox doc ipv6 kerberos ldap +maildir managesieve mbox +mdbox mysql pam postgres sieve sqlite +ssl static-libs suid vpopmail zlib" + +DEPEND="caps? ( sys-libs/libcap ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + mysql? ( virtual/mysql ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql-base !dev-db/postgresql-base[ldap,threads] ) + sqlite? ( dev-db/sqlite ) + ssl? ( dev-libs/openssl ) + vpopmail? ( net-mail/vpopmail ) + virtual/libiconv" + +RDEPEND="${DEPEND} + >=net-mail/mailbase-0.00-r8" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use managesieve && ! use sieve; then + ewarn "managesieve USE flag selected but sieve USE flag unselected" + ewarn "sieve USE flag will be turned on" + fi + + # Add user and group for login process (same as for fedora/redhat) + # default internal user + enewgroup dovecot 97 + enewuser dovecot 97 -1 /dev/null dovecot + # add "mail" group for suid'ing. Better security isolation. + if use suid; then + enewgroup mail + fi + # default login user + enewuser dovenull -1 -1 /dev/null +} + +src_configure() { + local conf="" + + if use postgres || use mysql || use sqlite; then + conf="${conf} --with-sql" + fi + + local storages="" + for storage in cydir sdbox mdbox maildir mbox; do + use ${storage} && storages="${storage} ${storages}" + done + [ "${storages}" ] || storages="maildir" + + # turn valgrind tests off. Bug #340791 + VALGRIND=no econf \ + --localstatedir="${EPREFIX}/var" \ + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ + $( use_with bzip2 bzlib ) \ + $( use_with caps libcap ) \ + $( use_with kerberos gssapi ) \ + $( use_with ldap ) \ + $( use_with mysql ) \ + $( use_with pam ) \ + $( use_with postgres pgsql ) \ + $( use_with sqlite ) \ + $( use_with ssl ) \ + $( use_with vpopmail ) \ + $( use_with zlib ) \ + $( use_enable static-libs static ) \ + --with-storages="${storages}" \ + --disable-rpath \ + --without-systemdsystemunitdir \ + ${conf} + + if use sieve || use managesieve ; 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}-pigeonhole-${sieve_version}" || die "cd failed" + econf \ + $( use_enable static-libs static ) \ + --localstatedir="${EPREFIX}/var" \ + --enable-shared \ + --with-dovecot="../${MY_P}" \ + $( use_with managesieve ) + fi +} + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + fi +} + +src_test() { + default_src_test + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + default_src_test + fi +} + +src_install () { + emake DESTDIR="${ED}" install + + # insecure: + # use suid && fperms u+s /usr/libexec/dovecot/deliver + # better: + if use suid;then + einfo "Changing perms to allow deliver to be suided" + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fi + + newinitd "${FILESDIR}"/dovecot.init-r3 dovecot + + rm -rf "${ED}"/usr/share/doc/dovecot + + dodoc AUTHORS NEWS README TODO + dodoc doc/*.{txt,cnf,xml,sh} + docinto example-config + dodoc doc/example-config/*.{conf,ext} + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.{conf,ext} + docinto wiki + dodoc doc/wiki/* + doman doc/man/*.{1,7} + + # Create the dovecot.conf file from the dovecot-example.conf file that + # the dovecot folks nicely left for us.... + local conf="${ED}/etc/dovecot/dovecot.conf" + local confd="${ED}/etc/dovecot/conf.d" + + insinto /etc/dovecot + doins doc/example-config/*.{conf,ext} + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/*.{conf,ext} + fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext + rm -f "${confd}/../README" + + # .maildir is the Gentoo default + local mail_location="maildir:~/.maildir" + if ! use maildir; then + 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|' \ + "${confd}/10-mail.conf" || die "sed failed" + elif use sdbox ; then + mail_location="sdbox:~/.sdbox" + elif use mdbox ; then + mail_location="mdbox:~/.mdbox" + fi + fi + sed -i -e \ + "s|#mail_location =|mail_location = ${mail_location}|" \ + "${confd}/10-mail.conf" \ + || die "failed to update mail location settings in 10-mail.conf" + + # We're using pam files (imap and pop3) provided by mailbase + if use pam; then + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ + "${confd}/auth-system.conf.ext" \ + || die "failed to update PAM settings in auth-system.conf.ext" + # mailbase does not provide a sieve pam file + use managesieve && dosym imap /etc/pam.d/sieve + sed -i -e \ + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update PAM settings in 10-auth.conf" + fi + + # Disable ipv6 if necessary + 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 = yes:ssl = yes:' "${confd}/10-ssl.conf" \ + || die "ssl conf failed" + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" + fi + + # Install SQL configuration + if use mysql || use postgres; then + sed -i -e \ + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ + "${confd}/10-auth.conf" || die "failed to update SQL settings in \ + 10-auth.conf" + fi + + # Install LDAP configuration + if use ldap; then + sed -i -e \ + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update ldap settings in 10-auth.conf" + fi + + if use vpopmail; then + sed -i -e \ + 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update vpopmail settings in 10-auth.conf" + fi + + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake DESTDIR="${ED}" install + sed -i -e \ + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ + || die "failed to update sieve settings in 15-lda.conf" + rm -rf "${ED}"/usr/share/doc/dovecot + dodoc doc/*.txt + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.conf + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/90-sieve.conf + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf + docinto sieve/rfc + dodoc doc/rfc/*.txt + docinto sieve/devel + dodoc doc/devel/DESIGN + doman doc/man/*.{1,7} + fi + + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete +} + +pkg_preinst() { + if has_version "<${CATEGORY}/${PN}-2" ; then + elog "There are a lot of changes in configuration files in dovecot-2.0." + elog "Please read http://wiki.dovecot.org/Upgrading and" + elog "check the conf files in ${ROOT}etc/dovecot." + elog "You can also run doveconf -n before running etc-update or" + elog "dispatch-conf to get an idea about what needs to be changed." + ewarn "\nDo NOT {re}start dovecot without checking your conf files" + ewarn "and making the necessary changes.\n" + fi +} + +pkg_postinst() { + if use ssl; then + # 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 + einfo "Creating SSL certificate" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" + install_cert /etc/ssl/dovecot/server + fi + fi +} diff --git a/net-mail/dovecot/dovecot-2.1.4.ebuild b/net-mail/dovecot/dovecot-2.1.4.ebuild new file mode 100644 index 000000000000..d0a580c6a62e --- /dev/null +++ b/net-mail/dovecot/dovecot-2.1.4.ebuild @@ -0,0 +1,275 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.1.4.ebuild,v 1.1 2012/04/10 03:43:35 eras Exp $ + +EAPI=4 + +inherit eutils versionator ssl-cert systemd + +MY_P="${P/_/.}" +major_minor="$( get_version_component_range 1-2 )" +sieve_version="0.3.0" +SRC_URI="http://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz + sieve? ( + http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.tar.gz + ) + managesieve? ( + http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_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" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" + +IUSE="bzip2 caps cydir sdbox doc ipv6 imapc kerberos ldap lucene +maildir managesieve mbox +mdbox mysql pam postgres sieve sqlite +ssl static-libs suid vpopmail zlib" + +DEPEND="caps? ( sys-libs/libcap ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + lucene? ( >=dev-cpp/clucene-2.3 ) + mysql? ( virtual/mysql ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql-base !dev-db/postgresql-base[ldap,threads] ) + sqlite? ( dev-db/sqlite ) + ssl? ( dev-libs/openssl ) + vpopmail? ( net-mail/vpopmail ) + virtual/libiconv" + +RDEPEND="${DEPEND} + >=net-mail/mailbase-0.00-r8" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use managesieve && ! use sieve; then + ewarn "managesieve USE flag selected but sieve USE flag unselected" + ewarn "sieve USE flag will be turned on" + fi + + # Add user and group for login process (same as for fedora/redhat) + # default internal user + enewgroup dovecot 97 + enewuser dovecot 97 -1 /dev/null dovecot + # add "mail" group for suid'ing. Better security isolation. + if use suid; then + enewgroup mail + fi + # default login user + enewuser dovenull -1 -1 /dev/null +} + +src_configure() { + local conf="" + + if use postgres || use mysql || use sqlite; then + conf="${conf} --with-sql" + fi + + local storages="" + for storage in cydir sdbox mdbox maildir mbox imapc; do + use ${storage} && storages="${storage} ${storages}" + done + [ "${storages}" ] || storages="maildir" + + # turn valgrind tests off. Bug #340791 + VALGRIND=no econf \ + --localstatedir="${EPREFIX}/var" \ + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ + $( use_with bzip2 bzlib ) \ + $( use_with caps libcap ) \ + $( use_with kerberos gssapi ) \ + $( use_with ldap ) \ + $( use_with lucene ) \ + --without-stemmer \ + $( use_with mysql ) \ + $( use_with pam ) \ + $( use_with postgres pgsql ) \ + $( use_with sqlite ) \ + $( use_with ssl ) \ + $( use_with vpopmail ) \ + $( use_with zlib ) \ + $( use_enable static-libs static ) \ + --with-storages="${storages}" \ + --disable-rpath \ + $(systemd_with_unitdir) \ + ${conf} + + if use sieve || use managesieve ; 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 + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + econf \ + $( use_enable static-libs static ) \ + --localstatedir="${EPREFIX}/var" \ + --enable-shared \ + --with-dovecot="../${MY_P}" \ + $( use_with managesieve ) + fi +} + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + fi +} + +src_test() { + default_src_test + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + default_src_test + fi +} + +src_install () { + emake DESTDIR="${ED}" install + + # insecure: + # use suid && fperms u+s /usr/libexec/dovecot/deliver + # better: + if use suid;then + einfo "Changing perms to allow deliver to be suided" + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fi + + newinitd "${FILESDIR}"/dovecot.init-r3 dovecot + + rm -rf "${ED}"/usr/share/doc/dovecot + + dodoc AUTHORS NEWS README TODO + dodoc doc/*.{txt,cnf,xml,sh} + docinto example-config + dodoc doc/example-config/*.{conf,ext} + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.{conf,ext} + docinto wiki + dodoc doc/wiki/* + doman doc/man/*.{1,7} + + # Create the dovecot.conf file from the dovecot-example.conf file that + # the dovecot folks nicely left for us.... + local conf="${ED}/etc/dovecot/dovecot.conf" + local confd="${ED}/etc/dovecot/conf.d" + + insinto /etc/dovecot + doins doc/example-config/*.{conf,ext} + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/*.{conf,ext} + fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext + rm -f "${confd}/../README" + + # .maildir is the Gentoo default + local mail_location="maildir:~/.maildir" + if ! use maildir; then + 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|' \ + "${confd}/10-mail.conf" || die "sed failed" + elif use sdbox ; then + mail_location="sdbox:~/.sdbox" + elif use mdbox ; then + mail_location="mdbox:~/.mdbox" + fi + fi + sed -i -e \ + "s|#mail_location =|mail_location = ${mail_location}|" \ + "${confd}/10-mail.conf" \ + || die "failed to update mail location settings in 10-mail.conf" + + # We're using pam files (imap and pop3) provided by mailbase + if use pam; then + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ + "${confd}/auth-system.conf.ext" \ + || die "failed to update PAM settings in auth-system.conf.ext" + # mailbase does not provide a sieve pam file + use managesieve && dosym imap /etc/pam.d/sieve + sed -i -e \ + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update PAM settings in 10-auth.conf" + fi + + # Disable ipv6 if necessary + 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 = yes:ssl = yes:' "${confd}/10-ssl.conf" \ + || die "ssl conf failed" + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" + fi + + # Install SQL configuration + if use mysql || use postgres; then + sed -i -e \ + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ + "${confd}/10-auth.conf" || die "failed to update SQL settings in \ + 10-auth.conf" + fi + + # Install LDAP configuration + if use ldap; then + sed -i -e \ + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update ldap settings in 10-auth.conf" + fi + + if use vpopmail; then + sed -i -e \ + 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update vpopmail settings in 10-auth.conf" + fi + + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake DESTDIR="${ED}" install + sed -i -e \ + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ + || die "failed to update sieve settings in 15-lda.conf" + rm -rf "${ED}"/usr/share/doc/dovecot + dodoc doc/*.txt + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.conf + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/90-sieve.conf + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf + docinto sieve/rfc + dodoc doc/rfc/*.txt + docinto sieve/devel + dodoc doc/devel/DESIGN + doman doc/man/*.{1,7} + fi + + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete +} + +pkg_postinst() { + if use ssl; then + # 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 + einfo "Creating SSL certificate" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" + install_cert /etc/ssl/dovecot/server + fi + fi + + elog "Upgrade notes can be found at:" + elog "\thttp://wiki2.dovecot.org/Upgrading" +} |