Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/
Date: Mon, 02 May 2016 22:24:24
Message-Id: 1462227707.dce50cb2aa3182e40a970a5977e6f93c0dc2b596.wizardedit@gentoo
1 commit: dce50cb2aa3182e40a970a5977e6f93c0dc2b596
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 2 21:28:17 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 22:21:47 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dce50cb2
7
8 net-mail/courier-imap: remove old ebuilds
9
10 Package-Manager: portage-2.2.26
11
12 net-mail/courier-imap/courier-imap-4.15-r1.ebuild | 230 ----------------------
13 net-mail/courier-imap/courier-imap-4.16.0.ebuild | 219 --------------------
14 net-mail/courier-imap/courier-imap-4.16.2.ebuild | 219 --------------------
15 3 files changed, 668 deletions(-)
16
17 diff --git a/net-mail/courier-imap/courier-imap-4.15-r1.ebuild b/net-mail/courier-imap/courier-imap-4.15-r1.ebuild
18 deleted file mode 100644
19 index baf7185..0000000
20 --- a/net-mail/courier-imap/courier-imap-4.15-r1.ebuild
21 +++ /dev/null
22 @@ -1,230 +0,0 @@
23 -# Copyright 1999-2015 Gentoo Foundation
24 -# Distributed under the terms of the GNU General Public License v2
25 -# $Id$
26 -
27 -EAPI=5
28 -
29 -inherit autotools eutils multilib libtool systemd
30 -
31 -DESCRIPTION="An IMAP daemon designed specifically for maildirs"
32 -HOMEPAGE="http://www.courier-mta.org/"
33 -SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
34 -
35 -LICENSE="GPL-3"
36 -SLOT="0"
37 -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
38 -IUSE="berkdb debug fam +gdbm ipv6 selinux gnutls trashquota"
39 -
40 -REQUIRED_USE="|| ( berkdb gdbm )"
41 -
42 -CDEPEND="
43 - gnutls? ( net-libs/gnutls )
44 - !gnutls? ( >=dev-libs/openssl-0.9.6:0= )
45 - >=net-libs/courier-authlib-0.61
46 - >=net-mail/mailbase-0.00-r8
47 - berkdb? ( sys-libs/db:= )
48 - fam? ( virtual/fam )
49 - gdbm? ( >=sys-libs/gdbm-1.8.0 )"
50 -DEPEND="${CDEPEND}
51 - dev-lang/perl
52 - !mail-mta/courier
53 - userland_GNU? ( sys-process/procps )"
54 -RDEPEND="${CDEPEND}
55 - selinux? ( sec-policy/selinux-courier )"
56 -
57 -# get rid of old style virtual - bug 350792
58 -# all blockers really needed?
59 -RDEPEND="${RDEPEND}
60 - !mail-mta/courier
61 - !net-mail/bincimap
62 - !net-mail/cyrus-imapd
63 - !net-mail/uw-imap"
64 -
65 -RC_VER="4.0.6-r1"
66 -INITD_VER="4.0.6-r1"
67 -
68 -src_prepare() {
69 - # Bug #48838. Patch to enable/disable FAM support.
70 - # 20 Aug 2004 langthang@g.o
71 - # This patch should fix bug #51540. fam USE flag is not needed for shared folder support.
72 - epatch "${FILESDIR}"/${P}-disable-fam-configure.ac.patch
73 -
74 - # Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
75 - epatch "${FILESDIR}"/${P}-aclocal-fix.patch
76 -
77 - # These patches should fix problems detecting BerkeleyDB.
78 - # We now can compile with db4 support.
79 - if use berkdb ; then
80 - epatch \
81 - "${FILESDIR}"/${P}-db4-bdbobj_configure.ac.patch \
82 - "${FILESDIR}"/${P}-db4-configure.ac.patch
83 - fi
84 -
85 - eautoreconf
86 -}
87 -
88 -src_configure() {
89 - local myconf=""
90 -
91 - # 19 Aug 2004 langthang@g.o
92 - # Default to gdbm if both berkdb and gdbm are present.
93 - if use gdbm ; then
94 - einfo "Building with GDBM support"
95 - myconf="${myconf} --with-db=gdbm"
96 - elif use berkdb ; then
97 - einfo "Building with BerkeleyDB support"
98 - myconf="${myconf} --with-db=db"
99 - fi
100 -
101 - # Disabling unicode is no longer supported
102 - # By default all available character sets are included
103 - # Set ENABLE_UNICODE=iso-8859-1,utf-8,iso-8859-10
104 - # to include only specified translation tables.
105 - if [[ -z "${ENABLE_UNICODE}" ]] ; then
106 - einfo "ENABLE_UNICODE is not set, building with all available character sets"
107 - myconf="${myconf} --enable-unicode"
108 - else
109 - einfo "ENABLE_UNICODE is set, building with unicode=${ENABLE_UNICODE}"
110 - myconf="${myconf} --enable-unicode=${ENABLE_UNICODE}"
111 - fi
112 -
113 - if use trashquota ; then
114 - einfo "Building with Trash Quota Support"
115 - myconf="${myconf} --with-trashquota"
116 - fi
117 -
118 - use debug && myconf="${myconf} debug=true"
119 -
120 - # Do the actual build now
121 - econf \
122 - --disable-root-check \
123 - --bindir=/usr/sbin \
124 - --sysconfdir=/etc/${PN} \
125 - --libexecdir=/usr/$(get_libdir)/${PN} \
126 - --localstatedir=/var/lib/${PN} \
127 - --with-authdaemonvar=/var/lib/${PN}/authdaemon \
128 - --enable-workarounds-for-imap-client-bugs \
129 - --with-mailuser=mail \
130 - --with-mailgroup=mail \
131 - $(use_with fam) \
132 - $(use_with ipv6) \
133 - $(use_with gnutls) \
134 - ${myconf}
135 -
136 - # Change the pem file location.
137 - sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \
138 - libs/imap/imapd-ssl.dist || \
139 - die "sed failed"
140 -
141 - sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \
142 - libs/imap/pop3d-ssl.dist || \
143 - die "sed failed"
144 -}
145 -
146 -src_compile() {
147 - # spurious failures with parallel compiles
148 - emake -j1
149 -}
150 -
151 -src_install() {
152 - dodir /var/lib/${PN} /etc/pam.d
153 - default
154 - rm -Rf "${D}/etc/pam.d" || die
155 -
156 - # Avoid name collisions in /usr/sbin wrt imapd and pop3d
157 - cd "${D}/usr/sbin" || die
158 - for name in imapd pop3d ; do
159 - mv -f "${name}" "courier-${name}" || die "Failed to mv ${name} to courier-${name}"
160 - done
161 -
162 - # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of
163 - # 'Maildir', and to use /usr/sbin/courier-foo names.
164 - cd "${D}/usr/$(get_libdir)/${PN}" || die
165 - for service in {imapd,pop3d}{,-ssl} ; do
166 - sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed"
167 - sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed"
168 - done
169 -
170 - # Rename the config files correctly and add a value for ${MAILDIR} to them.
171 - cd "${D}/etc/${PN}" || die
172 - for service in {imapd,pop3d}{,-ssl} ; do
173 - mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}"
174 - echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}"
175 - echo 'MAILDIR=.maildir' >> "${service}"
176 - echo 'MAILDIRPATH=.maildir' >> "${service}"
177 - done
178 - for service in imapd pop3d ; do
179 - echo -e '# Put any program for ${PRERUN} here' >> "${service}"
180 - echo 'PRERUN=' >> "${service}"
181 - echo -e '# Put any program for ${LOGINRUN} here' >> "${service}"
182 - echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}"
183 - echo 'LOGINRUN=' >> "${service}"
184 - done
185 -
186 - cd "${D}/usr/sbin" || die
187 - for x in * ; do
188 - if [[ -L "${x}" ]] ; then
189 - rm -f "${x}" || die "Failed to rm ${x}"
190 - fi
191 - done
192 -
193 - cd ../share || die
194 - mv -f * ../sbin || die
195 - mv -f ../sbin/man . || die
196 - cd .. || die
197 -
198 - for x in mkimapdcert mkpop3dcert ; do
199 - mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig"
200 - done
201 -
202 - dosbin "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert"
203 -
204 - dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger
205 -
206 - mkdir "${WORKDIR}/tmp" && cd "${WORKDIR}/tmp" || die
207 -
208 - for initd in courier-{imapd,pop3d}{,-ssl} ; do
209 - sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed"
210 - doinitd "${initd}"
211 - done
212 -
213 - systemd_newunit "${FILESDIR}"/courier-authdaemond-r1.service courier-authdaemond.service
214 - systemd_newunit "${FILESDIR}"/courier-imapd-ssl-r1.service courier-imapd-ssl.service
215 - systemd_newunit "${FILESDIR}"/courier-imapd-r1.service courier-imapd.service
216 -
217 - exeinto /usr/$(get_libdir)/${PN}
218 - for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do
219 - sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${RC_VER}-${exe}" > "${exe}" || die "exe libdir-sed failed"
220 - doexe "${exe}"
221 - done
222 -
223 - dodir /usr/bin
224 - mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake"
225 -
226 - # Bug #45953, more docs.
227 - cd "${S}" || die
228 - dohtml -r "${S}"/*
229 - dodoc "${S}"/{AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme
230 - docinto imap
231 - dodoc "${S}"/libs/imap/{ChangeLog,BUGS,BUGS.html,README}
232 - docinto maildir
233 - dodoc "${S}"/libs/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt}
234 - docinto tcpd
235 - dodoc "${S}"/libs/tcpd/README.couriertls
236 -}
237 -
238 -pkg_postinst() {
239 - elog "Please read http://www.courier-mta.org/imap/INSTALL.html#upgrading"
240 - elog "and remove TLS_DHPARAMS from configuration files or run mkdhparams"
241 -
242 - elog "For a quick-start howto please refer to"
243 - elog "${PN}-gentoo.readme in /usr/share/doc/${PF}"
244 - # Some users have been reporting that permissions on this directory were
245 - # getting scrambled, so let's ensure that they are sane.
246 - chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${ROOT}/usr/$(get_libdir)/${PN}"
247 -}
248 -
249 -src_test() {
250 - ewarn "make check is not supported by this package due to the"
251 - ewarn "--enable-workarounds-for-imap-client-bugs option."
252 -}
253
254 diff --git a/net-mail/courier-imap/courier-imap-4.16.0.ebuild b/net-mail/courier-imap/courier-imap-4.16.0.ebuild
255 deleted file mode 100644
256 index df13761..0000000
257 --- a/net-mail/courier-imap/courier-imap-4.16.0.ebuild
258 +++ /dev/null
259 @@ -1,219 +0,0 @@
260 -# Copyright 1999-2015 Gentoo Foundation
261 -# Distributed under the terms of the GNU General Public License v2
262 -# $Id$
263 -
264 -EAPI=5
265 -
266 -inherit autotools eutils multilib libtool systemd
267 -
268 -DESCRIPTION="An IMAP daemon designed specifically for maildirs"
269 -HOMEPAGE="http://www.courier-mta.org/"
270 -SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
271 -
272 -LICENSE="GPL-3"
273 -SLOT="0"
274 -KEYWORDS="~amd64 ~hppa ~ppc64 ~x86"
275 -IUSE="berkdb debug fam +gdbm ipv6 selinux gnutls trashquota"
276 -
277 -REQUIRED_USE="|| ( berkdb gdbm )"
278 -
279 -CDEPEND="
280 - gnutls? ( net-libs/gnutls )
281 - !gnutls? ( >=dev-libs/openssl-0.9.6:0= )
282 - >=net-libs/courier-authlib-0.61
283 - ~net-libs/courier-unicode-1.1
284 - >=net-mail/mailbase-0.00-r8
285 - berkdb? ( sys-libs/db:= )
286 - fam? ( virtual/fam )
287 - gdbm? ( >=sys-libs/gdbm-1.8.0 )"
288 -DEPEND="${CDEPEND}
289 - dev-lang/perl
290 - !mail-mta/courier
291 - userland_GNU? ( sys-process/procps )"
292 -RDEPEND="${CDEPEND}
293 - selinux? ( sec-policy/selinux-courier )"
294 -
295 -# get rid of old style virtual - bug 350792
296 -# all blockers really needed?
297 -RDEPEND="${RDEPEND}
298 - !mail-mta/courier
299 - !net-mail/bincimap
300 - !net-mail/cyrus-imapd
301 - !net-mail/uw-imap"
302 -
303 -RC_VER="4.0.6-r1"
304 -INITD_VER="4.0.6-r1"
305 -
306 -src_prepare() {
307 - # Bug #48838. Patch to enable/disable FAM support.
308 - # 20 Aug 2004 langthang@g.o
309 - # This patch should fix bug #51540. fam USE flag is not needed for shared folder support.
310 - epatch "${FILESDIR}"/${PN}-4.15-disable-fam-configure.ac.patch
311 -
312 - # Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
313 - epatch "${FILESDIR}"/${PN}-4.15-aclocal-fix.patch
314 -
315 - # These patches should fix problems detecting BerkeleyDB.
316 - # We now can compile with db4 support.
317 - if use berkdb ; then
318 - epatch \
319 - "${FILESDIR}"/${PN}-4.15-db4-bdbobj_configure.ac.patch \
320 - "${FILESDIR}"/${PN}-4.15-db4-configure.ac.patch
321 - fi
322 -
323 - eautoreconf
324 -}
325 -
326 -src_configure() {
327 - local myconf=""
328 -
329 - # 19 Aug 2004 langthang@g.o
330 - # Default to gdbm if both berkdb and gdbm are present.
331 - if use gdbm ; then
332 - einfo "Building with GDBM support"
333 - myconf="${myconf} --with-db=gdbm"
334 - elif use berkdb ; then
335 - einfo "Building with BerkeleyDB support"
336 - myconf="${myconf} --with-db=db"
337 - fi
338 -
339 - if use trashquota ; then
340 - einfo "Building with Trash Quota Support"
341 - myconf="${myconf} --with-trashquota"
342 - fi
343 -
344 - use debug && myconf="${myconf} debug=true"
345 -
346 - # Do the actual build now
347 - econf \
348 - --disable-root-check \
349 - --bindir=/usr/sbin \
350 - --sysconfdir=/etc/${PN} \
351 - --libexecdir=/usr/$(get_libdir)/${PN} \
352 - --localstatedir=/var/lib/${PN} \
353 - --with-authdaemonvar=/var/lib/${PN}/authdaemon \
354 - --enable-workarounds-for-imap-client-bugs \
355 - --with-mailuser=mail \
356 - --with-mailgroup=mail \
357 - $(use_with fam) \
358 - $(use_with ipv6) \
359 - $(use_with gnutls) \
360 - ${myconf}
361 -
362 - # Change the pem file location.
363 - sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \
364 - libs/imap/imapd-ssl.dist || \
365 - die "sed failed"
366 -
367 - sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \
368 - libs/imap/pop3d-ssl.dist || \
369 - die "sed failed"
370 -}
371 -
372 -src_compile() {
373 - # spurious failures with parallel compiles
374 - emake -j1
375 -}
376 -
377 -src_install() {
378 - dodir /var/lib/${PN} /etc/pam.d
379 - default
380 - rm -Rf "${D}/etc/pam.d" || die
381 -
382 - # Avoid name collisions in /usr/sbin wrt imapd and pop3d
383 - cd "${D}/usr/sbin" || die
384 - for name in imapd pop3d ; do
385 - mv -f "${name}" "courier-${name}" || die "Failed to mv ${name} to courier-${name}"
386 - done
387 -
388 - # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of
389 - # 'Maildir', and to use /usr/sbin/courier-foo names.
390 - cd "${D}/usr/$(get_libdir)/${PN}" || die
391 - for service in {imapd,pop3d}{,-ssl} ; do
392 - sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed"
393 - sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed"
394 - done
395 -
396 - # Rename the config files correctly and add a value for ${MAILDIR} to them.
397 - cd "${D}/etc/${PN}" || die
398 - for service in {imapd,pop3d}{,-ssl} ; do
399 - mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}"
400 - echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}"
401 - echo 'MAILDIR=.maildir' >> "${service}"
402 - echo 'MAILDIRPATH=.maildir' >> "${service}"
403 - done
404 - for service in imapd pop3d ; do
405 - echo -e '# Put any program for ${PRERUN} here' >> "${service}"
406 - echo 'PRERUN=' >> "${service}"
407 - echo -e '# Put any program for ${LOGINRUN} here' >> "${service}"
408 - echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}"
409 - echo 'LOGINRUN=' >> "${service}"
410 - done
411 -
412 - cd "${D}/usr/sbin"
413 - for x in * ; do
414 - if [[ -L "${x}" ]] ; then
415 - rm -f "${x}" || die "Failed to rm ${x}"
416 - fi
417 - done
418 -
419 - cd ../share
420 - mv -f * ../sbin
421 - mv -f ../sbin/man .
422 - cd ..
423 -
424 - for x in mkimapdcert mkpop3dcert ; do
425 - mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig"
426 - done
427 -
428 - dosbin "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert"
429 -
430 - dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger
431 -
432 - mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp"
433 -
434 - for initd in courier-{imapd,pop3d}{,-ssl} ; do
435 - sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed"
436 - doinitd "${initd}"
437 - done
438 -
439 - systemd_newunit "${FILESDIR}"/courier-authdaemond-r1.service courier-authdaemond.service
440 - systemd_newunit "${FILESDIR}"/courier-imapd-ssl-r1.service courier-imapd-ssl.service
441 - systemd_newunit "${FILESDIR}"/courier-imapd-r1.service courier-imapd.service
442 -
443 - exeinto /usr/$(get_libdir)/${PN}
444 - for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do
445 - sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${RC_VER}-${exe}" > "${exe}" || die "exe libdir-sed failed"
446 - doexe "${exe}"
447 - done
448 -
449 - dodir /usr/bin
450 - mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake"
451 -
452 - # Bug #45953, more docs.
453 - cd "${S}" || die
454 - dohtml -r "${S}"/*
455 - dodoc "${S}"/{AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme
456 - docinto imap
457 - dodoc "${S}"/libs/imap/{ChangeLog,BUGS,BUGS.html,README}
458 - docinto maildir
459 - dodoc "${S}"/libs/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt}
460 - docinto tcpd
461 - dodoc "${S}"/libs/tcpd/README.couriertls
462 -}
463 -
464 -pkg_postinst() {
465 - elog "Please read http://www.courier-mta.org/imap/INSTALL.html#upgrading"
466 - elog "and remove TLS_DHPARAMS from configuration files or run mkdhparams"
467 -
468 - elog "For a quick-start howto please refer to"
469 - elog "${PN}-gentoo.readme in /usr/share/doc/${PF}"
470 - # Some users have been reporting that permissions on this directory were
471 - # getting scrambled, so let's ensure that they are sane.
472 - chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${ROOT}/usr/$(get_libdir)/${PN}"
473 -}
474 -
475 -src_test() {
476 - ewarn "make check is not supported by this package due to the"
477 - ewarn "--enable-workarounds-for-imap-client-bugs option."
478 -}
479
480 diff --git a/net-mail/courier-imap/courier-imap-4.16.2.ebuild b/net-mail/courier-imap/courier-imap-4.16.2.ebuild
481 deleted file mode 100644
482 index a63c2d5..0000000
483 --- a/net-mail/courier-imap/courier-imap-4.16.2.ebuild
484 +++ /dev/null
485 @@ -1,219 +0,0 @@
486 -# Copyright 1999-2015 Gentoo Foundation
487 -# Distributed under the terms of the GNU General Public License v2
488 -# $Id$
489 -
490 -EAPI=5
491 -
492 -inherit autotools eutils multilib libtool systemd
493 -
494 -DESCRIPTION="An IMAP daemon designed specifically for maildirs"
495 -HOMEPAGE="http://www.courier-mta.org/"
496 -SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
497 -
498 -LICENSE="GPL-3"
499 -SLOT="0"
500 -KEYWORDS="~amd64 ~hppa ~mips ~ppc64 ~x86"
501 -IUSE="berkdb debug fam +gdbm ipv6 selinux gnutls trashquota"
502 -
503 -REQUIRED_USE="|| ( berkdb gdbm )"
504 -
505 -CDEPEND="
506 - gnutls? ( net-libs/gnutls )
507 - !gnutls? ( >=dev-libs/openssl-0.9.6:0= )
508 - >=net-libs/courier-authlib-0.61
509 - >=net-libs/courier-unicode-1.3
510 - >=net-mail/mailbase-0.00-r8
511 - berkdb? ( sys-libs/db:= )
512 - fam? ( virtual/fam )
513 - gdbm? ( >=sys-libs/gdbm-1.8.0 )"
514 -DEPEND="${CDEPEND}
515 - dev-lang/perl
516 - !mail-mta/courier
517 - userland_GNU? ( sys-process/procps )"
518 -RDEPEND="${CDEPEND}
519 - selinux? ( sec-policy/selinux-courier )"
520 -
521 -# get rid of old style virtual - bug 350792
522 -# all blockers really needed?
523 -RDEPEND="${RDEPEND}
524 - !mail-mta/courier
525 - !net-mail/bincimap
526 - !net-mail/cyrus-imapd
527 - !net-mail/uw-imap"
528 -
529 -RC_VER="4.0.6-r1"
530 -INITD_VER="4.0.6-r1"
531 -
532 -src_prepare() {
533 - # Bug #48838. Patch to enable/disable FAM support.
534 - # 20 Aug 2004 langthang@g.o
535 - # This patch should fix bug #51540. fam USE flag is not needed for shared folder support.
536 - epatch "${FILESDIR}"/${PN}-4.15-disable-fam-configure.ac.patch
537 -
538 - # Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
539 - epatch "${FILESDIR}"/${PN}-4.15-aclocal-fix.patch
540 -
541 - # These patches should fix problems detecting BerkeleyDB.
542 - # We now can compile with db4 support.
543 - if use berkdb ; then
544 - epatch \
545 - "${FILESDIR}"/${PN}-4.15-db4-bdbobj_configure.ac.patch \
546 - "${FILESDIR}"/${PN}-4.15-db4-configure.ac.patch
547 - fi
548 -
549 - eautoreconf
550 -}
551 -
552 -src_configure() {
553 - local myconf=""
554 -
555 - # 19 Aug 2004 langthang@g.o
556 - # Default to gdbm if both berkdb and gdbm are present.
557 - if use gdbm ; then
558 - einfo "Building with GDBM support"
559 - myconf="${myconf} --with-db=gdbm"
560 - elif use berkdb ; then
561 - einfo "Building with BerkeleyDB support"
562 - myconf="${myconf} --with-db=db"
563 - fi
564 -
565 - if use trashquota ; then
566 - einfo "Building with Trash Quota Support"
567 - myconf="${myconf} --with-trashquota"
568 - fi
569 -
570 - use debug && myconf="${myconf} debug=true"
571 -
572 - # Do the actual build now
573 - econf \
574 - --disable-root-check \
575 - --bindir=/usr/sbin \
576 - --sysconfdir=/etc/${PN} \
577 - --libexecdir=/usr/$(get_libdir)/${PN} \
578 - --localstatedir=/var/lib/${PN} \
579 - --with-authdaemonvar=/var/lib/${PN}/authdaemon \
580 - --enable-workarounds-for-imap-client-bugs \
581 - --with-mailuser=mail \
582 - --with-mailgroup=mail \
583 - $(use_with fam) \
584 - $(use_with ipv6) \
585 - $(use_with gnutls) \
586 - ${myconf}
587 -
588 - # Change the pem file location.
589 - sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \
590 - libs/imap/imapd-ssl.dist || \
591 - die "sed failed"
592 -
593 - sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \
594 - libs/imap/pop3d-ssl.dist || \
595 - die "sed failed"
596 -}
597 -
598 -src_compile() {
599 - # spurious failures with parallel compiles
600 - emake -j1
601 -}
602 -
603 -src_install() {
604 - dodir /var/lib/${PN} /etc/pam.d
605 - default
606 - rm -Rf "${D}/etc/pam.d" || die
607 -
608 - # Avoid name collisions in /usr/sbin wrt imapd and pop3d
609 - cd "${D}/usr/sbin" || die
610 - for name in imapd pop3d ; do
611 - mv -f "${name}" "courier-${name}" || die "Failed to mv ${name} to courier-${name}"
612 - done
613 -
614 - # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of
615 - # 'Maildir', and to use /usr/sbin/courier-foo names.
616 - cd "${D}/usr/$(get_libdir)/${PN}" || die
617 - for service in {imapd,pop3d}{,-ssl} ; do
618 - sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed"
619 - sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed"
620 - done
621 -
622 - # Rename the config files correctly and add a value for ${MAILDIR} to them.
623 - cd "${D}/etc/${PN}" || die
624 - for service in {imapd,pop3d}{,-ssl} ; do
625 - mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}"
626 - echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}"
627 - echo 'MAILDIR=.maildir' >> "${service}"
628 - echo 'MAILDIRPATH=.maildir' >> "${service}"
629 - done
630 - for service in imapd pop3d ; do
631 - echo -e '# Put any program for ${PRERUN} here' >> "${service}"
632 - echo 'PRERUN=' >> "${service}"
633 - echo -e '# Put any program for ${LOGINRUN} here' >> "${service}"
634 - echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}"
635 - echo 'LOGINRUN=' >> "${service}"
636 - done
637 -
638 - cd "${D}/usr/sbin"
639 - for x in * ; do
640 - if [[ -L "${x}" ]] ; then
641 - rm -f "${x}" || die "Failed to rm ${x}"
642 - fi
643 - done
644 -
645 - cd ../share
646 - mv -f * ../sbin
647 - mv -f ../sbin/man .
648 - cd ..
649 -
650 - for x in mkimapdcert mkpop3dcert ; do
651 - mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig"
652 - done
653 -
654 - dosbin "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert"
655 -
656 - dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger
657 -
658 - mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp"
659 -
660 - for initd in courier-{imapd,pop3d}{,-ssl} ; do
661 - sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed"
662 - doinitd "${initd}"
663 - done
664 -
665 - systemd_newunit "${FILESDIR}"/courier-authdaemond-r1.service courier-authdaemond.service
666 - systemd_newunit "${FILESDIR}"/courier-imapd-ssl-r1.service courier-imapd-ssl.service
667 - systemd_newunit "${FILESDIR}"/courier-imapd-r1.service courier-imapd.service
668 -
669 - exeinto /usr/$(get_libdir)/${PN}
670 - for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do
671 - sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${RC_VER}-${exe}" > "${exe}" || die "exe libdir-sed failed"
672 - doexe "${exe}"
673 - done
674 -
675 - dodir /usr/bin
676 - mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake"
677 -
678 - # Bug #45953, more docs.
679 - cd "${S}" || die
680 - dohtml -r "${S}"/*
681 - dodoc "${S}"/{AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme
682 - docinto imap
683 - dodoc "${S}"/libs/imap/{ChangeLog,BUGS,BUGS.html,README}
684 - docinto maildir
685 - dodoc "${S}"/libs/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt}
686 - docinto tcpd
687 - dodoc "${S}"/libs/tcpd/README.couriertls
688 -}
689 -
690 -pkg_postinst() {
691 - elog "Please read http://www.courier-mta.org/imap/INSTALL.html#upgrading"
692 - elog "and remove TLS_DHPARAMS from configuration files or run mkdhparams"
693 -
694 - elog "For a quick-start howto please refer to"
695 - elog "${PN}-gentoo.readme in /usr/share/doc/${PF}"
696 - # Some users have been reporting that permissions on this directory were
697 - # getting scrambled, so let's ensure that they are sane.
698 - chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${ROOT}/usr/$(get_libdir)/${PN}"
699 -}
700 -
701 -src_test() {
702 - ewarn "make check is not supported by this package due to the"
703 - ewarn "--enable-workarounds-for-imap-client-bugs option."
704 -}