summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2015-03-23 15:54:49 +0000
committerEray Aslan <eras@gentoo.org>2015-03-23 15:54:49 +0000
commit7e5a92614f629ea76beca85b47c642e3cb408465 (patch)
treee42ab81296945f80902acf5946e209594e30b62b /net-mail
parentDrop myself as maintainer. (diff)
downloadhistorical-7e5a92614f629ea76beca85b47c642e3cb408465.tar.gz
historical-7e5a92614f629ea76beca85b47c642e3cb408465.tar.bz2
historical-7e5a92614f629ea76beca85b47c642e3cb408465.zip
Version bump
Package-Manager: portage-2.2.18/cvs/Linux x86_64 Manifest-Sign-Key: 0x77F1F175586A3B1F
Diffstat (limited to 'net-mail')
-rw-r--r--net-mail/dovecot/ChangeLog9
-rw-r--r--net-mail/dovecot/Manifest25
-rw-r--r--net-mail/dovecot/dovecot-2.2.16.ebuild296
3 files changed, 323 insertions, 7 deletions
diff --git a/net-mail/dovecot/ChangeLog b/net-mail/dovecot/ChangeLog
index 7658c7f70558..aa884e0262f6 100644
--- a/net-mail/dovecot/ChangeLog
+++ b/net-mail/dovecot/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-mail/dovecot
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.500 2014/12/28 16:33:27 titanofold Exp $
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.501 2015/03/23 15:54:38 eras Exp $
+
+*dovecot-2.2.16 (23 Mar 2015)
+
+ 23 Mar 2015; Eray Aslan <eras@gentoo.org> +dovecot-2.2.16.ebuild:
+ Version bump
28 Dec 2014; Aaron W. Swenson <titanofold@gentoo.org> dovecot-2.2.9.ebuild,
dovecot-2.2.13.ebuild, dovecot-2.2.13-r1.ebuild, dovecot-2.2.14.ebuild,
diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
index 3cbcd65a8bee..1e5fce992ca2 100644
--- a/net-mail/dovecot/Manifest
+++ b/net-mail/dovecot/Manifest
@@ -9,9 +9,11 @@ DIST dovecot-2.2-pigeonhole-0.4.3.tar.gz 1184029 SHA256 d692f4ab077bdf2c43c98829
DIST dovecot-2.2-pigeonhole-0.4.4.tar.gz 1235456 SHA256 e08c5a45f359afa34b27571e14d79de753d73d47b8e72c5142064c6fd047f93e SHA512 76b635f5213ac61161734040fed0a3d32643190f9fb8fbcbf166c797953bb09f1414e2c994c86dd965e215a79f7f1898cfcd586d02782df9ac3c6d6781bd079e WHIRLPOOL a30032e96cee2f9e4b427f7beb6986b943c829d0c6d55352d9cf7b9372c8b86b95747f637691b481fbc41aefda0b30bf9283369bc3ccd1c5114d446ff7f924da
DIST dovecot-2.2-pigeonhole-0.4.5.tar.gz 1239438 SHA256 020a4795ca9cd528394cd55e87714776aeb396b943411dce86cb9945a68ff419 SHA512 faf369662ed3498589804e09391ef17128c834a88f2ef0a5aa6150f53c8ef512f8862a7550e47d45ef09e7ea1a0784b43025d45e83c4dd7475d04bdfba30c58d WHIRLPOOL b07c33c9830e6b127d472dca9dbed8dfffa3344d85ef5a4d4bcc51324431cb95a48c890706c16e059c5c8bc8e35ae9ab628d51aaab63f01db08769b02cb5710f
DIST dovecot-2.2-pigeonhole-0.4.6.tar.gz 1240368 SHA256 91034669f9ce07661bbadcfb00fe50b6929bf7f616d9aa79d3f5a351d1a47d3d SHA512 50b0df4438f6fc751a7dd058919628a2f3bc631c119e86356495d7de94d24b9f9cc8c11fa5e3646bc2429170bf3c9473d42542ee8b15b7c94a1502bb76042b9e WHIRLPOOL 00f32f01bc5298a5ee428b920e4489b2234ce48db2d0603008b11f2ab0f9e45a280ec2d3b2bedeb28ce3baf3401c8231a49a973792da76ac81643ffc4b551898
+DIST dovecot-2.2-pigeonhole-0.4.7.tar.gz 1271959 SHA256 04a13ec11652cbff812519eacf4db7dda648ab5c4c5f63b43a437d1fb0cc8d2a SHA512 df1b4c5591ce36dc99a9e5fb0281d1d11e95b7bf37594910c5730ac611dafb744f057dc87416ff638d582191376d210bca63cc548bf34612144cae2ac6e9448d WHIRLPOOL 76b500f935ae2133e70affaf12a3fd3c158b60bd5903b160f7f3a63478b092b57cee6046d0b9afb10bf83ec4b869592ea632031cca75c4bff00f5c58b7fe23f6
DIST dovecot-2.2.13.tar.gz 4613824 SHA256 133cf3d2aa81733f6688ec986c91dbe07602fad81e856ba3d8046ffca85d9dce SHA512 1f3c0e600048ac2c1b2e497286620976c0fc821a6cac8e4e1492180af8eb9620cd143c89ee6d12872cecacbcadca573435cce1050c46325de3072c98ab5a9331 WHIRLPOOL 7bb81575faf69820b07d654c469fdd3fcf12c47517bb1dd6ea5566771bb60ce8f9c3a1a7b5c6df6d5f4b903d10472ffa1cca1a01c7fd158b6055794a44aacf39
DIST dovecot-2.2.14.tar.gz 4720087 SHA256 68ac0fa105c6041129a1fe83ccf4915982d03d41d99054567892cc0fbd68ebf0 SHA512 640edfc0f6d2261485f366a6b4139bdb09f25a26439ee22573e09aeffa5f47106b0acb036c673839de12f76e6490c383ab6c7320ca85747c51c4f4757e120d24 WHIRLPOOL e32e9450db8bc4cd8aa84e81bf8aa9121b9a44a981b7cdbe5a52f986b866bbcc4078fc536fa88ae2c96d1f3666bf174ce22bef34cae05a279debab1855c9e9e6
DIST dovecot-2.2.15.tar.gz 4747444 SHA256 d10e7769e2367d635c93fd6589efdd05f2e3acf13c7911a40167faedf23c399f SHA512 4d84744a23f21dd0923e86fdb1604a0a431e7c1a579f8323fb6643f92ac84754389e5a91fc8e8b53eac4202dba7f8541aa13ada12265e397ecdc15ff9b5c7ada WHIRLPOOL 3cccf5d6014baf8f7b66ab9fa7e90cf27001ab8842db3f1d2814b94b05fba5827103eccf7e07253632a58f8ed2a492d693bff070fd2a1a40c8016ec63b4abc2a
+DIST dovecot-2.2.16.tar.gz 4830169 SHA256 56ce1287a17fa88a2083116db00200deff1a5390af5eac1c8ae3f59a2079cff0 SHA512 7e910a58cae6d215169a815423bffd1677663ccb1eb400f7f1e733167c29989f3c6786a2d6cea0ef07e64cb08aa1402adb451e0adbbb999f57b3754c0962dbf8 WHIRLPOOL 22b3911e7efa336da792c2af0dde4e556d6c398d9b9f8127e53b13081777b40846a0324b92bc0b41bfd66b6957c6baaeb4e79bd39bf9ba6e91f9e2726a9575a4
DIST dovecot-2.2.9.tar.gz 4540858 SHA256 7c3b6b8a05f6ebcc9fd01736fdcac0de12158959f5b99d1f7077f7a8626ee2d5 SHA512 41f826df22d3b34116de7abaa4543cbcf9362d7db1348e3b685019263b89d0ffe8bf0c1ddf21e4baa3bb7e98c87047b85b6fec78873df7f0db18ccecf63cea55 WHIRLPOOL 775cdbca9be788b1d20cd7f45e4d9a6265936b39a780b2232efa84958fa75a11f0984f680249e2af5faf40c9c91fa5c57026b55865dcaeddabcc90d44e3b6fae
EBUILD dovecot-2.2.13-r1.ebuild 8912 SHA256 22954359d8aacf718526dc70dffe51292f53cb9b03ecb729a82eeffd2e1f624e SHA512 42a452c04cb4414a0bab7b40ee291d8f02beaf8bc81d5380b9e434f8e2bedb626e79428ebb7342b577125da9f1a0e7f9677bf66d3b300d23c007e39516aa9fd0 WHIRLPOOL 6484ba28dbaefb5f6e8b8d41d8b94f16103fc40c952a333d4eb0fa02f7d0f213a1744e26dfda256662b6fd58385fa2d7c7513b3341418d58d686e7c34f685809
EBUILD dovecot-2.2.13.ebuild 8891 SHA256 9b90722fc45e0e769aaf36486bf1d1a550116da67e581ae08417b7006528f199 SHA512 c7406631ec7504796952284e32f8fe69d54a6c540ba085bdaa69458aa0f1e887dbd06e4d2c1aaafa320718f6ae0c35109f8833505fbd21b9f37d90f36457bd0d WHIRLPOOL 437eff164200119a397960eca85a2d3a771e712bd7f1cc215f2bee9b225bda2405c56090b42e9a2f616dd1274e77cdba8c08f7ec2786e8c5100fdb8818f69f2b
@@ -21,13 +23,26 @@ EBUILD dovecot-2.2.15-r1.ebuild 9131 SHA256 c280876ad38cd75f7db0f56f756ec7387b6f
EBUILD dovecot-2.2.15-r2.ebuild 8941 SHA256 098b838996910ebb14ab8d023dd212b3bfa3b66373bb45734b5362672dc5cea3 SHA512 effee8f6199d247c651cc839975e13fb3f1c7a968e22977df8e31dc364e23a9bba8b591277503c33ea86762659b998d2444ec2982c4aad065e71fb419123c802 WHIRLPOOL aee1f364cb89e74c970b73ecb748f6424bb59f1986436a64c4cc784bdce549635ccb6aedf8bc2098100519f10143911cab3e1e3878dffb53c2743bde5e95f702
EBUILD dovecot-2.2.15-r3.ebuild 8976 SHA256 187b66130f3d71db9ec7c92d7e60dd123da2ffe8b6315d52c96f2dbc1549f415 SHA512 4ec59dbd7d3667bccf97774612748c8a39eb8fa4f8c05a496357354c88bfdcd28468b750f46a52551ce321cc15038e6b5db9594e5bb49135e462ecfb9981711d WHIRLPOOL 1f3feb1b5b565fdb80858e4dfb9532d9caaff1f578e8936a4b77fcc7b1a1c985b9ad67420f2895a070073b7f0845136fe3b21ef0b7048789855eee9ace29f6ce
EBUILD dovecot-2.2.15.ebuild 8928 SHA256 0a32bd5b88002c82aaf62995a570970ee791c9429cce6fc974c2ba7a38379489 SHA512 aedb10247a7cb832ecf97dec1c1f200939a03e1de0ec015a1bf8747a6e950911913993bea6356c5b0d8199c6a71659a3e078c53386debf7a8e6ad37cace86601 WHIRLPOOL d1f4ddc9f322f90b434f133749f7bc8425134f6f47b5b913a729bf9bf4e9095ecf7bcb5b159a2ca2910cc249b82e5ce5e58897462825620fa41a165b48b85903
+EBUILD dovecot-2.2.16.ebuild 8973 SHA256 0b17860989f6393d71a99e6f04b9e12dc73b1a26ad931324cd03fc4e5b0be109 SHA512 d5fd428948042bcec2a13a3bfaa19f2939ff5ce2f9e98374bd2ae17fe6a318fec40e6fb932d9234849c70fabb07e7fce50c20ef1d9ba63ff1b0eb8d1c470efc1 WHIRLPOOL 55df2b4bdcae1fe8d114435b20f21a46f55d357e7b4577fc971e7c1faa556f7ba0119009db5890a393ee229a176d2e800faff31209e2b5ff0cd035997beca137
EBUILD dovecot-2.2.9.ebuild 8619 SHA256 39c03397415304be588ee4a0539bdf87f27a71b07b13563bf0fd5a7bb53fcace SHA512 c55803bde7cdac61939f115c284148eba8697dacd863676267cb90d171eb01e452e397a6521daa9b240a3e214b9f40bd3773a88bbd753eaa42da8ebcd516a016 WHIRLPOOL f9e219d3d8d5136b17bc8d6d349f4143126a974415ddc2219285be8d30401afd8013c1ffb786dca5ecdbe55307fb2d6c56f65cfbfba1704b61003a979769173f
-MISC ChangeLog 73722 SHA256 b5898848951d19898dc071b1caf410b1da9ed1ded9ddb7695de89528a5f5662c SHA512 5d0dbe0aa92eb85a660cb64592dfd59ebd8ab01bb19770ab07b210bc8d73ad2049658e85c37ffa42c61ca2853658998eac20acd4a9c871476493379f817c8442 WHIRLPOOL 53ba6fe8973212b4947f750767430d3149844105bbf90a362f95f956371358b92c28f190ffb454a0710989ceaad1838987ccbae059c58cafafb42c760eabe4bd
+MISC ChangeLog 73831 SHA256 5c426439abd89d83082cf707ba150a53e7895ebed2165c3888e5fc3b0ccbff3c SHA512 01f3a667ba528aa250a203f26990726d8aef344e9ceed698753019ca0185e9b728ed79a684718d936acec251ebf3017cdee3ba5b6029d80ec28e5b95884d80fb WHIRLPOOL a853eb094af926336d814837d73d250b9ca60b493c2bf518446a0549521c29828064fe98d83b77f2921dc03051fc36e5ea0648c1740016614707b19788cc0d59
MISC metadata.xml 1078 SHA256 cad311926efedde5a689ae18496389ca80a1e4c5b4b16f1bfb456e8e27ce118c SHA512 f208e189f4901e1385d4c237cb7c91f333021b7bc4656d8b8365d7f6d827dc3a3e7ef58963baec88f399ffea505577e94e7901c5e58119e5952736f1c129e4bb WHIRLPOOL d94e39a391cf3ce8c31647d55a387c6102e244fcc3ebdb34909024f8b2faecf7a225552c77dbc5d841ac45f2583ec38b7f8e18e9eee92fbc702210dbdb581740
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2
+Version: GnuPG v2.0
-iF4EAREIAAYFAlSgMNoACgkQVxOqA9G7/aAFJAD/fSajckVEMgJ+rkRgaNXjgYq3
-BV1BkcFDfOdjXdAJ8lMA/A/8X1Yi5taF9JVfDxorVOj83l8sJKg6Gj2gVJSTqxd/
-=XS4Q
+iQJ8BAEBCABmBQJVEDdwXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBQjk1NkM0NUMxNzFCRTY4Rjk4NENDMDk3
+N0YxRjE3NTU4NkEzQjFGAAoJEHfx8XVYajsfPqkQAJvz0MB0xO4o2chGyHNKNZxK
+XgeuzmT/859XSd2xDDzYfUu8hVCw//HH49P1YpImMl5Fd1tWZt3nwMOo9c7l3Kcd
+n5YJiYG55i2rIUjjcoErMVDlG0YnFwwiTDwBIc1dPBsLvJNfsubJPTHDOZDTIVF6
+9U9DYnxAKFbyP0dkrdvnhifeSdhLusm5hAs0igRzI7ycxY8Y7pWCvYf2AsjL9Rid
+6D0XwAFKG1W07yrStTpdIcV8bPgLJeP9YV8SoLxHVNaXENH51tpz+0KNzlNEnrqu
+KFulVJbeFT7njUNupLAAJEbYG7qKZvCu9snibxiQvLdrzUf6CizmU+QtU4eBQN6s
+EBLKXYKBMroTc3xmbuMFS1gjEyFUI17A0Nh5kvja5Rj4Km11mqMV2sASYikq7Wxo
+WF4aiXxuJunOgP9kaKMioHyqYc41ZpnLhRxrMaP95PHt/f12ewYqBrVNDYQAmYT3
+IItAeDSVh+h/JOb7Ts89dchBsLdJARh0yCUAJfrrSUVDawaz84qJx2Y54uOx7EOu
+DnXs++MOzdnCkoMdWW4gIU7rao+yxh0t4xGjG6g0VbA39c5uuhUQZ9+TRiwJ0F9Z
+ZEIwnLSEfAf0KuC504feBCUMztKOSJFHOP4rUpxt2WKF24sLxWMCzvOeP6GMY3gf
+lSRnSTx+3JnKgycEB87l
+=7n+F
-----END PGP SIGNATURE-----
diff --git a/net-mail/dovecot/dovecot-2.2.16.ebuild b/net-mail/dovecot/dovecot-2.2.16.ebuild
new file mode 100644
index 000000000000..1248ef9ab908
--- /dev/null
+++ b/net-mail/dovecot/dovecot-2.2.16.ebuild
@@ -0,0 +1,296 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.2.16.ebuild,v 1.1 2015/03/23 15:54:38 eras Exp $
+
+EAPI=5
+inherit eutils multilib ssl-cert systemd user versionator
+
+MY_P="${P/_/.}"
+major_minor="$(get_version_component_range 1-2)"
+sieve_version="0.4.7"
+if [[ ${PV} == *_rc* ]] ; then
+ rc_dir="rc/"
+else
+ rc_dir=""
+fi
+SRC_URI="http://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
+ sieve? (
+ http://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
+ )
+ managesieve? (
+ http://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-${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 ~x86"
+
+IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
+IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox"
+IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib"
+IUSE_DOVECOT_OTHER="caps doc ipv6 lucene managesieve selinux sieve solr +ssl static-libs suid tcpd"
+
+IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
+
+DEPEND="bzip2? ( app-arch/bzip2 )
+ caps? ( sys-libs/libcap )
+ kerberos? ( virtual/krb5 )
+ ldap? ( net-nds/openldap )
+ lucene? ( >=dev-cpp/clucene-2.3 )
+ lzma? ( app-arch/xz-utils )
+ lz4? ( app-arch/lz4 )
+ mysql? ( virtual/mysql )
+ pam? ( virtual/pam )
+ postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] )
+ selinux? ( sec-policy/selinux-dovecot )
+ solr? ( net-misc/curl dev-libs/expat )
+ sqlite? ( dev-db/sqlite:* )
+ ssl? ( dev-libs/openssl:* )
+ tcpd? ( sys-apps/tcp-wrappers )
+ vpopmail? ( net-mail/vpopmail )
+ zlib? ( sys-libs/zlib )
+ virtual/libiconv"
+
+RDEPEND="${DEPEND}
+ net-mail/mailbase"
+
+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
+ # default internal user
+ enewgroup dovecot 97
+ enewuser dovecot 97 -1 /dev/null dovecot
+ # default login user
+ enewuser dovenull -1 -1 /dev/null
+ # add "mail" group for suid'ing. Better security isolation.
+ if use suid; then
+ enewgroup mail
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-10-ssl.patch"
+
+ epatch_user
+}
+
+src_configure() {
+ local conf=""
+
+ if use postgres || use mysql || use sqlite; then
+ conf="${conf} --with-sql"
+ fi
+
+ local storages=""
+ for storage in ${IUSE_DOVECOT_STORAGE//+/}; 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" \
+ --without-stemmer \
+ --with-storages="${storages}" \
+ --disable-rpath \
+ $( systemd_with_unitdir ) \
+ $( use_with bzip2 bzlib ) \
+ $( use_with caps libcap ) \
+ $( use_with kerberos gssapi ) \
+ $( use_with ldap ) \
+ $( use_with lucene ) \
+ $( use_with lz4 ) \
+ $( use_with lzma ) \
+ $( use_with mysql ) \
+ $( use_with pam ) \
+ $( use_with postgres pgsql ) \
+ $( use_with sqlite ) \
+ $( use_with solr ) \
+ $( use_with ssl ) \
+ $( use_with tcpd libwrap ) \
+ $( use_with vpopmail ) \
+ $( use_with zlib ) \
+ $( use_enable static-libs static ) \
+ ${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() {
+ default
+ 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
+ if use sieve || use managesieve ; then
+ cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
+ default
+ fi
+}
+
+src_install () {
+ default
+
+ # 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-r4 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 mdbox ; then
+ mail_location="mdbox:~/.mdbox"
+ elif use sdbox ; then
+ mail_location="sdbox:~/.sdbox"
+ 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{,-extprograms}.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 "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
+}