Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/dovecot: dovecot-1.2.4.ebuild metadata.xml ChangeLog
Date: Thu, 10 Sep 2009 17:18:10
Message-Id: E1MlnHb-0001YV-Sn@stork.gentoo.org
1 patrick 09/09/10 17:18:07
2
3 Modified: metadata.xml ChangeLog
4 Added: dovecot-1.2.4.ebuild
5 Log:
6 Bump to 1.2.4. Many new features and useflags, thanks to Robert Foerster, Bjoern, Thomas Arnett and Eray Aslan for the patches and all the testers. Fixes #276480
7 (Portage version: 2.2_rc40/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.7 net-mail/dovecot/metadata.xml
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/metadata.xml?rev=1.7&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/metadata.xml?rev=1.7&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/metadata.xml?r1=1.6&r2=1.7
15
16 Index: metadata.xml
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/metadata.xml,v
19 retrieving revision 1.6
20 retrieving revision 1.7
21 diff -u -r1.6 -r1.7
22 --- metadata.xml 23 Aug 2008 06:28:50 -0000 1.6
23 +++ metadata.xml 10 Sep 2009 17:18:07 -0000 1.7
24 @@ -8,6 +8,8 @@
25 <description>Primary maintainer</description>
26 </maintainer>
27 <use>
28 + <flag name="cydir">Adds cydir storage support</flag>
29 + <flag name="dbox">Adds cydir storage support</flag>
30 <flag name="managesieve">Adds managesieve protocol support</flag>
31 <flag name="pop3d">Build pop3d support</flag>
32 <flag name="sieve">Build the sieve plugin</flag>
33
34
35
36 1.205 net-mail/dovecot/ChangeLog
37
38 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.205&view=markup
39 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.205&content-type=text/plain
40 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.204&r2=1.205
41
42 Index: ChangeLog
43 ===================================================================
44 RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v
45 retrieving revision 1.204
46 retrieving revision 1.205
47 diff -u -r1.204 -r1.205
48 --- ChangeLog 9 Jun 2009 07:01:35 -0000 1.204
49 +++ ChangeLog 10 Sep 2009 17:18:07 -0000 1.205
50 @@ -1,6 +1,14 @@
51 # ChangeLog for net-mail/dovecot
52 -# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2
53 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.204 2009/06/09 07:01:35 wschlich Exp $
54 +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
55 +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.205 2009/09/10 17:18:07 patrick Exp $
56 +
57 +*dovecot-1.2.4 (10 Sep 2009)
58 +
59 + 10 Sep 2009; Patrick Lauer <patrick@g.o> +dovecot-1.2.4.ebuild,
60 + metadata.xml:
61 + Bump to 1.2.4. Many new features and useflags, thanks to Robert Foerster,
62 + Bjoern, Thomas Arnett and Eray Aslan for the patches and all the testers.
63 + Fixes #276480
64
65 *dovecot-1.1.16 (09 Jun 2009)
66
67
68
69
70 1.1 net-mail/dovecot/dovecot-1.2.4.ebuild
71
72 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.2.4.ebuild?rev=1.1&view=markup
73 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.2.4.ebuild?rev=1.1&content-type=text/plain
74
75 Index: dovecot-1.2.4.ebuild
76 ===================================================================
77 # Copyright 1999-2009 Gentoo Foundation
78 # Distributed under the terms of the GNU General Public License v2
79 # $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.2.4.ebuild,v 1.1 2009/09/10 17:18:07 patrick Exp $
80
81 EAPI="2"
82
83 inherit eutils versionator
84
85 major_minor="$( get_version_component_range 1-2 "${PV}" )"
86 sieve_version="0.1.12"
87 managesieve_version="0.11.9"
88 SRC_URI="http://dovecot.org/releases/${major_minor}/${P}.tar.gz
89 sieve? ( http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-sieve-${sieve_version}.tar.gz )
90 managesieve? (
91 http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${PV}-managesieve-${managesieve_version}.diff.gz
92 http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-managesieve-${managesieve_version}.tar.gz
93 )"
94 DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
95 HOMEPAGE="http://www.dovecot.org/"
96
97 SLOT="0"
98 LICENSE="LGPL-2.1" # MIT too?
99 KEYWORDS="~amd64 ~x86"
100
101 IUSE="berkdb bzip2 caps cydir dbox doc kerberos ldap maildir managesieve mbox mysql pam postgres sieve sqlite ssl suid vpopmail zlib"
102
103 DEPEND="berkdb? ( sys-libs/db )
104 caps? ( sys-libs/libcap )
105 kerberos? ( virtual/krb5 )
106 ldap? ( net-nds/openldap )
107 mysql? ( virtual/mysql )
108 pam? ( virtual/pam )
109 postgres? ( virtual/postgresql-base )
110 sqlite? ( dev-db/sqlite )
111 ssl? ( dev-libs/openssl )
112 vpopmail? ( net-mail/vpopmail )"
113
114 RDEPEND="${DEPEND}
115 >=net-mail/mailbase-0.00-r8"
116
117 pkg_setup() {
118 if use managesieve && ! use sieve; then
119 eerror "managesieve USE flag selected but sieve USE flag unselected"
120 die "USE flag problem"
121 fi
122
123 # Add user and group for login process (same as for fedora/redhat)
124 enewgroup dovecot 97
125 enewuser dovecot 97 -1 /dev/null dovecot
126 }
127
128 src_prepare() {
129 use managesieve && epatch "${WORKDIR}"/dovecot-${PV}-managesieve-${managesieve_version}.diff
130 }
131
132 src_configure() {
133 local conf=""
134
135 if use postgres || use mysql || use sqlite; then
136 conf="${conf} --with-sql=plugin"
137 fi
138
139 use ldap && conf="${conf} --with-ldap=plugin"
140 use kerberos && conf="${conf} --with-gssapi=plugin"
141
142 local storages=""
143 for storage in cydir dbox maildir mbox; do
144 use ${storage} && storages="${storage} ${storages}"
145 done
146 [ "${storages}" ] || storages="maildir"
147
148 econf \
149 --sysconfdir=/etc/dovecot \
150 --localstatedir=/var \
151 --with-moduledir="/usr/$( get_libdir )/dovecot" \
152 $( use_with berkdb db ) \
153 $( use_with bzip2 bzlib ) \
154 $( use_with caps libcap ) \
155 $( use_with mysql ) \
156 $( use_with pam ) \
157 $( use_with postgres pgsql ) \
158 $( use_with sqlite ) \
159 $( use_with ssl ) \
160 $( use_with vpopmail ) \
161 $( use_with zlib ) \
162 --with-storages="${storages}" \
163 --with-pic \
164 --enable-header-install \
165 ${conf} \
166 || die "configure failed"
167
168 if use sieve; then
169 # The sieve plugin needs this file to be build to determine the plugin
170 # directory and the list of libraries to link to.
171 emake dovecot-config || die "emake dovecot-config failed"
172 cd "../dovecot-${major_minor}-sieve-${sieve_version}"
173 econf --with-dovecot="${S}"
174
175 if use managesieve; then
176 cd "../dovecot-${major_minor}-managesieve-${managesieve_version}"
177 econf --with-dovecot="${S}" --with-dovecot-sieve="../dovecot-${major_minor}-sieve-${sieve_version}"
178 fi
179 fi
180 }
181
182 src_compile() {
183 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed"
184
185 if use sieve; then
186 cd "../dovecot-${major_minor}-sieve-${sieve_version}"
187 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed"
188
189 if use managesieve; then
190 cd "../dovecot-${major_minor}-managesieve-${managesieve_version}"
191 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed"
192 fi
193 fi
194 }
195
196 src_install () {
197 emake DESTDIR="${D}" install || die "make install failed"
198
199 use suid && fperms u+s /usr/libexec/dovecot/deliver
200
201 rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf
202
203 newinitd "${FILESDIR}"/dovecot.init-r2 dovecot
204
205 rm -rf "${D}"/usr/share/doc/dovecot
206 use doc && dodoc AUTHORS NEWS README TODO dovecot-example.conf doc/dovecot-{db,dict-sql}-example.conf doc/{securecoding,auth-protocol,documentation}.txt doc/dovecot-openssl.cnf
207
208 # Create the dovecot.conf file from the dovecot-example.conf file that
209 # the dovecot folks nicely left for us....
210 local conf="${D}/etc/dovecot/dovecot.conf"
211 mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf
212
213 # .maildir is the Gentoo default, but we need to support mbox to
214 local mail_location="maildir:~/.maildir"
215 if use mbox; then
216 mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
217 keepdir /var/dovecot
218 sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' "${conf}"
219 fi
220 sed -i -e \
221 "s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \
222 || die "failed to update mail location settings in dovecot.conf"
223
224 # We're using pam files (imap and pop3) provided by mailbase
225 if use pam; then
226 sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
227 "${conf}" || die "failed to update PAM settings in dovecot.conf"
228 # mailbase does not provide a managesieve pam file
229 use managesieve && dosym imap /etc/pam.d/managesieve
230 fi
231
232 # Listen on ipv6 and ipv4
233 if use ipv6; then
234 sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" \
235 || die "failed to update listen settings in dovecot.conf"
236 fi
237
238 # Update ssl cert locations
239 if use ssl; then
240 sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \
241 -e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \
242 "${conf}" || die "failed to update SSL settings in dovecot.conf"
243 fi
244
245 # Install SQL configuration
246 if use mysql || use postgres; then
247 cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf
248 fperms 600 /etc/dovecot/dovecot-sql.conf
249 sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \
250 || die "failed to update SQL settings in dovecot-sql.conf"
251 dodoc doc/dovecot-sql-example.conf
252 fi
253
254 # Install LDAP configuration
255 if use ldap; then
256 cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf
257 fperms 600 /etc/dovecot/dovecot-ldap.conf
258 sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \
259 || die "failed to update LDAP settings in dovecot-ldap.conf"
260 dodoc doc/dovecot-ldap-example.conf
261 fi
262
263 if use sieve; then
264 cd "../dovecot-${major_minor}-sieve-${sieve_version}"
265 emake DESTDIR="${D}" install || die "make install failed (sieve)"
266
267 if use managesieve; then
268 cd "../dovecot-${major_minor}-managesieve-${managesieve_version}"
269 emake DESTDIR="${D}" install || die "make install failed (managesieve)"
270 fi
271 fi
272
273 dodir /var/run/dovecot
274 fowners root:root /var/run/dovecot
275 fperms 0755 /var/run/dovecot
276 keepdir /var/run/dovecot/login
277 fowners root:dovecot /var/run/dovecot/login
278 fperms 0750 /var/run/dovecot/login
279
280 ewarn "If you are upgrading from Dovecot 1.1, read "
281 ewarn " http://wiki.dovecot.org/Upgrading/1.2"
282 if use sieve; then
283 ewarn " http://wiki.dovecot.org/LDA/Sieve/Dovecot#Migration_from_CMUSieve"
284 ewarn " In particular, do not forget to change cmusieve to sieve"
285 fi
286 }