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