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