Gentoo Archives: gentoo-commits

From: "Marc Schiffbauer (mschiff)" <mschiff@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/dovecot: metadata.xml ChangeLog dovecot-2.1.16-r1.ebuild dovecot-2.2.2-r1.ebuild
Date: Tue, 21 May 2013 08:55:13
Message-Id: 20130521085507.45B0F2171D@flycatcher.gentoo.org
1 mschiff 13/05/21 08:55:07
2
3 Modified: metadata.xml ChangeLog
4 Added: dovecot-2.1.16-r1.ebuild dovecot-2.2.2-r1.ebuild
5 Log:
6 Bump 2.1.16 and 2.2.2 to add solr support via USE flag. Fixes #448984
7
8 (Portage version: 2.2.0_alpha176/cvs/Linux x86_64, signed Manifest commit with key 0x296C6CCA35A64134)
9
10 Revision Changes Path
11 1.18 net-mail/dovecot/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/metadata.xml?rev=1.18&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/metadata.xml?rev=1.18&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/metadata.xml?r1=1.17&r2=1.18
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/metadata.xml,v
20 retrieving revision 1.17
21 retrieving revision 1.18
22 diff -u -r1.17 -r1.18
23 --- metadata.xml 19 Dec 2012 08:27:51 -0000 1.17
24 +++ metadata.xml 21 May 2013 08:55:07 -0000 1.18
25 @@ -16,5 +16,6 @@
26 <flag name="imapc">Add imap client storage support</flag>
27 <flag name="pop3c">Add pop3 client storage support</flag>
28 <flag name="lucene">Add lucene full text search (FTS) support using <pkg>dev-cpp/clucene</pkg></flag>
29 + <flag name="solr">Add solr full text search (FTS) support</flag>
30 </use>
31 </pkgmetadata>
32
33
34
35 1.428 net-mail/dovecot/ChangeLog
36
37 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.428&view=markup
38 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.428&content-type=text/plain
39 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.427&r2=1.428
40
41 Index: ChangeLog
42 ===================================================================
43 RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v
44 retrieving revision 1.427
45 retrieving revision 1.428
46 diff -u -r1.427 -r1.428
47 --- ChangeLog 20 May 2013 17:43:09 -0000 1.427
48 +++ ChangeLog 21 May 2013 08:55:07 -0000 1.428
49 @@ -1,6 +1,13 @@
50 # ChangeLog for net-mail/dovecot
51 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
52 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.427 2013/05/20 17:43:09 ago Exp $
53 +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.428 2013/05/21 08:55:07 mschiff Exp $
54 +
55 +*dovecot-2.2.2-r1 (21 May 2013)
56 +*dovecot-2.1.16-r1 (21 May 2013)
57 +
58 + 21 May 2013; Marc Schiffbauer <mschiff@g.o> +dovecot-2.1.16-r1.ebuild,
59 + +dovecot-2.2.2-r1.ebuild, metadata.xml:
60 + Bump 2.1.16 and 2.2.2 to add solr support via USE flag. Fixes #448984
61
62 20 May 2013; Agostino Sarubbo <ago@g.o> dovecot-2.1.16.ebuild:
63 Stable for s390, wrt bug #470196
64
65
66
67 1.1 net-mail/dovecot/dovecot-2.1.16-r1.ebuild
68
69 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.1.16-r1.ebuild?rev=1.1&view=markup
70 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.1.16-r1.ebuild?rev=1.1&content-type=text/plain
71
72 Index: dovecot-2.1.16-r1.ebuild
73 ===================================================================
74 # Copyright 1999-2013 Gentoo Foundation
75 # Distributed under the terms of the GNU General Public License v2
76 # $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.1.16-r1.ebuild,v 1.1 2013/05/21 08:55:07 mschiff Exp $
77
78 EAPI=5
79 inherit eutils versionator ssl-cert systemd user multilib
80
81 MY_P="${P/_/.}"
82 major_minor="$(get_version_component_range 1-2)"
83 sieve_version="0.3.4"
84 SRC_URI="http://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
85 sieve? (
86 http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.tar.gz
87 )
88 managesieve? (
89 http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.tar.gz
90 ) "
91 DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
92 HOMEPAGE="http://www.dovecot.org/"
93
94 SLOT="0"
95 LICENSE="LGPL-2.1 MIT"
96 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
97
98 IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
99 IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox"
100 IUSE_DOVECOT_OTHER="bzip2 caps doc ipv6 lucene managesieve selinux sieve solr +ssl
101 static-libs suid tcpd zlib"
102
103 IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_OTHER}"
104
105 DEPEND="caps? ( sys-libs/libcap )
106 kerberos? ( virtual/krb5 )
107 ldap? ( net-nds/openldap )
108 lucene? ( >=dev-cpp/clucene-2.3 )
109 mysql? ( virtual/mysql )
110 pam? ( virtual/pam )
111 postgres? ( dev-db/postgresql-base !dev-db/postgresql-base[ldap,threads] )
112 selinux? ( sec-policy/selinux-dovecot )
113 solr? ( net-misc/curl dev-libs/expat )
114 sqlite? ( dev-db/sqlite )
115 ssl? ( dev-libs/openssl )
116 tcpd? ( sys-apps/tcp-wrappers )
117 vpopmail? ( net-mail/vpopmail )
118 virtual/libiconv"
119
120 RDEPEND="${DEPEND}
121 >=net-mail/mailbase-0.00-r8"
122
123 S=${WORKDIR}/${MY_P}
124
125 pkg_setup() {
126 if use managesieve && ! use sieve; then
127 ewarn "managesieve USE flag selected but sieve USE flag unselected"
128 ewarn "sieve USE flag will be turned on"
129 fi
130 # default internal user
131 enewgroup dovecot 97
132 enewuser dovecot 97 -1 /dev/null dovecot
133 # default login user
134 enewuser dovenull -1 -1 /dev/null
135 # add "mail" group for suid'ing. Better security isolation.
136 if use suid; then
137 enewgroup mail
138 fi
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 local storages=""
149 for storage in ${IUSE_DOVECOT_STORAGE//+/}; do
150 use ${storage} && storages="${storage} ${storages}"
151 done
152 [ "${storages}" ] || storages="maildir"
153
154 # turn valgrind tests off. Bug #340791
155 VALGRIND=no econf \
156 --localstatedir="${EPREFIX}/var" \
157 --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
158 --without-stemmer \
159 --with-storages="${storages}" \
160 --disable-rpath \
161 $( systemd_with_unitdir ) \
162 $( use_with bzip2 bzlib ) \
163 $( use_with caps libcap ) \
164 $( use_with kerberos gssapi ) \
165 $( use_with ldap ) \
166 $( use_with lucene ) \
167 $( use_with mysql ) \
168 $( use_with pam ) \
169 $( use_with postgres pgsql ) \
170 $( use_with sqlite ) \
171 $( use_with solr ) \
172 $( use_with ssl ) \
173 $( use_with tcpd libwrap ) \
174 $( use_with vpopmail ) \
175 $( use_with zlib ) \
176 $( use_enable static-libs static ) \
177 ${conf}
178
179 if use sieve || use managesieve ; then
180 # The sieve plugin needs this file to be build to determine the plugin
181 # directory and the list of libraries to link to.
182 emake dovecot-config
183 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
184 econf \
185 $( use_enable static-libs static ) \
186 --localstatedir="${EPREFIX}/var" \
187 --enable-shared \
188 --with-dovecot="../${MY_P}" \
189 $( use_with managesieve )
190 fi
191 }
192
193 src_compile() {
194 default
195 if use sieve || use managesieve ; then
196 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
197 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
198 fi
199 }
200
201 src_test() {
202 default
203 if use sieve || use managesieve ; then
204 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
205 default
206 fi
207 }
208
209 src_install () {
210 default
211
212 # insecure:
213 # use suid && fperms u+s /usr/libexec/dovecot/deliver
214 # better:
215 if use suid;then
216 einfo "Changing perms to allow deliver to be suided"
217 fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
218 fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
219 fi
220
221 newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
222
223 rm -rf "${ED}"/usr/share/doc/dovecot
224
225 dodoc AUTHORS NEWS README TODO
226 dodoc doc/*.{txt,cnf,xml,sh}
227 docinto example-config
228 dodoc doc/example-config/*.{conf,ext}
229 docinto example-config/conf.d
230 dodoc doc/example-config/conf.d/*.{conf,ext}
231 docinto wiki
232 dodoc doc/wiki/*
233 doman doc/man/*.{1,7}
234
235 # Create the dovecot.conf file from the dovecot-example.conf file that
236 # the dovecot folks nicely left for us....
237 local conf="${ED}/etc/dovecot/dovecot.conf"
238 local confd="${ED}/etc/dovecot/conf.d"
239
240 insinto /etc/dovecot
241 doins doc/example-config/*.{conf,ext}
242 insinto /etc/dovecot/conf.d
243 doins doc/example-config/conf.d/*.{conf,ext}
244 fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
245 rm -f "${confd}/../README"
246
247 # .maildir is the Gentoo default
248 local mail_location="maildir:~/.maildir"
249 if ! use maildir; then
250 if use mbox; then
251 mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
252 keepdir /var/dovecot
253 sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \
254 "${confd}/10-mail.conf" || die "sed failed"
255 elif use mdbox ; then
256 mail_location="mdbox:~/.mdbox"
257 elif use sdbox ; then
258 mail_location="sdbox:~/.sdbox"
259 fi
260 fi
261 sed -i -e \
262 "s|#mail_location =|mail_location = ${mail_location}|" \
263 "${confd}/10-mail.conf" \
264 || die "failed to update mail location settings in 10-mail.conf"
265
266 # We're using pam files (imap and pop3) provided by mailbase
267 if use pam; then
268 sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
269 "${confd}/auth-system.conf.ext" \
270 || die "failed to update PAM settings in auth-system.conf.ext"
271 # mailbase does not provide a sieve pam file
272 use managesieve && dosym imap /etc/pam.d/sieve
273 sed -i -e \
274 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
275 "${confd}/10-auth.conf" \
276 || die "failed to update PAM settings in 10-auth.conf"
277 fi
278
279 # Disable ipv6 if necessary
280 if ! use ipv6; then
281 sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
282 || die "failed to update listen settings in dovecot.conf"
283 fi
284
285 # Update ssl cert locations
286 if use ssl; then
287 sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
288 || die "ssl conf failed"
289 sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
290 -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
291 "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
292 fi
293
294 # Install SQL configuration
295 if use mysql || use postgres; then
296 sed -i -e \
297 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
298 "${confd}/10-auth.conf" || die "failed to update SQL settings in \
299 10-auth.conf"
300 fi
301
302 # Install LDAP configuration
303 if use ldap; then
304 sed -i -e \
305 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
306 "${confd}/10-auth.conf" \
307 || die "failed to update ldap settings in 10-auth.conf"
308 fi
309
310 if use vpopmail; then
311 sed -i -e \
312 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
313 "${confd}/10-auth.conf" \
314 || die "failed to update vpopmail settings in 10-auth.conf"
315 fi
316
317 if use sieve || use managesieve ; then
318 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
319 emake DESTDIR="${ED}" install
320 sed -i -e \
321 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
322 || die "failed to update sieve settings in 15-lda.conf"
323 rm -rf "${ED}"/usr/share/doc/dovecot
324 dodoc doc/*.txt
325 docinto example-config/conf.d
326 dodoc doc/example-config/conf.d/*.conf
327 insinto /etc/dovecot/conf.d
328 doins doc/example-config/conf.d/90-sieve.conf
329 use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
330 docinto sieve/rfc
331 dodoc doc/rfc/*.txt
332 docinto sieve/devel
333 dodoc doc/devel/DESIGN
334 doman doc/man/*.{1,7}
335 fi
336
337 use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
338 }
339
340 pkg_postinst() {
341 if use ssl; then
342 # Let's not make a new certificate if we already have one
343 if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
344 -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
345 einfo "Creating SSL certificate"
346 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
347 install_cert /etc/ssl/dovecot/server
348 fi
349 fi
350
351 elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
352 }
353
354
355
356 1.1 net-mail/dovecot/dovecot-2.2.2-r1.ebuild
357
358 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.2.2-r1.ebuild?rev=1.1&view=markup
359 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.2.2-r1.ebuild?rev=1.1&content-type=text/plain
360
361 Index: dovecot-2.2.2-r1.ebuild
362 ===================================================================
363 # Copyright 1999-2013 Gentoo Foundation
364 # Distributed under the terms of the GNU General Public License v2
365 # $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.2.2-r1.ebuild,v 1.1 2013/05/21 08:55:07 mschiff Exp $
366
367 EAPI=5
368 inherit eutils versionator ssl-cert systemd user multilib
369
370 MY_P="${P/_/.}"
371 major_minor="$(get_version_component_range 1-2)"
372 sieve_version="0.4.0"
373 SRC_URI="http://dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
374 sieve? (
375 http://www.rename-it.nl/dovecot/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
376 )
377 managesieve? (
378 http://www.rename-it.nl/dovecot/${major_minor}/${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz
379 ) "
380 DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
381 HOMEPAGE="http://www.dovecot.org/"
382
383 SLOT="0"
384 LICENSE="LGPL-2.1 MIT"
385 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
386
387 IUSE_DOVECOT_AUTH="kerberos ldap mysql pam postgres sqlite vpopmail"
388 IUSE_DOVECOT_STORAGE="cydir imapc +maildir mbox mdbox pop3c sdbox"
389 IUSE_DOVECOT_OTHER="bzip2 caps doc ipv6 lucene managesieve selinux sieve solr +ssl static-libs suid tcpd zlib"
390
391 IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_OTHER}"
392
393 DEPEND="caps? ( sys-libs/libcap )
394 kerberos? ( virtual/krb5 )
395 ldap? ( net-nds/openldap )
396 lucene? ( >=dev-cpp/clucene-2.3 )
397 mysql? ( virtual/mysql )
398 pam? ( virtual/pam )
399 postgres? ( dev-db/postgresql-base !dev-db/postgresql-base[ldap,threads] )
400 selinux? ( sec-policy/selinux-dovecot )
401 solr? ( net-misc/curl dev-libs/expat )
402 sqlite? ( dev-db/sqlite )
403 ssl? ( dev-libs/openssl )
404 tcpd? ( sys-apps/tcp-wrappers )
405 vpopmail? ( net-mail/vpopmail )
406 virtual/libiconv"
407
408 RDEPEND="${DEPEND}
409 net-mail/mailbase"
410
411 S=${WORKDIR}/${MY_P}
412
413 pkg_setup() {
414 if use managesieve && ! use sieve; then
415 ewarn "managesieve USE flag selected but sieve USE flag unselected"
416 ewarn "sieve USE flag will be turned on"
417 fi
418 # default internal user
419 enewgroup dovecot 97
420 enewuser dovecot 97 -1 /dev/null dovecot
421 # default login user
422 enewuser dovenull -1 -1 /dev/null
423 # add "mail" group for suid'ing. Better security isolation.
424 if use suid; then
425 enewgroup mail
426 fi
427 }
428
429 src_configure() {
430 local conf=""
431
432 if use postgres || use mysql || use sqlite; then
433 conf="${conf} --with-sql"
434 fi
435
436 local storages=""
437 for storage in ${IUSE_DOVECOT_STORAGE//+/}; do
438 use ${storage} && storages="${storage} ${storages}"
439 done
440 [ "${storages}" ] || storages="maildir"
441
442 # turn valgrind tests off. Bug #340791
443 VALGRIND=no econf \
444 --localstatedir="${EPREFIX}/var" \
445 --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
446 --without-stemmer \
447 --with-storages="${storages}" \
448 --disable-rpath \
449 $( systemd_with_unitdir ) \
450 $( use_with bzip2 bzlib ) \
451 $( use_with caps libcap ) \
452 $( use_with kerberos gssapi ) \
453 $( use_with ldap ) \
454 $( use_with lucene ) \
455 $( use_with mysql ) \
456 $( use_with pam ) \
457 $( use_with postgres pgsql ) \
458 $( use_with sqlite ) \
459 $( use_with solr ) \
460 $( use_with ssl ) \
461 $( use_with tcpd libwrap ) \
462 $( use_with vpopmail ) \
463 $( use_with zlib ) \
464 $( use_enable static-libs static ) \
465 ${conf}
466
467 if use sieve || use managesieve ; then
468 # The sieve plugin needs this file to be build to determine the plugin
469 # directory and the list of libraries to link to.
470 emake dovecot-config
471 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
472 econf \
473 $( use_enable static-libs static ) \
474 --localstatedir="${EPREFIX}/var" \
475 --enable-shared \
476 --with-dovecot="../${MY_P}" \
477 $( use_with managesieve )
478 fi
479 }
480
481 src_compile() {
482 default
483 if use sieve || use managesieve ; then
484 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
485 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
486 fi
487 }
488
489 src_test() {
490 default
491 if use sieve || use managesieve ; then
492 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
493 default
494 fi
495 }
496
497 src_install () {
498 default
499
500 # insecure:
501 # use suid && fperms u+s /usr/libexec/dovecot/deliver
502 # better:
503 if use suid;then
504 einfo "Changing perms to allow deliver to be suided"
505 fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
506 fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
507 fi
508
509 newinitd "${FILESDIR}"/dovecot.init-r4 dovecot
510
511 rm -rf "${ED}"/usr/share/doc/dovecot
512
513 dodoc AUTHORS NEWS README TODO
514 dodoc doc/*.{txt,cnf,xml,sh}
515 docinto example-config
516 dodoc doc/example-config/*.{conf,ext}
517 docinto example-config/conf.d
518 dodoc doc/example-config/conf.d/*.{conf,ext}
519 docinto wiki
520 dodoc doc/wiki/*
521 doman doc/man/*.{1,7}
522
523 # Create the dovecot.conf file from the dovecot-example.conf file that
524 # the dovecot folks nicely left for us....
525 local conf="${ED}/etc/dovecot/dovecot.conf"
526 local confd="${ED}/etc/dovecot/conf.d"
527
528 insinto /etc/dovecot
529 doins doc/example-config/*.{conf,ext}
530 insinto /etc/dovecot/conf.d
531 doins doc/example-config/conf.d/*.{conf,ext}
532 fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
533 rm -f "${confd}/../README"
534
535 # .maildir is the Gentoo default
536 local mail_location="maildir:~/.maildir"
537 if ! use maildir; then
538 if use mbox; then
539 mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
540 keepdir /var/dovecot
541 sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \
542 "${confd}/10-mail.conf" || die "sed failed"
543 elif use mdbox ; then
544 mail_location="mdbox:~/.mdbox"
545 elif use sdbox ; then
546 mail_location="sdbox:~/.sdbox"
547 fi
548 fi
549 sed -i -e \
550 "s|#mail_location =|mail_location = ${mail_location}|" \
551 "${confd}/10-mail.conf" \
552 || die "failed to update mail location settings in 10-mail.conf"
553
554 # We're using pam files (imap and pop3) provided by mailbase
555 if use pam; then
556 sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
557 "${confd}/auth-system.conf.ext" \
558 || die "failed to update PAM settings in auth-system.conf.ext"
559 # mailbase does not provide a sieve pam file
560 use managesieve && dosym imap /etc/pam.d/sieve
561 sed -i -e \
562 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
563 "${confd}/10-auth.conf" \
564 || die "failed to update PAM settings in 10-auth.conf"
565 fi
566
567 # Disable ipv6 if necessary
568 if ! use ipv6; then
569 sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
570 || die "failed to update listen settings in dovecot.conf"
571 fi
572
573 # Update ssl cert locations
574 if use ssl; then
575 sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
576 || die "ssl conf failed"
577 sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
578 -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
579 "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
580 fi
581
582 # Install SQL configuration
583 if use mysql || use postgres; then
584 sed -i -e \
585 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
586 "${confd}/10-auth.conf" || die "failed to update SQL settings in \
587 10-auth.conf"
588 fi
589
590 # Install LDAP configuration
591 if use ldap; then
592 sed -i -e \
593 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
594 "${confd}/10-auth.conf" \
595 || die "failed to update ldap settings in 10-auth.conf"
596 fi
597
598 if use vpopmail; then
599 sed -i -e \
600 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
601 "${confd}/10-auth.conf" \
602 || die "failed to update vpopmail settings in 10-auth.conf"
603 fi
604
605 if use sieve || use managesieve ; then
606 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
607 emake DESTDIR="${ED}" install
608 sed -i -e \
609 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
610 || die "failed to update sieve settings in 15-lda.conf"
611 rm -rf "${ED}"/usr/share/doc/dovecot
612 dodoc doc/*.txt
613 docinto example-config/conf.d
614 dodoc doc/example-config/conf.d/*.conf
615 insinto /etc/dovecot/conf.d
616 doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf
617 use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
618 docinto sieve/rfc
619 dodoc doc/rfc/*.txt
620 docinto sieve/devel
621 dodoc doc/devel/DESIGN
622 doman doc/man/*.{1,7}
623 fi
624
625 use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete
626 }
627
628 pkg_postinst() {
629 if use ssl; then
630 # Let's not make a new certificate if we already have one
631 if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
632 -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
633 einfo "Creating SSL certificate"
634 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
635 install_cert /etc/ssl/dovecot/server
636 fi
637 fi
638
639 elog "Please read http://wiki2.dovecot.org/Upgrading/ for upgrade notes."
640 }