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