Gentoo Archives: gentoo-commits

From: "Eray Aslan (eras)" <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/dovecot: ChangeLog dovecot-2.0.16-r1.ebuild
Date: Sun, 20 Nov 2011 10:27:46
Message-Id: 20111120102735.D3AE62004B@flycatcher.gentoo.org
1 eras 11/11/20 10:27:35
2
3 Modified: ChangeLog
4 Added: dovecot-2.0.16-r1.ebuild
5 Log:
6 sieve version bump
7
8 (Portage version: 2.1.10.36/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.323 net-mail/dovecot/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.323&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.323&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.322&r2=1.323
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v
20 retrieving revision 1.322
21 retrieving revision 1.323
22 diff -u -r1.322 -r1.323
23 --- ChangeLog 18 Nov 2011 05:23:15 -0000 1.322
24 +++ ChangeLog 20 Nov 2011 10:27:35 -0000 1.323
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-mail/dovecot
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.322 2011/11/18 05:23:15 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.323 2011/11/20 10:27:35 eras Exp $
30 +
31 +*dovecot-2.0.16-r1 (20 Nov 2011)
32 +
33 + 20 Nov 2011; Eray Aslan <eras@g.o> +dovecot-2.0.16-r1.ebuild:
34 + sieve version bump
35
36 18 Nov 2011; Jeroen Roovers <jer@g.o> dovecot-2.0.16.ebuild:
37 Stable for HPPA (bug #390887).
38
39
40
41 1.1 net-mail/dovecot/dovecot-2.0.16-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.0.16-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.0.16-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: dovecot-2.0.16-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-2.0.16-r1.ebuild,v 1.1 2011/11/20 10:27:35 eras Exp $
51
52 EAPI=4
53
54 inherit eutils versionator ssl-cert autotools-utils
55
56 MY_P="${P/_/.}"
57 major_minor="$( get_version_component_range 1-2 )"
58 sieve_version="0.2.5"
59 SRC_URI="http://dovecot.org/releases/${major_minor}/${MY_P}.tar.gz
60 sieve? (
61 http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.tar.gz
62 )
63 managesieve? (
64 http://www.rename-it.nl/dovecot/${major_minor}/dovecot-${major_minor}-pigeonhole-${sieve_version}.tar.gz
65 ) "
66 DESCRIPTION="An IMAP and POP3 server written with security primarily in mind"
67 HOMEPAGE="http://www.dovecot.org/"
68
69 SLOT="0"
70 LICENSE="LGPL-2.1 MIT"
71 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
72
73 IUSE="bzip2 caps cydir sdbox doc ipv6 kerberos ldap +maildir managesieve mbox
74 mdbox mysql pam postgres sieve sqlite +ssl static-libs suid vpopmail zlib"
75
76 DEPEND="caps? ( sys-libs/libcap )
77 kerberos? ( virtual/krb5 )
78 ldap? ( net-nds/openldap )
79 mysql? ( virtual/mysql )
80 pam? ( virtual/pam )
81 postgres? ( dev-db/postgresql-base )
82 sqlite? ( dev-db/sqlite )
83 ssl? ( dev-libs/openssl )
84 vpopmail? ( net-mail/vpopmail )
85 virtual/libiconv"
86
87 RDEPEND="${DEPEND}
88 >=net-mail/mailbase-0.00-r8"
89
90 S=${WORKDIR}/${MY_P}
91
92 pkg_setup() {
93 if use managesieve && ! use sieve; then
94 ewarn "managesieve USE flag selected but sieve USE flag unselected"
95 ewarn "sieve USE flag will be turned on"
96 fi
97
98 # Add user and group for login process (same as for fedora/redhat)
99 # default internal user
100 enewgroup dovecot 97
101 enewuser dovecot 97 -1 /dev/null dovecot
102 # add "mail" group for suid'ing. Better security isolation.
103 if use suid; then
104 enewgroup mail
105 fi
106 # default login user
107 enewuser dovenull -1 -1 /dev/null
108 }
109
110 src_configure() {
111 local conf=""
112
113 if use postgres || use mysql || use sqlite; then
114 conf="${conf} --with-sql"
115 fi
116
117 local storages=""
118 for storage in cydir sdbox mdbox maildir mbox; do
119 use ${storage} && storages="${storage} ${storages}"
120 done
121 [ "${storages}" ] || storages="maildir"
122
123 # turn valgrind tests off. Bug #340791
124 VALGRIND=no econf \
125 --localstatedir="${EPREFIX}/var" \
126 --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \
127 $( use_with bzip2 bzlib ) \
128 $( use_with caps libcap ) \
129 $( use_with kerberos gssapi ) \
130 $( use_with ldap ) \
131 $( use_with mysql ) \
132 $( use_with pam ) \
133 $( use_with postgres pgsql ) \
134 $( use_with sqlite ) \
135 $( use_with ssl ) \
136 $( use_with vpopmail ) \
137 $( use_with zlib ) \
138 $( use_enable static-libs static ) \
139 --with-storages="${storages}" \
140 --disable-rpath \
141 --without-systemdsystemunitdir \
142 ${conf}
143
144 if use sieve || use managesieve ; then
145 # The sieve plugin needs this file to be build to determine the plugin
146 # directory and the list of libraries to link to.
147 emake dovecot-config || die "emake dovecot-config failed"
148 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
149 econf \
150 $( use_enable static-libs static ) \
151 --localstatedir="${EPREFIX}/var" \
152 --enable-shared \
153 --with-dovecot="../${MY_P}" \
154 $( use_with managesieve )
155 fi
156 }
157
158 src_compile() {
159 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
160
161 if use sieve || use managesieve ; then
162 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
163 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
164 fi
165 }
166
167 src_test() {
168 default_src_test
169 if use sieve || use managesieve ; then
170 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
171 default_src_test
172 fi
173 }
174
175 src_install () {
176 emake DESTDIR="${ED}" install
177
178 # insecure:
179 # use suid && fperms u+s /usr/libexec/dovecot/deliver
180 # better:
181 if use suid;then
182 einfo "Changing perms to allow deliver to be suided"
183 fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
184 fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda"
185 fi
186
187 newinitd "${FILESDIR}"/dovecot.init-r3 dovecot
188
189 rm -rf "${ED}"/usr/share/doc/dovecot
190
191 dodoc AUTHORS NEWS README TODO
192 dodoc doc/*.{txt,cnf,xml,sh}
193 docinto example-config
194 dodoc doc/example-config/*.{conf,ext}
195 docinto example-config/conf.d
196 dodoc doc/example-config/conf.d/*.{conf,ext}
197 docinto wiki
198 dodoc doc/wiki/*
199 doman doc/man/*.{1,7}
200
201 # Create the dovecot.conf file from the dovecot-example.conf file that
202 # the dovecot folks nicely left for us....
203 local conf="${ED}/etc/dovecot/dovecot.conf"
204 local confd="${ED}/etc/dovecot/conf.d"
205
206 insinto /etc/dovecot
207 doins doc/example-config/*.{conf,ext}
208 insinto /etc/dovecot/conf.d
209 doins doc/example-config/conf.d/*.{conf,ext}
210 fperms 0600 "${EPREFIX}"/etc/dovecot/dovecot-{ldap,sql}.conf.ext
211 rm -f "${confd}/../README"
212
213 # .maildir is the Gentoo default
214 local mail_location="maildir:~/.maildir"
215 if ! use maildir; then
216 if use mbox; then
217 mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u"
218 keepdir /var/dovecot
219 sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \
220 "${confd}/10-mail.conf" || die "sed failed"
221 elif use sdbox ; then
222 mail_location="sdbox:~/.sdbox"
223 elif use mdbox ; then
224 mail_location="mdbox:~/.mdbox"
225 fi
226 fi
227 sed -i -e \
228 "s|#mail_location =|mail_location = ${mail_location}|" \
229 "${confd}/10-mail.conf" \
230 || die "failed to update mail location settings in 10-mail.conf"
231
232 # We're using pam files (imap and pop3) provided by mailbase
233 if use pam; then
234 sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \
235 "${confd}/auth-system.conf.ext" \
236 || die "failed to update PAM settings in auth-system.conf.ext"
237 # mailbase does not provide a sieve pam file
238 use managesieve && dosym imap /etc/pam.d/sieve
239 sed -i -e \
240 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \
241 "${confd}/10-auth.conf" \
242 || die "failed to update PAM settings in 10-auth.conf"
243 fi
244
245 # Disable ipv6 if necessary
246 if ! use ipv6; then
247 sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \
248 || die "failed to update listen settings in dovecot.conf"
249 fi
250
251 # Update ssl cert locations
252 if use ssl; then
253 sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \
254 || die "ssl conf failed"
255 sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \
256 -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \
257 "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf"
258 fi
259
260 # Install SQL configuration
261 if use mysql || use postgres; then
262 sed -i -e \
263 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \
264 "${confd}/10-auth.conf" || die "failed to update SQL settings in \
265 10-auth.conf"
266 fi
267
268 # Install LDAP configuration
269 if use ldap; then
270 sed -i -e \
271 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \
272 "${confd}/10-auth.conf" \
273 || die "failed to update ldap settings in 10-auth.conf"
274 fi
275
276 if use vpopmail; then
277 sed -i -e \
278 's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \
279 "${confd}/10-auth.conf" \
280 || die "failed to update vpopmail settings in 10-auth.conf"
281 fi
282
283 if use sieve || use managesieve ; then
284 cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed"
285 emake DESTDIR="${ED}" install
286 sed -i -e \
287 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \
288 || die "failed to update sieve settings in 15-lda.conf"
289 rm -rf "${ED}"/usr/share/doc/dovecot
290 dodoc doc/*.txt
291 docinto example-config/conf.d
292 dodoc doc/example-config/conf.d/*.conf
293 insinto /etc/dovecot/conf.d
294 doins doc/example-config/conf.d/90-sieve.conf
295 use managesieve && doins doc/example-config/conf.d/20-managesieve.conf
296 docinto sieve/rfc
297 dodoc doc/rfc/*.txt
298 docinto sieve/devel
299 dodoc doc/devel/DESIGN
300 doman doc/man/*.{1,7}
301 fi
302
303 use static-libs || remove_libtool_files
304 }
305
306 pkg_preinst() {
307 if has_version "<${CATEGORY}/${PN}-2" ; then
308 elog "There are a lot of changes in configuration files in dovecot-2.0."
309 elog "Please read http://wiki.dovecot.org/Upgrading and"
310 elog "check the conf files in ${ROOT}etc/dovecot."
311 elog "You can also run doveconf -n before running etc-update or"
312 elog "dispatch-conf to get an idea about what needs to be changed."
313 ewarn "\nDo NOT {re}start dovecot without checking your conf files"
314 ewarn "and making the necessary changes.\n"
315 fi
316 }
317
318 pkg_postinst() {
319 if use ssl; then
320 # Let's not make a new certificate if we already have one
321 if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \
322 -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then
323 einfo "Creating SSL certificate"
324 SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}"
325 install_cert /etc/ssl/dovecot/server
326 fi
327 fi
328 }