Gentoo Archives: gentoo-commits

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