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