Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/dovecot/
Date: Thu, 16 Mar 2023 06:54:44
Message-Id: 1678949654.f49a83e44c7fc73db0161d4374ec54728588e284.eras@gentoo
1 commit: f49a83e44c7fc73db0161d4374ec54728588e284
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 16 06:54:14 2023 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 16 06:54:14 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f49a83e4
7
8 net-mail/dovecot: drop 2.3.19.1-r1, 2.3.20
9
10 Signed-off-by: Eray Aslan <eras <AT> gentoo.org>
11
12 net-mail/dovecot/Manifest | 2 -
13 net-mail/dovecot/dovecot-2.3.19.1-r1.ebuild | 303 ----------------------------
14 net-mail/dovecot/dovecot-2.3.20.ebuild | 298 ---------------------------
15 3 files changed, 603 deletions(-)
16
17 diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest
18 index f9c30dc3be78..96a72bfc0db3 100644
19 --- a/net-mail/dovecot/Manifest
20 +++ b/net-mail/dovecot/Manifest
21 @@ -1,4 +1,2 @@
22 -DIST dovecot-2.3-pigeonhole-0.5.19.tar.gz 1954148 BLAKE2B 0c52293f9447260f3e95f31c5ea3c04a1971b1a5621b56be1c79a8575aceb4f7e7fef62e7d0a3d980dcb5b8e1a8eeec543adcf0b016b65eb34ca4a26e8d2fe23 SHA512 5b0a61c7711232ea3651b818a970b500b05bd340a04bcd5a5f0ea0529eda65f498912a845c8f3b3b80196d010bc22bd4a380e1f682cb42f62b80d2d43a94993a
23 DIST dovecot-2.3-pigeonhole-0.5.20.tar.gz 1945126 BLAKE2B 6845896f9bcfb26f74b0ecbc8109cfc2cd67492742aea2459cd74695d165c6009552b7178f370e06281440270829decc3f5fad9590b984ca3ff10267f4cf3e02 SHA512 45683e6bd678db00fc3e3c61d27a264d30d0e9aeb9ceb7ab55f94f0317d387056fa092e266062117cbe2a9dc2c90ddca03d154e78aad9c0d61fe8cf2c9187603
24 -DIST dovecot-2.3.19.1.tar.gz 7790851 BLAKE2B 6826977a0febfcb56eb99baf6e0dc0a130fc24a14f113ca7ce0f72b26b8c9755d8352999c5965e21320a62621787e02428c99dd6888768e8c35a46e4082ba071 SHA512 ceb87a5f76b6352d28fd030aae5ad2165a133e9a8a6309891e793911203fc0ada9fb254dc05d183eaaa7e2b9851d3f1755b33f08fa6ff5b4b415ac4272bfe150
25 DIST dovecot-2.3.20.tar.gz 7805735 BLAKE2B e041c68a8c2b4b1068f526554d92caa5806a4d3854cc4a287633e4702f764b68922e368426b1bb395c9dab92183e9568f8c8b6ff5491a39f1a28e818be1afec8 SHA512 20c5a9cacf2c22d99d46400b666206e5b153c35286c205eec5df4d2ce0c88cf29ea15df81716794fd75837f6d67dfa4037096cf4bb66f524877a9a0a6bb282c8
26
27 diff --git a/net-mail/dovecot/dovecot-2.3.19.1-r1.ebuild b/net-mail/dovecot/dovecot-2.3.19.1-r1.ebuild
28 deleted file mode 100644
29 index 589a8205f088..000000000000
30 --- a/net-mail/dovecot/dovecot-2.3.19.1-r1.ebuild
31 +++ /dev/null
32 @@ -1,303 +0,0 @@
33 -# Copyright 1999-2022 Gentoo Authors
34 -# Distributed under the terms of the GNU General Public License v2
35 -
36 -EAPI=8
37 -
38 -LUA_COMPAT=( lua5-1 lua5-3 )
39 -# do not add a ssl USE flag. ssl is mandatory
40 -SSL_DEPS_SKIP=1
41 -inherit autotools flag-o-matic lua-single ssl-cert systemd toolchain-funcs
42 -
43 -MY_P="${P/_/.}"
44 -#MY_S="${PN}-ce-${PV}"
45 -major_minor="$(ver_cut 1-2)"
46 -sieve_version="0.5.19"
47 -if [[ ${PV} == *_rc* ]]; then
48 - rc_dir="rc/"
49 -else
50 - rc_dir=""
51 -fi
52 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
53 - sieve? (
54 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
55 - )
56 - managesieve? (
57 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
58 - ) "
59 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
60 -HOMEPAGE="https://www.dovecot.org/"
61 -
62 -SLOT="0"
63 -LICENSE="LGPL-2.1 MIT"
64 -KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
65 -
66 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite"
67 -IUSE_DOVECOT_COMPRESS="lz4 zstd"
68 -IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 lucene managesieve rpc
69 - selinux sieve solr static-libs stemmer suid systemd tcpd textcat unwind"
70 -
71 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
72 -
73 -REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
74 -
75 -DEPEND="
76 - app-arch/bzip2
77 - app-arch/xz-utils
78 - dev-libs/icu:=
79 - dev-libs/openssl:0/1.1
80 - sys-libs/zlib:=
81 - virtual/libiconv
82 - argon2? ( dev-libs/libsodium:= )
83 - caps? ( sys-libs/libcap )
84 - kerberos? ( virtual/krb5 )
85 - ldap? ( net-nds/openldap:= )
86 - lua? ( ${LUA_DEPS} )
87 - lucene? ( >=dev-cpp/clucene-2.3 )
88 - lz4? ( app-arch/lz4 )
89 - mysql? ( dev-db/mysql-connector-c:0= )
90 - pam? ( sys-libs/pam:= )
91 - postgres? ( dev-db/postgresql:* )
92 - rpc? ( net-libs/libtirpc:= net-libs/rpcsvc-proto )
93 - selinux? ( sec-policy/selinux-dovecot )
94 - solr? ( net-misc/curl dev-libs/expat )
95 - sqlite? ( dev-db/sqlite:* )
96 - stemmer? ( dev-libs/snowball-stemmer:= )
97 - suid? ( acct-group/mail )
98 - systemd? ( sys-apps/systemd:= )
99 - tcpd? ( sys-apps/tcp-wrappers )
100 - textcat? ( app-text/libexttextcat )
101 - unwind? ( sys-libs/libunwind:= )
102 - zstd? ( app-arch/zstd:= )
103 - virtual/libcrypt:=
104 - "
105 -
106 -RDEPEND="
107 - ${DEPEND}
108 - acct-group/dovecot
109 - acct-group/dovenull
110 - acct-user/dovecot
111 - acct-user/dovenull
112 - net-mail/mailbase
113 - "
114 -
115 -S="${WORKDIR}/${MY_P}"
116 -
117 -PATCHES=(
118 - "${FILESDIR}/${PN}"-autoconf-lua-version-v2.patch
119 - "${FILESDIR}/${PN}"-socket-name-too-long.patch
120 - "${FILESDIR}"/CVE-2022-30550.patch
121 -)
122 -
123 -pkg_setup() {
124 - use lua && lua-single_pkg_setup
125 - if use managesieve && ! use sieve; then
126 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
127 - ewarn "sieve USE flag will be turned on"
128 - fi
129 -}
130 -
131 -src_prepare() {
132 - default
133 - # bug 657108
134 - #elibtoolize
135 - eautoreconf
136 -
137 - # Bug #727244
138 - append-cflags -fasynchronous-unwind-tables
139 -}
140 -
141 -src_configure() {
142 - local conf=""
143 -
144 - if use postgres || use mysql || use sqlite; then
145 - conf="${conf} --with-sql"
146 - fi
147 -
148 - # turn valgrind tests off. Bug #340791
149 - VALGRIND=no \
150 - LUAPC="${ELUA}" \
151 - systemdsystemunitdir="$(systemd_get_systemunitdir)" \
152 - econf \
153 - --with-rundir="${EPREFIX}/run/dovecot" \
154 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
155 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
156 - --disable-rpath \
157 - --with-bzlib \
158 - --without-libbsd \
159 - --with-lzma \
160 - --with-icu \
161 - --with-ssl \
162 - --with-zlib \
163 - $( use_with argon2 sodium ) \
164 - $( use_with caps libcap ) \
165 - $( use_with kerberos gssapi ) \
166 - $( use_with lua ) \
167 - $( use_with ldap ) \
168 - $( use_with lucene ) \
169 - $( use_with lz4 ) \
170 - $( use_with mysql ) \
171 - $( use_with pam ) \
172 - $( use_with postgres pgsql ) \
173 - $( use_with sqlite ) \
174 - $( use_with solr ) \
175 - $( use_with stemmer ) \
176 - $( use_with systemd ) \
177 - $( use_with tcpd libwrap ) \
178 - $( use_with textcat ) \
179 - $( use_with unwind libunwind ) \
180 - $( use_with zstd ) \
181 - $( use_enable static-libs static ) \
182 - ${conf}
183 -
184 - if use sieve || use managesieve; then
185 - # The sieve plugin needs this file to be build to determine the plugin
186 - # directory and the list of libraries to link to.
187 - emake dovecot-config
188 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
189 - econf \
190 - $( use_enable static-libs static ) \
191 - --localstatedir="${EPREFIX}/var" \
192 - --enable-shared \
193 - --with-dovecot="${S}" \
194 - $( use_with ldap ) \
195 - $( use_with managesieve )
196 - fi
197 -}
198 -
199 -src_compile() {
200 - default
201 - if use sieve || use managesieve; then
202 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
203 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
204 - fi
205 -}
206 -
207 -src_test() {
208 - default
209 - if use sieve || use managesieve; then
210 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
211 - default
212 - fi
213 -}
214 -
215 -src_install() {
216 - default
217 -
218 - if use suid; then
219 - einfo "Changing perms to allow deliver to be suided"
220 - fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
221 - fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
222 - fi
223 -
224 - newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
225 -
226 - rm -rf "${ED}"/usr/share/doc/dovecot
227 -
228 - dodoc AUTHORS NEWS README TODO
229 - dodoc doc/*.{txt,cnf,xml,sh}
230 - docinto example-config
231 - dodoc doc/example-config/*.{conf,ext}
232 - docinto example-config/conf.d
233 - dodoc doc/example-config/conf.d/*.{conf,ext}
234 - docinto wiki
235 - dodoc doc/wiki/*
236 - doman doc/man/*.{1,7}
237 -
238 - # Create the dovecot.conf file from the dovecot-example.conf file that
239 - # the dovecot folks nicely left for us....
240 - local conf="${ED}/etc/dovecot/dovecot.conf"
241 - local confd="${ED}/etc/dovecot/conf.d"
242 -
243 - insinto /etc/dovecot
244 - doins doc/example-config/*.{conf,ext}
245 - insinto /etc/dovecot/conf.d
246 - doins doc/example-config/conf.d/*.{conf,ext}
247 - fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext
248 - rm -f "${confd}/../README"
249 -
250 - # .maildir is the Gentoo default
251 - local mail_location="maildir:~/.maildir"
252 - sed -i -e \
253 - "s|#mail_location =|mail_location = ${mail_location}|" \
254 - "${confd}/10-mail.conf" \
255 - || die "failed to update mail location settings in 10-mail.conf"
256 -
257 - # We're using pam files (imap and pop3) provided by mailbase
258 - if use pam; then
259 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
260 - "${confd}/auth-system.conf.ext" \
261 - || die "failed to update PAM settings in auth-system.conf.ext"
262 - # mailbase does not provide a sieve pam file
263 - use managesieve && dosym imap /etc/pam.d/sieve
264 - sed -i -e \
265 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
266 - "${confd}/10-auth.conf" \
267 - || die "failed to update PAM settings in 10-auth.conf"
268 - fi
269 -
270 - # Disable ipv6 if necessary
271 - if ! use ipv6; then
272 - sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
273 - || die "failed to update listen settings in dovecot.conf"
274 - fi
275 -
276 - # Update ssl cert locations
277 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
278 - || die "ssl conf failed"
279 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
280 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
281 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
282 -
283 - # Install SQL configuration
284 - if use mysql || use postgres; then
285 - sed -i -e \
286 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
287 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
288 - 10-auth.conf"
289 - fi
290 -
291 - # Install LDAP configuration
292 - if use ldap; then
293 - sed -i -e \
294 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
295 - "${confd}/10-auth.conf" \
296 - || die "failed to update ldap settings in 10-auth.conf"
297 - fi
298 -
299 - if use sieve || use managesieve; then
300 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
301 - emake DESTDIR="${ED}" install
302 - sed -i -e \
303 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
304 - || die "failed to update sieve settings in 15-lda.conf"
305 - rm -rf "${ED}"/usr/share/doc/dovecot
306 - docinto example-config/conf.d
307 - dodoc doc/example-config/conf.d/*.conf
308 - insinto /etc/dovecot/conf.d
309 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
310 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
311 - docinto sieve/rfc
312 - dodoc doc/rfc/*.txt
313 - docinto sieve/devel
314 - dodoc doc/devel/DESIGN
315 - docinto plugins
316 - dodoc doc/plugins/*.txt
317 - docinto extensions
318 - dodoc doc/extensions/*.txt
319 - docinto locations
320 - dodoc doc/locations/*.txt
321 - doman doc/man/*.{1,7}
322 - fi
323 -
324 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
325 -}
326 -
327 -pkg_postinst() {
328 - # Let's not make a new certificate if we already have one
329 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
330 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
331 - einfo "Creating SSL certificate"
332 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
333 - install_cert /etc/ssl/dovecot/server
334 - fi
335 -}
336
337 diff --git a/net-mail/dovecot/dovecot-2.3.20.ebuild b/net-mail/dovecot/dovecot-2.3.20.ebuild
338 deleted file mode 100644
339 index eec1b762d79d..000000000000
340 --- a/net-mail/dovecot/dovecot-2.3.20.ebuild
341 +++ /dev/null
342 @@ -1,298 +0,0 @@
343 -# Copyright 1999-2022 Gentoo Authors
344 -# Distributed under the terms of the GNU General Public License v2
345 -
346 -EAPI=8
347 -
348 -LUA_COMPAT=( lua5-1 lua5-3 )
349 -# do not add a ssl USE flag. ssl is mandatory
350 -SSL_DEPS_SKIP=1
351 -inherit autotools flag-o-matic lua-single ssl-cert systemd toolchain-funcs
352 -
353 -MY_P="${P/_/.}"
354 -#MY_S="${PN}-ce-${PV}"
355 -major_minor="$(ver_cut 1-2)"
356 -sieve_version="0.5.20"
357 -if [[ ${PV} == *_rc* ]]; then
358 - rc_dir="rc/"
359 -else
360 - rc_dir=""
361 -fi
362 -SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz
363 - sieve? (
364 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
365 - )
366 - managesieve? (
367 - https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
368 - ) "
369 -DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
370 -HOMEPAGE="https://www.dovecot.org/"
371 -
372 -SLOT="0"
373 -LICENSE="LGPL-2.1 MIT"
374 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
375 -
376 -IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite"
377 -IUSE_DOVECOT_COMPRESS="lz4 zstd"
378 -IUSE_DOVECOT_OTHER="argon2 caps doc lucene managesieve rpc
379 - selinux sieve solr static-libs stemmer suid systemd tcpd textcat unwind"
380 -
381 -IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}"
382 -
383 -REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
384 -
385 -DEPEND="
386 - app-arch/bzip2
387 - app-arch/xz-utils
388 - dev-libs/icu:=
389 - dev-libs/openssl:0/1.1
390 - sys-libs/zlib:=
391 - virtual/libiconv
392 - argon2? ( dev-libs/libsodium:= )
393 - caps? ( sys-libs/libcap )
394 - kerberos? ( virtual/krb5 )
395 - ldap? ( net-nds/openldap:= )
396 - lua? ( ${LUA_DEPS} )
397 - lucene? ( >=dev-cpp/clucene-2.3 )
398 - lz4? ( app-arch/lz4 )
399 - mysql? ( dev-db/mysql-connector-c:0= )
400 - pam? ( sys-libs/pam:= )
401 - postgres? ( dev-db/postgresql:* )
402 - rpc? ( net-libs/libtirpc:= net-libs/rpcsvc-proto )
403 - selinux? ( sec-policy/selinux-dovecot )
404 - solr? ( net-misc/curl dev-libs/expat )
405 - sqlite? ( dev-db/sqlite:* )
406 - stemmer? ( dev-libs/snowball-stemmer:= )
407 - suid? ( acct-group/mail )
408 - systemd? ( sys-apps/systemd:= )
409 - tcpd? ( sys-apps/tcp-wrappers )
410 - textcat? ( app-text/libexttextcat )
411 - unwind? ( sys-libs/libunwind:= )
412 - zstd? ( app-arch/zstd:= )
413 - virtual/libcrypt:=
414 - "
415 -
416 -RDEPEND="
417 - ${DEPEND}
418 - acct-group/dovecot
419 - acct-group/dovenull
420 - acct-user/dovecot
421 - acct-user/dovenull
422 - net-mail/mailbase
423 - "
424 -
425 -S="${WORKDIR}/${MY_P}"
426 -
427 -PATCHES=(
428 - "${FILESDIR}/${PN}"-autoconf-lua-version-v2.patch
429 - "${FILESDIR}/${PN}"-socket-name-too-long.patch
430 - "${FILESDIR}/${PN}"-2.3.19.1-slibtool.patch # 782631
431 - "${FILESDIR}"/CVE-2022-30550.patch
432 -)
433 -
434 -pkg_setup() {
435 - use lua && lua-single_pkg_setup
436 - if use managesieve && ! use sieve; then
437 - ewarn "managesieve USE flag selected but sieve USE flag unselected"
438 - ewarn "sieve USE flag will be turned on"
439 - fi
440 -}
441 -
442 -src_prepare() {
443 - default
444 - # bug 657108, 782631
445 - #elibtoolize
446 - eautoreconf
447 -
448 - # Bug #727244
449 - append-cflags -fasynchronous-unwind-tables
450 -}
451 -
452 -src_configure() {
453 - local conf=""
454 -
455 - if use postgres || use mysql || use sqlite; then
456 - conf="${conf} --with-sql"
457 - fi
458 -
459 - # turn valgrind tests off. Bug #340791
460 - VALGRIND=no \
461 - LUAPC="${ELUA}" \
462 - systemdsystemunitdir="$(systemd_get_systemunitdir)" \
463 - econf \
464 - --with-rundir="${EPREFIX}/run/dovecot" \
465 - --with-statedir="${EPREFIX}/var/lib/dovecot" \
466 - --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
467 - --disable-rpath \
468 - --with-bzlib \
469 - --without-libbsd \
470 - --with-lzma \
471 - --with-icu \
472 - --with-ssl \
473 - --with-zlib \
474 - $( use_with argon2 sodium ) \
475 - $( use_with caps libcap ) \
476 - $( use_with kerberos gssapi ) \
477 - $( use_with lua ) \
478 - $( use_with ldap ) \
479 - $( use_with lucene ) \
480 - $( use_with lz4 ) \
481 - $( use_with mysql ) \
482 - $( use_with pam ) \
483 - $( use_with postgres pgsql ) \
484 - $( use_with sqlite ) \
485 - $( use_with solr ) \
486 - $( use_with stemmer ) \
487 - $( use_with systemd ) \
488 - $( use_with tcpd libwrap ) \
489 - $( use_with textcat ) \
490 - $( use_with unwind libunwind ) \
491 - $( use_with zstd ) \
492 - $( use_enable static-libs static ) \
493 - ${conf}
494 -
495 - if use sieve || use managesieve; then
496 - # The sieve plugin needs this file to be build to determine the plugin
497 - # directory and the list of libraries to link to.
498 - emake dovecot-config
499 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
500 - econf \
501 - $( use_enable static-libs static ) \
502 - --localstatedir="${EPREFIX}/var" \
503 - --enable-shared \
504 - --with-dovecot="${S}" \
505 - $( use_with ldap ) \
506 - $( use_with managesieve )
507 - fi
508 -}
509 -
510 -src_compile() {
511 - default
512 - if use sieve || use managesieve; then
513 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
514 - emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
515 - fi
516 -}
517 -
518 -src_test() {
519 - default
520 - if use sieve || use managesieve; then
521 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
522 - default
523 - fi
524 -}
525 -
526 -src_install() {
527 - default
528 -
529 - if use suid; then
530 - einfo "Changing perms to allow deliver to be suided"
531 - fowners root:mail "/usr/libexec/dovecot/dovecot-lda"
532 - fperms 4750 "/usr/libexec/dovecot/dovecot-lda"
533 - fi
534 -
535 - newinitd "${FILESDIR}"/dovecot.init-r6 dovecot
536 -
537 - rm -rf "${ED}"/usr/share/doc/dovecot
538 -
539 - dodoc AUTHORS NEWS README TODO
540 - dodoc doc/*.{txt,cnf,xml,sh}
541 - docinto example-config
542 - dodoc doc/example-config/*.{conf,ext}
543 - docinto example-config/conf.d
544 - dodoc doc/example-config/conf.d/*.{conf,ext}
545 - docinto wiki
546 - dodoc doc/wiki/*
547 - doman doc/man/*.{1,7}
548 -
549 - # Create the dovecot.conf file from the dovecot-example.conf file that
550 - # the dovecot folks nicely left for us....
551 - local conf="${ED}/etc/dovecot/dovecot.conf"
552 - local confd="${ED}/etc/dovecot/conf.d"
553 -
554 - insinto /etc/dovecot
555 - doins doc/example-config/*.{conf,ext}
556 - insinto /etc/dovecot/conf.d
557 - doins doc/example-config/conf.d/*.{conf,ext}
558 - fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext
559 - rm -f "${confd}/../README"
560 -
561 - # .maildir is the Gentoo default
562 - local mail_location="maildir:~/.maildir"
563 - sed -i -e \
564 - "s|#mail_location =|mail_location = ${mail_location}|" \
565 - "${confd}/10-mail.conf" \
566 - || die "failed to update mail location settings in 10-mail.conf"
567 -
568 - # We're using pam files (imap and pop3) provided by mailbase
569 - if use pam; then
570 - sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
571 - "${confd}/auth-system.conf.ext" \
572 - || die "failed to update PAM settings in auth-system.conf.ext"
573 - # mailbase does not provide a sieve pam file
574 - use managesieve && dosym imap /etc/pam.d/sieve
575 - sed -i -e \
576 - 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
577 - "${confd}/10-auth.conf" \
578 - || die "failed to update PAM settings in 10-auth.conf"
579 - fi
580 -
581 - # Update ssl cert locations
582 - sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
583 - || die "ssl conf failed"
584 - sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
585 - -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
586 - "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
587 -
588 - # Install SQL configuration
589 - if use mysql || use postgres; then
590 - sed -i -e \
591 - 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
592 - "${confd}/10-auth.conf" || die "failed to update SQL settings in \
593 - 10-auth.conf"
594 - fi
595 -
596 - # Install LDAP configuration
597 - if use ldap; then
598 - sed -i -e \
599 - 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
600 - "${confd}/10-auth.conf" \
601 - || die "failed to update ldap settings in 10-auth.conf"
602 - fi
603 -
604 - if use sieve || use managesieve; then
605 - cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
606 - emake DESTDIR="${ED}" install
607 - sed -i -e \
608 - 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
609 - || die "failed to update sieve settings in 15-lda.conf"
610 - rm -rf "${ED}"/usr/share/doc/dovecot
611 - docinto example-config/conf.d
612 - dodoc doc/example-config/conf.d/*.conf
613 - insinto /etc/dovecot/conf.d
614 - doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
615 - use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
616 - docinto sieve/rfc
617 - dodoc doc/rfc/*.txt
618 - docinto sieve/devel
619 - dodoc doc/devel/DESIGN
620 - docinto plugins
621 - dodoc doc/plugins/*.txt
622 - docinto extensions
623 - dodoc doc/extensions/*.txt
624 - docinto locations
625 - dodoc doc/locations/*.txt
626 - doman doc/man/*.{1,7}
627 - fi
628 -
629 - use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
630 -}
631 -
632 -pkg_postinst() {
633 - # Let's not make a new certificate if we already have one
634 - if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
635 - -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
636 - einfo "Creating SSL certificate"
637 - SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
638 - install_cert /etc/ssl/dovecot/server
639 - fi
640 -}