1 |
eras 10/11/09 08:03:07 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dovecot-2.0.7.ebuild |
5 |
Log: |
6 |
Version bump |
7 |
|
8 |
(Portage version: 2.1.9.24/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.274 net-mail/dovecot/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.274&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.274&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.273&r2=1.274 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v |
20 |
retrieving revision 1.273 |
21 |
retrieving revision 1.274 |
22 |
diff -u -r1.273 -r1.274 |
23 |
--- ChangeLog 5 Nov 2010 14:31:29 -0000 1.273 |
24 |
+++ ChangeLog 9 Nov 2010 08:03:07 -0000 1.274 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for net-mail/dovecot |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.273 2010/11/05 14:31:29 eras Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.274 2010/11/09 08:03:07 eras Exp $ |
30 |
+ |
31 |
+*dovecot-2.0.7 (09 Nov 2010) |
32 |
+ |
33 |
+ 09 Nov 2010; Eray Aslan <eras@g.o> +dovecot-2.0.7.ebuild: |
34 |
+ Version bump |
35 |
|
36 |
05 Nov 2010; Eray Aslan <eras@g.o> metadata.xml: |
37 |
Correct email and maintainer info. Revise USE flag description |
38 |
|
39 |
|
40 |
|
41 |
1.1 net-mail/dovecot/dovecot-2.0.7.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.0.7.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-mail/dovecot/dovecot-2.0.7.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: dovecot-2.0.7.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2010 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.7.ebuild,v 1.1 2010/11/09 08:03:07 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.1" |
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 ~ia64 ~ppc ~sparc ~x86" |
72 |
|
73 |
IUSE="berkdb bzip2 caps cydir sdbox doc ipv6 kerberos ldap +maildir managesieve mbox mdbox mysql pam postgres sieve sqlite +ssl suid vpopmail zlib" |
74 |
|
75 |
DEPEND="berkdb? ( sys-libs/db ) |
76 |
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 |
|
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 |
${conf} |
140 |
|
141 |
if use sieve || use managesieve ; then |
142 |
# The sieve plugin needs this file to be build to determine the plugin |
143 |
# directory and the list of libraries to link to. |
144 |
emake dovecot-config || die "emake dovecot-config failed" |
145 |
cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
146 |
econf \ |
147 |
--localstatedir="${EPREFIX}/var" \ |
148 |
--enable-shared \ |
149 |
--with-dovecot="../${MY_P}" \ |
150 |
$( use_with managesieve ) |
151 |
fi |
152 |
} |
153 |
|
154 |
src_compile() { |
155 |
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make failed" |
156 |
|
157 |
if use sieve || use managesieve ; then |
158 |
cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
159 |
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "make sieve failed" |
160 |
fi |
161 |
} |
162 |
|
163 |
src_test() { |
164 |
default_src_test |
165 |
if use sieve || use managesieve ; then |
166 |
cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
167 |
default_src_test |
168 |
fi |
169 |
} |
170 |
|
171 |
src_install () { |
172 |
emake DESTDIR="${ED}" install || die "make install failed" |
173 |
|
174 |
# insecure: |
175 |
# use suid && fperms u+s /usr/libexec/dovecot/deliver |
176 |
# better: |
177 |
if use suid;then |
178 |
einfo "Changing perms to allow deliver to be suided" |
179 |
fowners root:mail "${ED}"/usr/libexec/dovecot/deliver |
180 |
fperms 4750 "${ED}"/usr/libexec/dovecot/deliver |
181 |
fi |
182 |
|
183 |
newinitd "${FILESDIR}"/dovecot.init-r2 dovecot |
184 |
|
185 |
rm -rf "${ED}"/usr/share/doc/dovecot |
186 |
rm -rf "${ED}"/usr/share/aclocal |
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 |
sed -i -e "s:/usr/share/doc/dovecot/:/usr/share/doc/${PF}/:" \ |
209 |
"${confd}/../README" || die "sed failed" |
210 |
|
211 |
# .maildir is the Gentoo default |
212 |
local mail_location="maildir:~/.maildir" |
213 |
if ! use maildir; then |
214 |
if use mbox; then |
215 |
mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
216 |
keepdir /var/dovecot |
217 |
sed -i -e 's|#mail_privileged_group =|mail_privileged_group = mail|' \ |
218 |
"${confd}/10-mail.conf" || die "sed failed" |
219 |
elif use sdbox ; then |
220 |
mail_location="sdbox:~/.sdbox" |
221 |
elif use mdbox ; then |
222 |
mail_location="mdbox:~/.mdbox" |
223 |
fi |
224 |
fi |
225 |
sed -i -e \ |
226 |
"s|#mail_location =|mail_location = ${mail_location}|" \ |
227 |
"${confd}/10-mail.conf" \ |
228 |
|| die "failed to update mail location settings in 10-mail.conf" |
229 |
|
230 |
# We're using pam files (imap and pop3) provided by mailbase |
231 |
if use pam; then |
232 |
sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
233 |
"${confd}/auth-system.conf.ext" \ |
234 |
|| die "failed to update PAM settings in auth-system.conf.ext" |
235 |
# mailbase does not provide a sieve pam file |
236 |
use managesieve && dosym imap /etc/pam.d/sieve |
237 |
sed -i -e \ |
238 |
's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ |
239 |
"${confd}/10-auth.conf" \ |
240 |
|| die "failed to update PAM settings in 10-auth.conf" |
241 |
fi |
242 |
|
243 |
# Disable ipv6 if necessary |
244 |
if ! use ipv6; then |
245 |
sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ |
246 |
|| die "failed to update listen settings in dovecot.conf" |
247 |
fi |
248 |
|
249 |
# Update ssl cert locations |
250 |
if use ssl; then |
251 |
sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ |
252 |
|| die "ssl conf failed" |
253 |
sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ |
254 |
-e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ |
255 |
"${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" |
256 |
fi |
257 |
|
258 |
# Install SQL configuration |
259 |
if use mysql || use postgres; then |
260 |
sed -i -e \ |
261 |
's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ |
262 |
"${confd}/10-auth.conf" || die "failed to update SQL settings in \ |
263 |
10-auth.conf" |
264 |
fi |
265 |
|
266 |
# Install LDAP configuration |
267 |
if use ldap; then |
268 |
sed -i -e \ |
269 |
's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ |
270 |
"${confd}/10-auth.conf" \ |
271 |
|| die "failed to update ldap settings in 10-auth.conf" |
272 |
fi |
273 |
|
274 |
if use vpopmail; then |
275 |
sed -i -e \ |
276 |
's/#!include auth-vpopmail.conf.ext/!include auth-vpopmail.conf.ext/' \ |
277 |
"${confd}/10-auth.conf" \ |
278 |
|| die "failed to update vpopmail settings in 10-auth.conf" |
279 |
fi |
280 |
|
281 |
if use sieve || use managesieve ; then |
282 |
cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" |
283 |
emake DESTDIR="${ED}" install || die "make install failed (sieve)" |
284 |
sed -i -e \ |
285 |
's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ |
286 |
|| die "failed to update sieve settings in 15-lda.conf" |
287 |
rm -rf "${ED}"/usr/share/doc/dovecot |
288 |
dodoc doc/*.txt |
289 |
docinto example-config/conf.d |
290 |
dodoc doc/example-config/conf.d/*.conf |
291 |
insinto /etc/dovecot/conf.d |
292 |
doins doc/example-config/conf.d/90-sieve.conf |
293 |
use managesieve && doins doc/example-config/conf.d/20-managesieve.conf |
294 |
docinto sieve/rfc |
295 |
dodoc doc/rfc/*.txt |
296 |
docinto sieve/devel |
297 |
dodoc doc/devel/DESIGN |
298 |
doman doc/man/*.{1,7} |
299 |
fi |
300 |
} |
301 |
|
302 |
pkg_preinst() { |
303 |
if has_version "<${CATEGORY}/${PN}-2" ; then |
304 |
elog "There are a lot of changes in configuration files in dovecot-2.0." |
305 |
elog "Please read http://wiki.dovecot.org/Upgrading and" |
306 |
elog "check the conf files in ${ROOT}etc/dovecot." |
307 |
elog "You can also run doveconf -n before running etc-update or" |
308 |
elog "dispatch-conf to get an idea about what needs to be changed." |
309 |
ewarn "" |
310 |
ewarn "Do NOT {re}start dovecot without checking your conf files" |
311 |
ewarn "and making the necessary changes." |
312 |
ewarn "" |
313 |
fi |
314 |
} |
315 |
|
316 |
pkg_postinst() { |
317 |
if use ssl; then |
318 |
# Let's not make a new certificate if we already have one |
319 |
if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ |
320 |
-e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then |
321 |
einfo "Creating SSL certificate" |
322 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
323 |
install_cert /etc/ssl/dovecot/server |
324 |
fi |
325 |
fi |
326 |
} |