Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-mail/courier-imap: ChangeLog courier-imap-4.5.0.ebuild
Date: Sun, 28 Jun 2009 10:06:14
Message-Id: E1MKrH3-0004xj-2T@stork.gentoo.org
1 patrick 09/06/28 10:06:13
2
3 Modified: ChangeLog
4 Added: courier-imap-4.5.0.ebuild
5 Log:
6 Bump to 4.5.0, fixes #271316
7 (Portage version: 2.2_rc33/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.169 net-mail/courier-imap/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/courier-imap/ChangeLog?rev=1.169&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/courier-imap/ChangeLog?rev=1.169&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/courier-imap/ChangeLog?r1=1.168&r2=1.169
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-mail/courier-imap/ChangeLog,v
19 retrieving revision 1.168
20 retrieving revision 1.169
21 diff -u -r1.168 -r1.169
22 --- ChangeLog 22 Dec 2008 20:03:44 -0000 1.168
23 +++ ChangeLog 28 Jun 2009 10:06:12 -0000 1.169
24 @@ -1,6 +1,12 @@
25 # ChangeLog for net-mail/courier-imap
26 -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/ChangeLog,v 1.168 2008/12/22 20:03:44 armin76 Exp $
28 +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/ChangeLog,v 1.169 2009/06/28 10:06:12 patrick Exp $
30 +
31 +*courier-imap-4.5.0 (28 Jun 2009)
32 +
33 + 28 Jun 2009; Patrick Lauer <patrick@g.o>
34 + +courier-imap-4.5.0.ebuild:
35 + Bump to 4.5.0, fixes #271316
36
37 22 Dec 2008; Raúl Porcel <armin76@g.o>
38 courier-imap-4.0.6-r3.ebuild:
39
40
41
42 1.1 net-mail/courier-imap/courier-imap-4.5.0.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/courier-imap/courier-imap-4.5.0.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/courier-imap/courier-imap-4.5.0.ebuild?rev=1.1&content-type=text/plain
46
47 Index: courier-imap-4.5.0.ebuild
48 ===================================================================
49 # Copyright 1999-2009 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/courier-imap-4.5.0.ebuild,v 1.1 2009/06/28 10:06:12 patrick Exp $
52
53 inherit autotools eutils multilib libtool
54
55 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd"
56
57 DESCRIPTION="An IMAP daemon designed specifically for maildirs."
58 HOMEPAGE="http://www.courier-mta.org/"
59 SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
60 LICENSE="GPL-3"
61 SLOT="0"
62 IUSE="berkdb debug fam gdbm ipv6 nls selinux gnutls"
63
64 # userpriv breaks linking against vpopmail
65 RESTRICT="userpriv"
66
67 RDEPEND="gnutls? ( net-libs/gnutls )
68 !gnutls? ( >=dev-libs/openssl-0.9.6 )
69 >=net-libs/courier-authlib-0.61
70 >=net-mail/mailbase-0.00-r8
71 berkdb? ( sys-libs/db )
72 fam? ( virtual/fam )
73 gdbm? ( >=sys-libs/gdbm-1.8.0 )
74 selinux? ( sec-policy/selinux-courier-imap )"
75 DEPEND="${RDEPEND}
76 dev-lang/perl
77 !mail-mta/courier
78 userland_GNU? ( sys-process/procps )"
79 RDEPEND="${RDEPEND}
80 !virtual/imapd"
81
82 PROVIDE="virtual/imapd"
83
84 RC_VER="4.0.6-r1"
85 INITD_VER="4.0.6-r1"
86
87 pkg_setup() {
88 if ! use berkdb && ! use gdbm ; then
89 echo
90 eerror "Either the 'berkdb' or the 'gdbm' USE flag is required."
91 eerror "Please add it to '/etc/make.conf' or '/etc/portage/package.use'."
92 eerror "Use 'man 5 portage' for more info on '/etc/portage/package.use'."
93 echo
94 die "Required USE flag missing."
95 fi
96 }
97
98 vpopmail_setup() {
99 VPOPMAIL_INSTALLED=
100 VPOPMAIL_DIR=
101 export VPOPMAIL_INSTALLED VPOPMAIL_DIR
102 VPOPMAIL_DIR=$(grep ^vpopmail /etc/passwd 2>/dev/null | cut -d: -f6)
103 VPOPMAIL_INSTALLED=
104 if has_version 'net-mail/vpopmail' && [[ -n "${VPOPMAIL_DIR}" ]] && [[ -f "${VPOPMAIL_DIR}/etc/lib_deps" ]] ; then
105 VPOPMAIL_INSTALLED=1
106 else
107 VPOPMAIL_DIR=
108 fi
109 }
110
111 src_unpack() {
112 unpack ${A}
113 cd "${S}"
114
115 # Bug #48838. Patch to enable/disable FAM support.
116 # 20 Aug 2004 langthang@g.o
117 # This patch should fix bug #51540. fam USE flag is not needed for shared folder support.
118 epatch "${FILESDIR}"/${PN}-4.0.1-disable-fam-configure.in.patch
119
120 # Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
121 epatch "${FILESDIR}"/${PN}-4.0.6-aclocal-fix.patch
122
123 # These patches should fix problems detecting BerkeleyDB.
124 # We now can compile with db4 support.
125 if use berkdb ; then
126 epatch "${FILESDIR}"/${PN}-4.0.6-db4-bdbobj_configure.in.patch
127 epatch "${FILESDIR}"/${PN}-4.0.6-db4-configure.in.patch
128 fi
129
130 ebegin "Recreating configure"
131 eautoreconf || die "eautoreconf failed"
132 eend $?
133 }
134
135 src_compile() {
136 vpopmail_setup
137
138 local myconf=""
139
140 # 19 Aug 2004 langthang@g.o
141 # Default to gdbm if both berkdb and gdbm are present.
142 if use gdbm ; then
143 einfo "Building with GDBM support"
144 myconf="${myconf} --with-db=gdbm"
145 elif use berkdb ; then
146 einfo "Building with BerkeleyDB support"
147 myconf="${myconf} --with-db=db"
148 fi
149
150 # The default character set is ISO-8859-1/US-ASCII.
151 # USE 'nls' will enable all available character sets.
152 # Set ENABLE_UNICODE=iso-8859-1,utf-8,iso-8859-10
153 # to include only specified translation tables.
154 if use nls && [[ -z "${ENABLE_UNICODE}" ]] ; then
155 einfo "ENABLE_UNICODE is not set, building with all available character sets"
156 myconf="${myconf} --enable-unicode"
157 elif use nls ; then
158 einfo "ENABLE_UNICODE is set, building with unicode=${ENABLE_UNICODE}"
159 myconf="${myconf} --enable-unicode=${ENABLE_UNICODE}"
160 else
161 einfo "Disabling unicode support"
162 myconf="${myconf} --disable-unicode"
163 fi
164
165 use debug && myconf="${myconf} debug=true"
166
167 # Fix for bug #21330
168 CFLAGS="$(echo ${CFLAGS} | xargs)"
169 CXXFLAGS="$(echo ${CXXFLAGS} | xargs)"
170 LDFLAGS="$(echo ${LDFLAGS} | xargs)"
171
172 # Do the actual build now
173 LDFLAGS="${LDFLAGS} " econf \
174 --disable-root-check \
175 --bindir=/usr/sbin \
176 --mandir=/usr/share/man \
177 --sysconfdir=/etc/${PN} \
178 --libexecdir=/usr/$(get_libdir)/${PN} \
179 --localstatedir=/var/lib/${PN} \
180 --with-authdaemonvar=/var/lib/${PN}/authdaemon \
181 --enable-workarounds-for-imap-client-bugs \
182 --with-mailuser=mail \
183 --with-mailgroup=mail \
184 $(use_with fam) \
185 $(use_with ipv6) \
186 $(use_with gnutls) \
187 ${myconf} || die "econf failed"
188
189 # Change the pem file location.
190 sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \
191 imap/imapd-ssl.dist || \
192 die "sed failed"
193
194 sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \
195 imap/pop3d-ssl.dist || \
196 die "sed failed"
197
198 # spurious failures with parallel compiles
199 emake -j1 || die "emake failed"
200 }
201
202 src_install() {
203 vpopmail_setup
204
205 dodir /var/lib/${PN} /etc/pam.d
206 emake DESTDIR="${D}" install || die "emake install failed"
207 rm -Rf "${D}/etc/pam.d"
208
209 # Avoid name collisions in /usr/sbin wrt imapd and pop3d
210 cd "${D}/usr/sbin"
211 for name in imapd pop3d ; do
212 mv -f "${name}" "courier-${name}" || die "Failed to mv ${name} to courier-${name}"
213 done
214
215 # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of
216 # 'Maildir', and to use /usr/sbin/courier-foo names.
217 cd "${D}/usr/$(get_libdir)/${PN}"
218 for service in {imapd,pop3d}{,-ssl} ; do
219 sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed"
220 sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed"
221 done
222
223 # Rename the config files correctly and add a value for ${MAILDIR} to them.
224 cd "${D}/etc/${PN}"
225 for service in {imapd,pop3d}{,-ssl} ; do
226 mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}"
227 echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}"
228 echo 'MAILDIR=.maildir' >> "${service}"
229 echo 'MAILDIRPATH=.maildir' >> "${service}"
230 done
231 for service in imapd pop3d ; do
232 echo -e '# Put any program for ${PRERUN} here' >> "${service}"
233 echo 'PRERUN=' >> "${service}"
234 echo -e '# Put any program for ${LOGINRUN} here' >> "${service}"
235 echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}"
236 echo 'LOGINRUN=' >> "${service}"
237 done
238
239 cd "${D}/usr/sbin"
240 for x in * ; do
241 if [[ -L "${x}" ]] ; then
242 rm -f "${x}" || die "Failed to rm ${x}"
243 fi
244 done
245
246 cd ../share
247 mv -f * ../sbin
248 mv -f ../sbin/man .
249 cd ..
250
251 for x in mkimapdcert mkpop3dcert ; do
252 mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig"
253 done
254
255 exeinto /usr/sbin
256 doexe "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert" || die "doexe failed"
257
258 dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger || die "dosym failed"
259
260 mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp"
261 for initd in courier-{imapd,pop3d}{,-ssl} ; do
262 sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed"
263 doinitd "${initd}" || die "doinitd ${initd} failed"
264 done
265 exeinto /usr/$(get_libdir)/${PN}
266 for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do
267 sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${RC_VER}-${exe}" > "${exe}" || die "exe libdir-sed failed"
268 doexe "${exe}" || die "doexe ${exe} failed"
269 done
270
271 dodir /usr/bin
272 mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake"
273
274 # Bug #45953, more docs.
275 cd "${S}"
276 dohtml -r "${S}"/*
277 dodoc "${S}"/{00README.NOW.OR.SUFFER,AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme
278 docinto imap
279 dodoc "${S}"/imap/{ChangeLog,BUGS,BUGS.html,README}
280 docinto maildir
281 dodoc "${S}"/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt}
282 docinto tcpd
283 dodoc "${S}"/tcpd/README.couriertls
284 }
285
286 pkg_postinst() {
287 elog "Authdaemond is no longer provided by this package."
288 elog "Authentication libraries are now in courier-authlib."
289 elog "For a quick-start howto please refer to:"
290 elog "/usr/share/doc/${P}/${PN}-gentoo.readme.gz"
291 # Some users have been reporting that permissions on this directory were
292 # getting scrambled, so let's ensure that they are sane.
293 chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${ROOT}/usr/$(get_libdir)/${PN}"
294 }
295
296 src_test() {
297 ewarn "make check is not supported by this package due to the"
298 ewarn "--enable-workarounds-for-imap-client-bugs option."
299 }