1 |
wschlich 07/12/08 11:35:03 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: dovecot-1.0.8.ebuild |
5 |
Log: |
6 |
version bump, add managesieve patch, small cleanups |
7 |
(Portage version: 2.1.4_rc8) |
8 |
|
9 |
Revision Changes Path |
10 |
1.127 net-mail/dovecot/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.127&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?rev=1.127&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/ChangeLog?r1=1.126&r2=1.127 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v |
19 |
retrieving revision 1.126 |
20 |
retrieving revision 1.127 |
21 |
diff -u -r1.126 -r1.127 |
22 |
--- ChangeLog 6 Nov 2007 19:11:58 -0000 1.126 |
23 |
+++ ChangeLog 8 Dec 2007 11:35:02 -0000 1.127 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for net-mail/dovecot |
26 |
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.126 2007/11/06 19:11:58 armin76 Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/ChangeLog,v 1.127 2007/12/08 11:35:02 wschlich Exp $ |
29 |
+ |
30 |
+*dovecot-1.0.8 (08 Dec 2007) |
31 |
+ |
32 |
+ 08 Dec 2007; Wolfram Schlich <wschlich@g.o> +dovecot-1.0.8.ebuild: |
33 |
+ version bump, add managesieve patch, small cleanups |
34 |
|
35 |
06 Nov 2007; Raúl Porcel <armin76@g.o> dovecot-1.0.5.ebuild: |
36 |
alpha/sparc stable wrt #197388 |
37 |
|
38 |
|
39 |
|
40 |
1.1 net-mail/dovecot/dovecot-1.0.8.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.0.8.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/dovecot/dovecot-1.0.8.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: dovecot-1.0.8.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2007 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/net-mail/dovecot/dovecot-1.0.8.ebuild,v 1.1 2007/12/08 11:35:02 wschlich Exp $ |
50 |
|
51 |
inherit autotools eutils ssl-cert |
52 |
|
53 |
MY_P="${P/_/.}" |
54 |
S="${WORKDIR}/${MY_P}" |
55 |
SIEVE="dovecot-sieve-1.0.2" |
56 |
SIEVE_S="${WORKDIR}/${SIEVE}" |
57 |
MANAGESIEVE="dovecot-1.0.7-MANAGESIEVE-v9" |
58 |
|
59 |
SRC_URI="http://dovecot.org/releases/1.0/${MY_P}.tar.gz |
60 |
sieve? ( http://dovecot.org/releases/sieve/${SIEVE}.tar.gz ) |
61 |
managesieve? ( http://sinas.rename-it.nl/~sirius/${MANAGESIEVE}.diff.gz )" |
62 |
|
63 |
DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" |
64 |
HOMEPAGE="http://www.dovecot.org/" |
65 |
|
66 |
SLOT="0" |
67 |
LICENSE="LGPL-2.1" |
68 |
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" |
69 |
|
70 |
IUSE="debug doc ipv6 kerberos ldap managesieve mbox mysql pop3d pam postgres sieve ssl suid vpopmail" |
71 |
|
72 |
# Developer documentation, controlled by the doc USE flag |
73 |
DEVDOCS="auth-protocol index multiaccess securecoding" |
74 |
|
75 |
DEPEND=">=sys-apps/sed-4 |
76 |
kerberos? ( virtual/krb5 ) |
77 |
ldap? ( net-nds/openldap ) |
78 |
pam? ( virtual/pam ) |
79 |
ssl? ( dev-libs/openssl ) |
80 |
postgres? ( dev-db/postgresql ) |
81 |
mysql? ( virtual/mysql ) |
82 |
vpopmail? ( net-mail/vpopmail )" |
83 |
|
84 |
RDEPEND="${DEPEND} |
85 |
>=net-mail/mailbase-0.00-r8" |
86 |
|
87 |
src_unpack() { |
88 |
unpack ${A} |
89 |
cd "${S}" |
90 |
use managesieve && epatch "${DISTDIR}"/${MANAGESIEVE}.diff.gz |
91 |
} |
92 |
|
93 |
pkg_setup() { |
94 |
if ! use sieve && use managesieve; then |
95 |
eerror "managesieve USE flag selected but sieve USE flag unselected" |
96 |
die "USE flag problem" |
97 |
fi |
98 |
# Add user and group for login process (same as for fedora/redhat) |
99 |
enewgroup dovecot 97 |
100 |
enewuser dovecot 97 -1 /dev/null dovecot |
101 |
} |
102 |
|
103 |
src_compile() { |
104 |
use managesieve && eautoreconf |
105 |
local myconf= |
106 |
use ssl && myconf="${myconf} --with-ssl=openssl" \ |
107 |
|| myconf="${myconf} --without-ssl" |
108 |
econf \ |
109 |
--localstatedir=/var \ |
110 |
--sysconfdir=/etc/dovecot \ |
111 |
--enable-header-install \ |
112 |
--with-ioloop=best \ |
113 |
--with-poll=best \ |
114 |
$(use_enable debug) \ |
115 |
$(use_enable ipv6) \ |
116 |
$(use_with kerberos gssapi) \ |
117 |
$(use_with ldap) \ |
118 |
$(use_with mysql) \ |
119 |
$(use_with pam) \ |
120 |
$(use_with pop3d) \ |
121 |
$(use_with postgres pgsql) \ |
122 |
$(use_with vpopmail) \ |
123 |
${myconf} \ |
124 |
|| die "configure failed" |
125 |
emake || die "make failed" |
126 |
|
127 |
if use sieve; then |
128 |
einfo "Building sieve" |
129 |
cd "${SIEVE_S}" |
130 |
econf --with-dovecot="${S}" || die "configure failed (sieve)" |
131 |
emake || die "make failed (sieve)" |
132 |
fi |
133 |
} |
134 |
|
135 |
src_install () { |
136 |
make DESTDIR="${D}" install || die "make install failed" |
137 |
use suid && fperms u+s /usr/libexec/dovecot/deliver |
138 |
|
139 |
rm -f "${D}"/etc/dovecot/dovecot-{ldap,sql}-example.conf |
140 |
|
141 |
newinitd "${FILESDIR}"/dovecot.init dovecot |
142 |
|
143 |
# Documentation |
144 |
rm -rf "${D}"/usr/share/doc/dovecot |
145 |
dodoc AUTHORS NEWS README TODO dovecot-example.conf |
146 |
use managesieve && dodoc README.managesieve |
147 |
if use doc; then |
148 |
dodoc doc/*.txt |
149 |
else |
150 |
local x= n= |
151 |
for x in doc/*.txt; do |
152 |
n=$(basename "${x}" .txt) |
153 |
[[ " ${DEVDOCS} " != *" ${n} "* ]] && dodoc "${x}" |
154 |
done |
155 |
fi |
156 |
|
157 |
# Create the dovecot.conf file from the dovecot-example.conf file that |
158 |
# the dovecot folks nicely left for us.... |
159 |
local conf="${D}/etc/dovecot/dovecot.conf" |
160 |
mv "${D}"/etc/dovecot/dovecot-example.conf "${D}"/etc/dovecot/dovecot.conf |
161 |
|
162 |
# .maildir is the Gentoo default, but we need to support mbox to |
163 |
local mail_location="maildir:~/.maildir" |
164 |
if use mbox; then |
165 |
mail_location="mbox:/var/spool/mail/%u:INDEX=/var/dovecot/%u" |
166 |
keepdir /var/dovecot |
167 |
sed -i -e 's|#mail_extra_groups =|mail_extra_groups = mail|' "${conf}" |
168 |
fi |
169 |
sed -i -e \ |
170 |
"s|#mail_location =|mail_location = ${mail_location}|" "${conf}" \ |
171 |
|| die "failed to update mail location settings in dovecot.conf" |
172 |
|
173 |
# We're using pam files (imap and pop3) provided by mailbase |
174 |
if use pam; then |
175 |
sed -i -e '/passdb pam/, /^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ |
176 |
"${conf}" || die "failed to update PAM settings in dovecot.conf" |
177 |
fi |
178 |
|
179 |
# Listen on ipv6 and ipv4 |
180 |
if use ipv6; then |
181 |
sed -i -e 's/^#listen = \*/listen = \[::\]/g' "${conf}" \ |
182 |
|| die "failed to update listen settings in dovecot.conf" |
183 |
fi |
184 |
|
185 |
# Update ssl cert locations |
186 |
if use ssl; then |
187 |
sed -i -e 's,^#ssl_cert_file =.*,ssl_cert_file = /etc/ssl/dovecot/server.pem,' \ |
188 |
-e 's,^#ssl_key_file =.*,ssl_key_file = /etc/ssl/dovecot/server.key,' \ |
189 |
"${conf}" || die "failed to update SSL settings in dovecot.conf" |
190 |
|
191 |
# Let's not make a new certificate if we already have one |
192 |
if ! [[ -e "${ROOT:-/}"etc/ssl/dovecot/server.pem && \ |
193 |
-e "${ROOT:-/}"etc/ssl/dovecot/server.key ]]; then |
194 |
SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" |
195 |
insinto "${ROOT:-/}"etc/ssl/dovecot |
196 |
docert server |
197 |
fowners dovecot:mail /etc/ssl/dovecot/server.{key,pem} |
198 |
fi |
199 |
fi |
200 |
|
201 |
# Install SQL configuration |
202 |
if use mysql || use postgres; then |
203 |
cp doc/dovecot-sql-example.conf "${D}"/etc/dovecot/dovecot-sql.conf |
204 |
fperms 600 /etc/dovecot/dovecot-sql.conf |
205 |
sed -i -e '/db sql/,/args/ s|=|= /etc/dovecot-sql.conf|' "${conf}" \ |
206 |
|| die "failed to update SQL settings in dovecot-sql.conf" |
207 |
dodoc doc/dovecot-sql-example.conf |
208 |
fi |
209 |
|
210 |
# Install LDAP configuration |
211 |
if use ldap; then |
212 |
cp doc/dovecot-ldap-example.conf "${D}"/etc/dovecot/dovecot-ldap.conf |
213 |
fperms 600 /etc/dovecot/dovecot-ldap.conf |
214 |
sed -i -e '/db ldap/,/args/ s|=|= /etc/dovecot-ldap.conf|' "${conf}" \ |
215 |
|| die "failed to update LDAP settings in dovecot-ldap.conf" |
216 |
dodoc doc/dovecot-ldap-example.conf |
217 |
fi |
218 |
|
219 |
# Install sieve plugin |
220 |
if use sieve; then |
221 |
make -C "${SIEVE_S}" DESTDIR="${D}" install \ |
222 |
|| die "make install failed (sieve)" |
223 |
fi |
224 |
|
225 |
dodir /var/run/dovecot |
226 |
fowners root:0 /var/run/dovecot |
227 |
fperms 0700 /var/run/dovecot |
228 |
keepdir /var/run/dovecot/login |
229 |
fowners root:dovecot /var/run/dovecot/login |
230 |
fperms 0750 /var/run/dovecot/login |
231 |
} |
232 |
|
233 |
get_config_var() { |
234 |
local varname=${1} |
235 |
if [[ -z ${varname} ]]; then |
236 |
die "${FUNCNAME}: variable name missing" |
237 |
fi |
238 |
sed -n 's/^[[:space:]]\?'"${varname}"'[[:space:]]*="*\([^#"]\+\)"*/\1/p' \ |
239 |
"${ROOT:-/}"etc/dovecot/dovecot.conf |
240 |
} |
241 |
|
242 |
pkg_postinst() { |
243 |
# Touch ssl certs so that they are modified outisde of src_install |
244 |
# We do this so portage does't unmerge them - silly portage |
245 |
if use ssl; then |
246 |
touch "${ROOT:-/}"/etc/ssl/dovecot/server.{key,pem} |
247 |
fi |
248 |
|
249 |
elog "The Dovecot configuration has vastly changed since 0.99." |
250 |
elog "You are encouraged to start afresh with a new configuration file." |
251 |
elog "see http://wiki.dovecot.org/ for configuration examples." |
252 |
|
253 |
if [[ -e "${ROOT:-/}"etc/dovecot.conf ]]; then |
254 |
ewarn |
255 |
ewarn "The Dovecot configuration now resides in ${ROOT:-/}etc/dovecot" |
256 |
fi |
257 |
|
258 |
local base_dir="$(get_config_var base_dir)" |
259 |
base_dir="${base_dir:-/var/run/dovecot}" |
260 |
if use ssl \ |
261 |
&& [[ ! -e "${ROOT:-/}${base_dir}/login/ssl-parameters.dat" ]]; then |
262 |
elog |
263 |
elog "Dovecot requires DH SSL Parameters if you use SSL connections" |
264 |
elog "These take some time to make, and dovecot will create them before" |
265 |
elog "it allows any SSL connections." |
266 |
elog "You can create them now before starting dovecot like so" |
267 |
elog " emerge --config =${PF}" |
268 |
fi |
269 |
} |
270 |
|
271 |
pkg_config() { |
272 |
local base_dir="$(get_config_var base_dir)" |
273 |
base_dir="${base_dir:-/var/run/dovecot}" |
274 |
|
275 |
if use ssl; then |
276 |
einfo "Regenerating SSL parameters. This will take some time." |
277 |
"${ROOT:-/}"usr/libexec/dovecot/ssl-build-param "${base_dir}/login/ssl-parameters.dat" |
278 |
fi |
279 |
} |
280 |
|
281 |
|
282 |
|
283 |
-- |
284 |
gentoo-commits@g.o mailing list |