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