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