Gentoo Archives: gentoo-commits

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