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