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