1 |
wschlich 08/05/05 11:47:09 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dovecot-1.0.13-r4.ebuild dovecot-1.1_rc5.ebuild |
5 |
Removed: dovecot-1.1_rc4.ebuild dovecot-1.1_rc4-r2.ebuild |
6 |
dovecot-1.0.13-r3.ebuild |
7 |
Log: |
8 |
version bump for 1.1, managesieve bump for 1.0 and 1.1 |
9 |
(Portage version: 2.1.5_rc4) |
10 |
|
11 |
Revision Changes Path |
12 |
1.162 net-mail/dovecot/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.162&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.162&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.161&r2=1.162 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v |
21 |
retrieving revision 1.161 |
22 |
retrieving revision 1.162 |
23 |
diff -u -r1.161 -r1.162 |
24 |
--- ChangeLog 21 Apr 2008 17:50:33 -0000 1.161 |
25 |
+++ ChangeLog 5 May 2008 11:47:09 -0000 1.162 |
26 |
@@ -1,6 +1,15 @@ |
27 |
# ChangeLog for net-mail/dovecot |
28 |
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.161 2008/04/21 17:50:33 wschlich Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.162 2008/05/05 11:47:09 wschlich Exp $ |
31 |
+ |
32 |
+*dovecot-1.1_rc5 (05 May 2008) |
33 |
+*dovecot-1.0.13-r4 (05 May 2008) |
34 |
+ |
35 |
+ 05 May 2008; Wolfram Schlich <wschlich@g.o> |
36 |
+ -files/dovecot-1.1_rc3-body.patch, -dovecot-1.0.13-r3.ebuild, |
37 |
+ +dovecot-1.0.13-r4.ebuild, -dovecot-1.1_rc4.ebuild, |
38 |
+ -dovecot-1.1_rc4-r2.ebuild, +dovecot-1.1_rc5.ebuild: |
39 |
+ version bump for 1.1, managesieve bump for 1.0 and 1.1 |
40 |
|
41 |
*dovecot-1.1_rc4-r2 (21 Apr 2008) |
42 |
*dovecot-1.0.13-r3 (21 Apr 2008) |
43 |
|
44 |
|
45 |
|
46 |
1.1 net-mail/dovecot/dovecot-1.0.13-r4.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.0.13-r4.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.0.13-r4.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: dovecot-1.0.13-r4.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2008 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0.13-r4.ebuild,v 1.1 2008/05/05 11:47:09 wschlich Exp $ |
56 |
|
57 |
inherit autotools eutils ssl-cert versionator |
58 |
|
59 |
MY_P="${P/_/.}" |
60 |
MY_PV12=$(get_version_component_range 1-2 ${PV}) |
61 |
S="${WORKDIR}/${MY_P}" |
62 |
SIEVE="dovecot-sieve-1.0.2" |
63 |
SIEVE_S="${WORKDIR}/${SIEVE}" |
64 |
MANAGESIEVE="MANAGESIEVE-v9.3" |
65 |
|
66 |
SRC_URI="http://dovecot.org/releases/1.0/${MY_P}.tar.gz |
67 |
sieve? ( http://dovecot.org/releases/sieve/${SIEVE}.tar.gz ) |
68 |
managesieve? ( http://www.rename-it.nl/${PN}/${MY_PV12}/${MY_P}-${MANAGESIEVE}.diff.gz )" |
69 |
|
70 |
DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
71 |
HOMEPAGE="http://www.dovecot.org/" |
72 |
|
73 |
SLOT="0" |
74 |
LICENSE="LGPL-2.1" |
75 |
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" |
76 |
|
77 |
IUSE="debug doc ipv6 kerberos ldap managesieve mbox mysql pop3d pam postgres sieve sqlite3 ssl suid vpopmail" |
78 |
|
79 |
# Developer documentation, controlled by the doc USE flag |
80 |
DEVDOCS="auth-protocol index multiaccess securecoding" |
81 |
|
82 |
DEPEND=">=sys-apps/sed-4 |
83 |
kerberos? ( virtual/krb5 ) |
84 |
ldap? ( net-nds/openldap ) |
85 |
pam? ( virtual/pam ) |
86 |
ssl? ( dev-libs/openssl ) |
87 |
postgres? ( dev-db/postgresql ) |
88 |
mysql? ( virtual/mysql ) |
89 |
sqlite3? ( =dev-db/sqlite-3* ) |
90 |
vpopmail? ( net-mail/vpopmail )" |
91 |
|
92 |
RDEPEND="${DEPEND} |
93 |
>=net-mail/mailbase-0.00-r8" |
94 |
|
95 |
src_unpack() { |
96 |
unpack ${A} |
97 |
cd "${S}" |
98 |
# http://hg.dovecot.org/dovecot-1.0/rev/538f8892a2f1 |
99 |
epatch "${FILESDIR}"/${P}-body.patch |
100 |
if use managesieve; then |
101 |
epatch "${WORKDIR}"/${MY_P}-${MANAGESIEVE}.diff |
102 |
eautoreconf |
103 |
fi |
104 |
} |
105 |
|
106 |
pkg_setup() { |
107 |
if ! use sieve && use managesieve; then |
108 |
eerror "managesieve USE flag selected but sieve USE flag unselected" |
109 |
die "USE flag problem" |
110 |
fi |
111 |
# Add user and group for login process (same as for fedora/redhat) |
112 |
enewgroup dovecot 97 |
113 |
enewuser dovecot 97 -1 /dev/null dovecot |
114 |
} |
115 |
|
116 |
src_compile() { |
117 |
local myconf= |
118 |
use ssl && myconf="${myconf} --with-ssl=openssl" \ |
119 |
|| myconf="${myconf} --without-ssl" |
120 |
econf \ |
121 |
--localstatedir=/var \ |
122 |
--sysconfdir=/etc/dovecot \ |
123 |
--enable-header-install \ |
124 |
--with-ioloop=best \ |
125 |
--with-poll=best \ |
126 |
$(use_enable debug) \ |
127 |
$(use_enable ipv6) \ |
128 |
$(use_with kerberos gssapi) \ |
129 |
$(use_with ldap) \ |
130 |
$(use_with mysql) \ |
131 |
$(use_with pam) \ |
132 |
$(use_with pop3d) \ |
133 |
$(use_with postgres pgsql) \ |
134 |
$(use_with sqlite3 sqlite) \ |
135 |
$(use_with vpopmail) \ |
136 |
${myconf} \ |
137 |
|| die "configure failed" |
138 |
emake || die "make failed" |
139 |
|
140 |
if use sieve; then |
141 |
einfo "Building sieve" |
142 |
cd "${SIEVE_S}" |
143 |
econf --with-dovecot="${S}" || die "configure failed (sieve)" |
144 |
emake || die "make failed (sieve)" |
145 |
fi |
146 |
} |
147 |
|
148 |
src_install () { |
149 |
make DESTDIR="${D}" install || die "make install failed" |
150 |
use suid && fperms u+s /usr/libexec/dovecot/deliver |
151 |
|
152 |
rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf |
153 |
|
154 |
newinitd "${FILESDIR}"/dovecot.init dovecot |
155 |
|
156 |
# Documentation |
157 |
rm -rf "${D}"/usr/share/doc/dovecot |
158 |
dodoc AUTHORS NEWS README TODO dovecot-example.conf |
159 |
use managesieve && dodoc README.managesieve |
160 |
if use doc; then |
161 |
dodoc doc/*.txt |
162 |
else |
163 |
local x= n= |
164 |
for x in doc/*.txt; do |
165 |
n=$(basename "${x}" .txt) |
166 |
[[ " ${DEVDOCS} " != *" ${n} "* ]] && dodoc "${x}" |
167 |
done |
168 |
fi |
169 |
|
170 |
# Create the dovecot.conf file from the dovecot-example.conf file that |
171 |
# the dovecot folks nicely left for us.... |
172 |
local conf="${D}/etc/dovecot/dovecot.conf" |
173 |
mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf |
174 |
|
175 |
# .maildir is the Gentoo default, but we need to support mbox to |
176 |
local mail_location="maildir:~/.maildir" |
177 |
if use mbox; then |
178 |
mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
179 |
keepdir /var/dovecot |
180 |
sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' "${conf}" |
181 |
fi |
182 |
sed -i -e \ |
183 |
"s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \ |
184 |
|| die "failed to update mail location settings in dovecot.conf" |
185 |
|
186 |
# We're using pam files (imap and pop3) provided by mailbase |
187 |
if use pam; then |
188 |
sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
189 |
"${conf}" || die "failed to update PAM settings in dovecot.conf" |
190 |
fi |
191 |
|
192 |
# Listen on ipv6 and ipv4 |
193 |
if use ipv6; then |
194 |
sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" \ |
195 |
|| die "failed to update listen settings in dovecot.conf" |
196 |
fi |
197 |
|
198 |
# Update ssl cert locations |
199 |
if use ssl; then |
200 |
sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \ |
201 |
-e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \ |
202 |
"${conf}" || die "failed to update SSL settings in dovecot.conf" |
203 |
fi |
204 |
|
205 |
# Install SQL configuration |
206 |
if use mysql || use postgres; then |
207 |
cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf |
208 |
fperms 600 /etc/dovecot/dovecot-sql.conf |
209 |
sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \ |
210 |
|| die "failed to update SQL settings in dovecot-sql.conf" |
211 |
dodoc doc/dovecot-sql-example.conf |
212 |
fi |
213 |
|
214 |
# Install LDAP configuration |
215 |
if use ldap; then |
216 |
cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf |
217 |
fperms 600 /etc/dovecot/dovecot-ldap.conf |
218 |
sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \ |
219 |
|| die "failed to update LDAP settings in dovecot-ldap.conf" |
220 |
dodoc doc/dovecot-ldap-example.conf |
221 |
fi |
222 |
|
223 |
# Install sieve plugin |
224 |
if use sieve; then |
225 |
make -C "${SIEVE_S}" DESTDIR="${D}" install \ |
226 |
|| die "make install failed (sieve)" |
227 |
fi |
228 |
|
229 |
dodir /var/run/dovecot |
230 |
fowners root:0 /var/run/dovecot |
231 |
fperms 0755 /var/run/dovecot |
232 |
keepdir /var/run/dovecot/login |
233 |
fowners root:dovecot /var/run/dovecot/login |
234 |
fperms 0750 /var/run/dovecot/login |
235 |
} |
236 |
|
237 |
get_config_var() { |
238 |
local varname=${1} |
239 |
if [[ -z ${varname} ]]; then |
240 |
die "${FUNCNAME}: variable name missing" |
241 |
fi |
242 |
sed -n 's/^[[:space:]]\?'"${varname}"'[[:space:]]*="*\([^#"]\+\)"*/\1/p' \ |
243 |
"${ROOT}"/etc/dovecot/dovecot.conf |
244 |
} |
245 |
|
246 |
pkg_postinst() { |
247 |
elog "The Dovecot configuration has vastly changed since 0.99." |
248 |
elog "You are encouraged to start afresh with a new configuration file." |
249 |
elog "see http://wiki.dovecot.org/ for configuration examples." |
250 |
|
251 |
if [[ -e "${ROOT}"/etc/dovecot.conf ]]; then |
252 |
echo |
253 |
ewarn "The Dovecot configuration now resides in ${ROOT}/etc/dovecot" |
254 |
fi |
255 |
|
256 |
local base_dir="$(get_config_var base_dir)" |
257 |
base_dir="${base_dir:-/var/run/dovecot}" |
258 |
if use ssl; then |
259 |
# Let's not make a new certificate if we already have one |
260 |
if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
261 |
-e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
262 |
einfo "Creating SSL certificate" |
263 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
264 |
install_cert /etc/ssl/dovecot/server |
265 |
chown dovecot:mail "${ROOT}"/etc/ssl/dovecot/server.{key,pem} |
266 |
fi |
267 |
if [[ ! -e "${ROOT}${base_dir}/login/ssl-parameters.dat" ]]; then |
268 |
echo |
269 |
elog "Dovecot requires DH SSL Parameters if you use SSL connections" |
270 |
elog "These take some time to make, and dovecot will create them before" |
271 |
elog "it allows any SSL connections." |
272 |
elog "You can create them now before starting dovecot like so" |
273 |
elog " emerge --config =${PF}" |
274 |
fi |
275 |
fi |
276 |
} |
277 |
|
278 |
pkg_config() { |
279 |
local base_dir="$(get_config_var base_dir)" |
280 |
base_dir="${base_dir:-/var/run/dovecot}" |
281 |
|
282 |
if use ssl; then |
283 |
einfo "Regenerating SSL parameters. This will take some time." |
284 |
"${ROOT}"/usr/libexec/dovecot/ssl-build-param "${base_dir}/login/ssl-parameters.dat" |
285 |
fi |
286 |
} |
287 |
|
288 |
|
289 |
|
290 |
1.1 net-mail/dovecot/dovecot-1.1_rc5.ebuild |
291 |
|
292 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.1_rc5.ebuild?rev=1.1&view=markup |
293 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.1_rc5.ebuild?rev=1.1&content-type=text/plain |
294 |
|
295 |
Index: dovecot-1.1_rc5.ebuild |
296 |
=================================================================== |
297 |
# Copyright 1999-2008 Gentoo Foundation |
298 |
# Distributed under the terms of the GNU General Public License v2 |
299 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.1_rc5.ebuild,v 1.1 2008/05/05 11:47:09 wschlich Exp $ |
300 |
|
301 |
inherit autotools eutils ssl-cert versionator |
302 |
|
303 |
MY_P="${P/_/.}" |
304 |
MY_PV12=$(get_version_component_range 1-2 ${PV}) |
305 |
S="${WORKDIR}/${MY_P}" |
306 |
SIEVE="dovecot-sieve-1.1.4" |
307 |
SIEVE_S="${WORKDIR}/${SIEVE}" |
308 |
MANAGESIEVE_PATCH="managesieve-0.10.2" |
309 |
MANAGESIEVE="managesieve-0.10.2" |
310 |
MANAGESIEVE_S="${WORKDIR}/${PN}-${MY_PV12}-${MANAGESIEVE}" |
311 |
|
312 |
SRC_URI="http://dovecot.org/releases/${MY_PV12}/rc/${MY_P}.tar.gz |
313 |
sieve? ( http://dovecot.org/releases/sieve/${SIEVE}.tar.gz ) |
314 |
managesieve? ( http://www.rename-it.nl/${PN}/${MY_PV12}/${MY_P}-${MANAGESIEVE_PATCH}.diff.gz |
315 |
http://www.rename-it.nl/${PN}/${MY_PV12}/${PN}-${MY_PV12}-${MANAGESIEVE}.tar.gz )" |
316 |
|
317 |
DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
318 |
HOMEPAGE="http://www.dovecot.org/" |
319 |
|
320 |
SLOT="0" |
321 |
LICENSE="LGPL-2.1" |
322 |
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" |
323 |
|
324 |
IUSE="debug doc ipv6 kerberos ldap managesieve mbox mysql pop3d pam postgres sieve sqlite3 ssl suid vpopmail" |
325 |
|
326 |
# Developer documentation, controlled by the doc USE flag |
327 |
DEVDOCS="auth-protocol index multiaccess securecoding" |
328 |
|
329 |
DEPEND=">=sys-apps/sed-4 |
330 |
kerberos? ( virtual/krb5 ) |
331 |
ldap? ( net-nds/openldap ) |
332 |
pam? ( virtual/pam ) |
333 |
ssl? ( dev-libs/openssl ) |
334 |
postgres? ( dev-db/postgresql ) |
335 |
mysql? ( virtual/mysql ) |
336 |
sqlite3? ( =dev-db/sqlite-3* ) |
337 |
vpopmail? ( net-mail/vpopmail )" |
338 |
|
339 |
RDEPEND="${DEPEND} |
340 |
>=net-mail/mailbase-0.00-r8" |
341 |
|
342 |
src_unpack() { |
343 |
unpack ${A} |
344 |
cd "${S}" |
345 |
if use managesieve; then |
346 |
epatch "${WORKDIR}"/${MY_P}-${MANAGESIEVE_PATCH}.diff |
347 |
eautoreconf |
348 |
fi |
349 |
} |
350 |
|
351 |
pkg_setup() { |
352 |
if ! use sieve && use managesieve; then |
353 |
eerror "managesieve USE flag selected but sieve USE flag unselected" |
354 |
die "USE flag problem" |
355 |
fi |
356 |
# Add user and group for login process (same as for fedora/redhat) |
357 |
enewgroup dovecot 97 |
358 |
enewuser dovecot 97 -1 /dev/null dovecot |
359 |
} |
360 |
|
361 |
src_compile() { |
362 |
local myconf= |
363 |
use ssl && myconf="${myconf} --with-ssl=openssl" \ |
364 |
|| myconf="${myconf} --without-ssl" |
365 |
econf \ |
366 |
--localstatedir=/var \ |
367 |
--sysconfdir=/etc/dovecot \ |
368 |
--enable-header-install \ |
369 |
--with-ioloop=best \ |
370 |
--with-poll=best \ |
371 |
$(use_enable debug) \ |
372 |
$(use_enable ipv6) \ |
373 |
$(use_with kerberos gssapi) \ |
374 |
$(use_with ldap) \ |
375 |
$(use_with mysql) \ |
376 |
$(use_with pam) \ |
377 |
$(use_with pop3d) \ |
378 |
$(use_with postgres pgsql) \ |
379 |
$(use_with sqlite3 sqlite) \ |
380 |
$(use_with vpopmail) \ |
381 |
${myconf} \ |
382 |
|| die "configure failed" |
383 |
emake || die "make failed" |
384 |
|
385 |
if use sieve; then |
386 |
einfo "Building sieve" |
387 |
cd "${SIEVE_S}" |
388 |
econf --with-dovecot="${S}" || die "configure failed (sieve)" |
389 |
emake || die "make failed (sieve)" |
390 |
fi |
391 |
|
392 |
if use managesieve; then |
393 |
einfo "Building managesieve" |
394 |
cd "${MANAGESIEVE_S}" |
395 |
econf --with-dovecot="${S}" --with-dovecot-sieve="${SIEVE_S}" \ |
396 |
|| die "configure failed (managesieve)" |
397 |
emake || die "make failed (managesieve)" |
398 |
fi |
399 |
} |
400 |
|
401 |
src_install () { |
402 |
make DESTDIR="${D}" install || die "make install failed" |
403 |
use suid && fperms u+s /usr/libexec/dovecot/deliver |
404 |
|
405 |
rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf |
406 |
|
407 |
newinitd "${FILESDIR}"/dovecot.init-r1 dovecot |
408 |
|
409 |
# Documentation |
410 |
rm -rf "${D}"/usr/share/doc/dovecot |
411 |
dodoc AUTHORS NEWS README TODO dovecot-example.conf |
412 |
use managesieve && newdoc ${MANAGESIEVE_S}/README README.managesieve |
413 |
if use doc; then |
414 |
dodoc doc/*.txt |
415 |
else |
416 |
local x= n= |
417 |
for x in doc/*.txt; do |
418 |
n=$(basename "${x}" .txt) |
419 |
[[ " ${DEVDOCS} " != *" ${n} "* ]] && dodoc "${x}" |
420 |
done |
421 |
fi |
422 |
|
423 |
# Create the dovecot.conf file from the dovecot-example.conf file that |
424 |
# the dovecot folks nicely left for us.... |
425 |
local conf="${D}/etc/dovecot/dovecot.conf" |
426 |
mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf |
427 |
|
428 |
# .maildir is the Gentoo default, but we need to support mbox to |
429 |
local mail_location="maildir:~/.maildir" |
430 |
if use mbox; then |
431 |
mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
432 |
keepdir /var/dovecot |
433 |
sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' "${conf}" |
434 |
fi |
435 |
sed -i -e \ |
436 |
"s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \ |
437 |
|| die "failed to update mail location settings in dovecot.conf" |
438 |
|
439 |
# We're using pam files (imap and pop3) provided by mailbase |
440 |
if use pam; then |
441 |
sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
442 |
"${conf}" || die "failed to update PAM settings in dovecot.conf" |
443 |
fi |
444 |
|
445 |
# Listen on ipv6 and ipv4 |
446 |
if use ipv6; then |
447 |
sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" \ |
448 |
|| die "failed to update listen settings in dovecot.conf" |
449 |
fi |
450 |
|
451 |
# Update ssl cert locations |
452 |
if use ssl; then |
453 |
sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \ |
454 |
-e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \ |
455 |
"${conf}" || die "failed to update SSL settings in dovecot.conf" |
456 |
fi |
457 |
|
458 |
# Install SQL configuration |
459 |
if use mysql || use postgres; then |
460 |
cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf |
461 |
fperms 600 /etc/dovecot/dovecot-sql.conf |
462 |
sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \ |
463 |
|| die "failed to update SQL settings in dovecot-sql.conf" |
464 |
dodoc doc/dovecot-sql-example.conf |
465 |
fi |
466 |
|
467 |
# Install LDAP configuration |
468 |
if use ldap; then |
469 |
cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf |
470 |
fperms 600 /etc/dovecot/dovecot-ldap.conf |
471 |
sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \ |
472 |
|| die "failed to update LDAP settings in dovecot-ldap.conf" |
473 |
dodoc doc/dovecot-ldap-example.conf |
474 |
fi |
475 |
|
476 |
# Install sieve plugin |
477 |
if use sieve; then |
478 |
make -C "${SIEVE_S}" DESTDIR="${D}" install \ |
479 |
|| die "make install failed (sieve)" |
480 |
fi |
481 |
|
482 |
# Install managesieve |
483 |
if use managesieve; then |
484 |
make -C "${MANAGESIEVE_S}" DESTDIR="${D}" install \ |
485 |
|| die "make install failed (managesieve)" |
486 |
fi |
487 |
|
488 |
dodir /var/run/dovecot |
489 |
fowners root:0 /var/run/dovecot |
490 |
fperms 0755 /var/run/dovecot |
491 |
keepdir /var/run/dovecot/login |
492 |
fowners root:dovecot /var/run/dovecot/login |
493 |
fperms 0750 /var/run/dovecot/login |
494 |
} |
495 |
|
496 |
get_config_var() { |
497 |
local varname=${1} |
498 |
if [[ -z ${varname} ]]; then |
499 |
die "${FUNCNAME}: variable name missing" |
500 |
fi |
501 |
sed -n 's/^[[:space:]]\?'"${varname}"'[[:space:]]*="*\([^#"]\+\)"*/\1/p' \ |
502 |
"${ROOT}"/etc/dovecot/dovecot.conf |
503 |
} |
504 |
|
505 |
pkg_postinst() { |
506 |
elog "The Dovecot configuration has vastly changed since 0.99." |
507 |
elog "You are encouraged to start afresh with a new configuration file." |
508 |
elog "see http://wiki.dovecot.org/ for configuration examples." |
509 |
|
510 |
if [[ -e "${ROOT}"/etc/dovecot.conf ]]; then |
511 |
echo |
512 |
ewarn "The Dovecot configuration now resides in ${ROOT}/etc/dovecot" |
513 |
fi |
514 |
|
515 |
local base_dir="$(get_config_var base_dir)" |
516 |
base_dir="${base_dir:-/var/run/dovecot}" |
517 |
if use ssl; then |
518 |
# Let's not make a new certificate if we already have one |
519 |
if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
520 |
-e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
521 |
einfo "Creating SSL certificate" |
522 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
523 |
install_cert /etc/ssl/dovecot/server |
524 |
chown dovecot:mail "${ROOT}"/etc/ssl/dovecot/server.{key,pem} |
525 |
fi |
526 |
if [[ ! -e "${ROOT}${base_dir}/login/ssl-parameters.dat" ]]; then |
527 |
echo |
528 |
elog "Dovecot requires DH SSL Parameters if you use SSL connections" |
529 |
elog "These take some time to make, and dovecot will create them before" |
530 |
elog "it allows any SSL connections." |
531 |
elog "You can create them now before starting dovecot like so" |
532 |
elog " emerge --config =${PF}" |
533 |
fi |
534 |
fi |
535 |
} |
536 |
|
537 |
pkg_config() { |
538 |
local base_dir="$(get_config_var base_dir)" |
539 |
base_dir="${base_dir:-/var/run/dovecot}" |
540 |
|
541 |
if use ssl; then |
542 |
einfo "Regenerating SSL parameters. This will take some time." |
543 |
"${ROOT}"/usr/libexec/dovecot/ssl-build-param "${base_dir}/login/ssl-parameters.dat" |
544 |
fi |
545 |
} |
546 |
|
547 |
|
548 |
|
549 |
-- |
550 |
gentoo-commits@l.g.o mailing list |