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