diff options
author | 2008-12-14 21:19:10 +0000 | |
---|---|---|
committer | 2008-12-14 21:19:10 +0000 | |
commit | 84ab79390b5917165f7010dc2f50a3a2ac7ca643 (patch) | |
tree | fcb1149c1e87fe46fe504f9609ca94101931475e /net-mail/courier-imap | |
parent | Stable for HPPA (bug #222819). (diff) | |
download | historical-84ab79390b5917165f7010dc2f50a3a2ac7ca643.tar.gz historical-84ab79390b5917165f7010dc2f50a3a2ac7ca643.tar.bz2 historical-84ab79390b5917165f7010dc2f50a3a2ac7ca643.zip |
fix bug #168196
Package-Manager: portage-2.2_rc15/cvs/Linux 2.6.23-gentoo-r3-20080120 ppc
Diffstat (limited to 'net-mail/courier-imap')
-rw-r--r-- | net-mail/courier-imap/ChangeLog | 13 | ||||
-rw-r--r-- | net-mail/courier-imap/Manifest | 15 | ||||
-rw-r--r-- | net-mail/courier-imap/courier-imap-4.0.6-r3.ebuild | 264 | ||||
-rw-r--r-- | net-mail/courier-imap/courier-imap-4.1.2-r2.ebuild | 267 | ||||
-rw-r--r-- | net-mail/courier-imap/courier-imap-4.4.1-r1.ebuild | 250 | ||||
-rw-r--r-- | net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.indirect | 2 | ||||
-rw-r--r-- | net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.indirect | 2 |
7 files changed, 804 insertions, 9 deletions
diff --git a/net-mail/courier-imap/ChangeLog b/net-mail/courier-imap/ChangeLog index 72933f65f6f7..73f8d29dcf2c 100644 --- a/net-mail/courier-imap/ChangeLog +++ b/net-mail/courier-imap/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for net-mail/courier-imap # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/ChangeLog,v 1.162 2008/07/29 20:19:40 chutzpah Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/ChangeLog,v 1.163 2008/12/14 21:19:10 mabi Exp $ + +*courier-imap-4.4.1-r1 (14 Dec 2008) +*courier-imap-4.1.2-r2 (14 Dec 2008) +*courier-imap-4.0.6-r3 (14 Dec 2008) + + 14 Dec 2008; Matti Bickel <mabi@gentoo.org> + files/courier-imap-4.0.6-r1-courier-imapd.indirect, + files/courier-imap-4.0.6-r1-courier-pop3d.indirect, + +courier-imap-4.0.6-r3.ebuild, +courier-imap-4.1.2-r2.ebuild, + +courier-imap-4.4.1-r1.ebuild: + fixed bug #168196 *courier-imap-4.4.1 (29 Jul 2008) diff --git a/net-mail/courier-imap/Manifest b/net-mail/courier-imap/Manifest index 70f38a73d2a2..c37e6a2bf8e3 100644 --- a/net-mail/courier-imap/Manifest +++ b/net-mail/courier-imap/Manifest @@ -32,10 +32,10 @@ AUX courier-imap-4.0.6-db4-bdbobj_configure.in.patch 1558 RMD160 ae5866697c98a76 AUX courier-imap-4.0.6-db4-configure.in.patch 1497 RMD160 77a9ad984789ab56c5d91d8b276b5c34a0e3b909 SHA1 349ad8d16c05ba0c7a7231b092286f48fecca54b SHA256 53db1d9b267e2d753ca6e27149008b5f92e11ddea7260f44c616b7cc3327d67c AUX courier-imap-4.0.6-db4-tcpd_configure.in.patch 264 RMD160 49e1deaa1d006b1f3bd8d68ebad037fd934d3d06 SHA1 836208b414a72cf426a17e27f4c6dcf3c88138f3 SHA256 553b9b20afad380b2901318b6b2152b14c1f26ed3bfe26126364284f143cdd21 AUX courier-imap-4.0.6-r1-courier-imapd-ssl.rc6 1200 RMD160 cfe0a24af1c4ca8ae1bbeafb25612a790961fd68 SHA1 77363438726d1e2fd7b9afb11b6bd2223fd75775 SHA256 c417f5de1bf2eeb5a7918931c30f1902d9f463279d8aa73ea0e13623923805df -AUX courier-imap-4.0.6-r1-courier-imapd.indirect 81 RMD160 4b495046094a71b18ea17881f59a03fe295a352c SHA1 4b9fb37409877249e2c2cfb8f285d955dd260005 SHA256 390c2c215fc7a39f74b41a4c16372489e3c084a35e8e3ed66bc4548a766fa47d +AUX courier-imap-4.0.6-r1-courier-imapd.indirect 81 RMD160 0d74ba0662418361e275a9762990771869485ac9 SHA1 404ae233fed0d3ad252e4a2897a5d01f6b613ade SHA256 5d2e175e20aa5d7b7049a76be847a9bd974d25625b5324ac8f23680cb7e734bc AUX courier-imap-4.0.6-r1-courier-imapd.rc6 949 RMD160 484cdac2b40e6f8dbad3a604a8ab2d3967226952 SHA1 562a624818140ed324cdaf2cb7d3541f7b5a48f7 SHA256 67406394a81a4ca697b8d08e987a0680b4e7622ac30ea009241b002f1d3adc8e AUX courier-imap-4.0.6-r1-courier-pop3d-ssl.rc6 1208 RMD160 8a997b6299c6a3de6dcd3e4b2d7c5171286e466a SHA1 0e007a0a8964e2c0523f187b0aed291008d70c2b SHA256 dec6250978b39b6dd1bfbea0b0dbd108ca60171db04135dff66c5ae73a7a33e6 -AUX courier-imap-4.0.6-r1-courier-pop3d.indirect 81 RMD160 0e144bab4674e4330ba18fa18ecc9b9a8efe4803 SHA1 aea5c225b07eaefb5ac0bf9207cdda12e804640a SHA256 55a49859df2eb85f7ade803f0aa42291ff54047c2e7475ae5598da05943b0dbc +AUX courier-imap-4.0.6-r1-courier-pop3d.indirect 81 RMD160 047384e594e26ef2148085b0c5b88dba98187617 SHA1 3872f619cc6a5c91d3454e450638802e37556cda SHA256 27fa269811a3f916b050166733232e5de1fa578c0f3cb79ca649e6b0cff67ea5 AUX courier-imap-4.0.6-r1-courier-pop3d.rc6 957 RMD160 d1502bbce31fc6a26cb3adf073abfe2b91bf29f3 SHA1 8db1f39de8d4041c96be3a5c04c6ecb763c6b00f SHA256 f3c8996471543ca35a9d4af6f2a7e5bc4fc5c9820dcc461792231236fababa69 AUX courier-imap-4.0.6-r1-gentoo-imapd-ssl.rc 984 RMD160 93671fcb0eb2660ef41edf9ffc404c864bc369b7 SHA1 fc0c25e11555384db3fb7756a4c6b78d9c8c8e7e SHA256 dd79242bddbd46f7eabbd99da612c4189bbc998e3680bf9d50f6788783ba820e AUX courier-imap-4.0.6-r1-gentoo-imapd.rc 1026 RMD160 1bd16e446e10da64352390803cbaa691c11ecc68 SHA1 b8eb095bb6c8b6c970dd60e944ebfd2f36a39b40 SHA256 a54e674a8bfce99cda974e5c2e9bd818440256130f018f1c3412ea29f4e618f1 @@ -65,14 +65,17 @@ EBUILD courier-imap-4.0.1-r2.ebuild 10513 RMD160 d9d129a6e065d863fd6379079caf502 EBUILD courier-imap-4.0.1.ebuild 10127 RMD160 27f7cca7ac2df0312532d783578c624b20783b24 SHA1 9df332f7dd19f1b90c70eb1b48e54916f9da01f0 SHA256 e81d23eaeaf853d92d7195147ade48e467cb91277d7361462d09d1068854de10 EBUILD courier-imap-4.0.4.ebuild 10136 RMD160 f7fb11b8bfef0a1d3fbb99e54bbd3b8e1987b8ad SHA1 b9300e604b65a4c9cb2f6e704f5424e4f514567f SHA256 d11814ed0cd7de7b2032c270a88f504729f733d32b70a0becda0529b88a0c88c EBUILD courier-imap-4.0.6-r2.ebuild 8497 RMD160 6e733cdd5c173b75676c27c7b17afac8a9866644 SHA1 4551c08b0279b69bd53037b5e7d9ccce842eeb05 SHA256 1f469ced21f1b52e4075c128b7a165a229df11a2bd80eee15550ce822501949d +EBUILD courier-imap-4.0.6-r3.ebuild 8503 RMD160 0250cf788545e1550623c77c629dfe51338bcfbf SHA1 ab99584c815c7a91f16b49d438b92c3ce11c1cdb SHA256 af69c7896dd2b6c6675c30fb937babdeac7a99011ee5073aecbb6d66435e985a EBUILD courier-imap-4.1.2-r1.ebuild 8620 RMD160 40bbc20ffd238606fee0e4f4931ff501c143c5d6 SHA1 9416a5b212c613a0954074ea4f00253e1cc7b8b4 SHA256 6e5458805e044f508c070d09c7cdbe2f2e21e381652104eb7b80f16f697cb1b3 +EBUILD courier-imap-4.1.2-r2.ebuild 8617 RMD160 7c1056d264a175a57a01fa0f31ae681a4cc65232 SHA1 8a197e21a46085aa236e999b1b9c0f751c81c14e SHA256 d85dac2b0bc549b1cce56c799c0cc0b94046cb9a2624cb4803c6fbe88ceeb373 +EBUILD courier-imap-4.4.1-r1.ebuild 8183 RMD160 1c4134f10409900b4806339bc50c3ee8120500e1 SHA1 3fe3dbb7e46dd940c2d0dc0981f93b7ad2830be6 SHA256 26cae5a1b12dfa0cad20f779f92fed457f89c7d7380c557f53897e7498d37e29 EBUILD courier-imap-4.4.1.ebuild 8184 RMD160 7b03e06fac0d8e96bf280c88c19c729580c62012 SHA1 f16c9f0c5b823e71ed27ec1d79ca7b1435211ece SHA256 7ddab73021b79078d44e910d4cc53bee2a0a06f0ee1f24e0b81c12143df6b23b -MISC ChangeLog 32023 RMD160 8dca4c3b837b4d0c55406cbd6bde7b7bcf834b6c SHA1 ded23dc687228cbb6f95061325ba704559444fc1 SHA256 f910b7a0fd5ad45a3083338e3ffe1ed8c731f6663b0df4244926017ec604db1a +MISC ChangeLog 32403 RMD160 9d80af148cbddc15034ca168a8d7ed5d8a7cbfbe SHA1 21400e030fd77ddffb5e4b522fcf435ef4609353 SHA256 cca498e6bc26ab831699f7d2811e27b54372982c8fba3024f176ff18fbf457da MISC metadata.xml 258 RMD160 897ec10251e2fc462bdbb9780e945c896f44c7c1 SHA1 4f790bcbe4149520174095bb7e048a8e39fbfc16 SHA256 87167a6f2c7b3c99a92806e11600b3c9bfb1b51126a670fd2bc9b4358935f810 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkiPfs4ACgkQWt/XSf2CZdn8jgCcCB03IRxG/QD1dEIC0p5LKnYX -Q7kAnjzl/eqr6V/Dxl5QsBeZ22O3HhJK -=iu5b +iEYEARECAAYFAklFeFsACgkQfNMcoUhJ7GzueQCgp0rIvWvvY0v3urWU9FRND6ku +lRcAoIESnIMNVs32J2M69KxsZo41kSpd +=q4A6 -----END PGP SIGNATURE----- diff --git a/net-mail/courier-imap/courier-imap-4.0.6-r3.ebuild b/net-mail/courier-imap/courier-imap-4.0.6-r3.ebuild new file mode 100644 index 000000000000..2f13244775d8 --- /dev/null +++ b/net-mail/courier-imap/courier-imap-4.0.6-r3.ebuild @@ -0,0 +1,264 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/courier-imap-4.0.6-r3.ebuild,v 1.1 2008/12/14 21:19:10 mabi Exp $ + +inherit autotools eutils multilib + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + +DESCRIPTION="An IMAP daemon designed specifically for maildirs." +HOMEPAGE="http://www.courier-mta.org/" +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +IUSE="berkdb debug fam gdbm ipv6 nls selinux" + +# userpriv breaks linking against vpopmail +RESTRICT="userpriv" + +RDEPEND=">=dev-libs/openssl-0.9.6 + >=net-libs/courier-authlib-0.57 + >=net-mail/mailbase-0.00-r8 + berkdb? ( sys-libs/db ) + fam? ( virtual/fam ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + selinux? ( sec-policy/selinux-courier-imap )" +DEPEND="${RDEPEND} + dev-lang/perl + !mail-mta/courier + userland_GNU? ( sys-process/procps )" +RDEPEND="${RDEPEND} + !virtual/imapd" + +PROVIDE="virtual/imapd" + +RC_VER="4.0.6-r1" +INITD_VER="4.0.6-r1" + +pkg_setup() { + if ! use berkdb && ! use gdbm ; then + echo + eerror "Either the 'berkdb' or the 'gdbm' USE flag is required." + eerror "Please add it to '/etc/make.conf' or '/etc/portage/package.use'." + eerror "Use 'man 5 portage' for more info on '/etc/portage/package.use'." + echo + die "Required USE flag missing." + fi +} + +vpopmail_setup() { + VPOPMAIL_INSTALLED= + VPOPMAIL_DIR= + export VPOPMAIL_INSTALLED VPOPMAIL_DIR + VPOPMAIL_DIR=$(grep ^vpopmail /etc/passwd 2>/dev/null | cut -d: -f6) + VPOPMAIL_INSTALLED= + if has_version 'net-mail/vpopmail' && [[ -n "${VPOPMAIL_DIR}" ]] && [[ -f "${VPOPMAIL_DIR}/etc/lib_deps" ]] ; then + VPOPMAIL_INSTALLED=1 + else + VPOPMAIL_DIR= + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Bug #48838. Patch to enable/disable FAM support. + # 20 Aug 2004 langthang@gentoo.org + # This patch should fix bug #51540. fam USE flag is not needed for shared folder support. + epatch "${FILESDIR}"/${PN}-4.0.1-disable-fam-configure.in.patch + + # Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206). + epatch "${FILESDIR}"/${P}-aclocal-fix.patch + + # These patches should fix problems detecting BerkeleyDB. + # We now can compile with db4 support. + if use berkdb ; then + epatch "${FILESDIR}"/${P}-db4-bdbobj_configure.in.patch + epatch "${FILESDIR}"/${P}-db4-tcpd_configure.in.patch + epatch "${FILESDIR}"/${P}-db4-configure.in.patch + fi + + ebegin "Recreating configure" + AT_NO_RECURSIVE="true" eautoreconf || die "eautoreconf on . failed" + eend $? + + cd "${S}/maildir" + ebegin "Recreating maildir/configure" + eautoreconf || die "eautoreconf on maildir failed" + eend $? + + cd "${S}/bdbobj" + ebegin "Recreating bdbobj/configure" + eautoreconf || die "eautoreconf on bdbobj failed" + eend $? + + cd "${S}/tcpd" + ebegin "Recreating tcpd/configure" + eautoreconf || die "eautoreconf on tcpd failed" + eend $? +} + +src_compile() { + vpopmail_setup + + local myconf="" + + # 19 Aug 2004 langthang@gentoo.org + # Default to gdbm if both berkdb and gdbm are present. + if use gdbm ; then + einfo "Building with GDBM support" + myconf="${myconf} --with-db=gdbm" + elif use berkdb ; then + einfo "Building with BerkeleyDB support" + myconf="${myconf} --with-db=db" + fi + + # The default character set is ISO-8859-1/US-ASCII. + # USE 'nls' will enable all available character sets. + # Set ENABLE_UNICODE=iso-8859-1,utf-8,iso-8859-10 + # to include only specified translation tables. + if use nls && [[ -z "${ENABLE_UNICODE}" ]] ; then + einfo "ENABLE_UNICODE is not set, building with all available character sets" + myconf="${myconf} --enable-unicode" + elif use nls ; then + einfo "ENABLE_UNICODE is set, building with unicode=${ENABLE_UNICODE}" + myconf="${myconf} --enable-unicode=${ENABLE_UNICODE}" + else + einfo "Disabling unicode support" + myconf="${myconf} --disable-unicode" + fi + + use debug && myconf="${myconf} debug=true" + + # Fix for bug #21330 + CFLAGS="$(echo ${CFLAGS} | xargs)" + CXXFLAGS="$(echo ${CXXFLAGS} | xargs)" + LDFLAGS="$(echo ${LDFLAGS} | xargs)" + + # Do the actual build now + LDFLAGS="${LDFLAGS} " econf \ + --disable-root-check \ + --bindir=/usr/sbin \ + --mandir=/usr/share/man \ + --sysconfdir=/etc/${PN} \ + --libexecdir=/usr/$(get_libdir)/${PN} \ + --localstatedir=/var/lib/${PN} \ + --with-authdaemonvar=/var/lib/${PN}/authdaemon \ + --enable-workarounds-for-imap-client-bugs \ + --with-mailuser=mail \ + --with-mailgroup=mail \ + $(use_with fam) \ + $(use_with ipv6) \ + ${myconf} || die "econf failed" + + # Change the pem file location. + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \ + imap/imapd-ssl.dist || \ + die "sed failed" + + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \ + imap/pop3d-ssl.dist || \ + die "sed failed" + + emake || die "emake failed" +} + +src_install() { + vpopmail_setup + + dodir /var/lib/${PN} /etc/pam.d + emake DESTDIR="${D}" install || die "emake install failed" + rm -Rf "${D}/etc/pam.d" + + # Avoid name collisions in /usr/sbin wrt imapd and pop3d + cd "${D}/usr/sbin" + for name in imapd pop3d ; do + mv -f "${name}" "courier-${name}" || die "Failed to mv ${name} to courier-${name}" + done + + # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of + # 'Maildir', and to use /usr/sbin/courier-foo names. + cd "${D}/usr/$(get_libdir)/${PN}" + for service in {imapd,pop3d}{,-ssl} ; do + sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed" + sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed" + done + + # Rename the config files correctly and add a value for ${MAILDIR} to them. + cd "${D}/etc/${PN}" + for service in {imapd,pop3d}{,-ssl} ; do + mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}" + echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}" + echo 'MAILDIR=.maildir' >> "${service}" + echo 'MAILDIRPATH=.maildir' >> "${service}" + done + for service in imapd pop3d ; do + echo -e '# Put any program for ${PRERUN} here' >> "${service}" + echo 'PRERUN=' >> "${service}" + echo -e '# Put any program for ${LOGINRUN} here' >> "${service}" + echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}" + echo 'LOGINRUN=' >> "${service}" + done + + cd "${D}/usr/sbin" + for x in * ; do + if [[ -L "${x}" ]] ; then + rm -f "${x}" || die "Failed to rm ${x}" + fi + done + + cd ../share + mv -f * ../sbin + mv -f ../sbin/man . + cd .. + + for x in mkimapdcert mkpop3dcert ; do + mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig" + done + + exeinto /usr/sbin + doexe "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert" || die "doexe failed" + + dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger || die "dosym failed" + + mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp" + for initd in courier-{imapd,pop3d}{,-ssl} ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed" + doinitd "${initd}" || die "doinitd ${initd} failed" + done + exeinto /usr/$(get_libdir)/${PN} + for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${RC_VER}-${exe}" > "${exe}" || die "exe libdir-sed failed" + doexe "${exe}" || die "doexe ${exe} failed" + done + + dodir /usr/bin + mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake" + + # Bug #45953, more docs. + cd "${S}" + dohtml -r "${S}"/* + dodoc "${S}"/{00README.NOW.OR.SUFFER,AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme + docinto imap + dodoc "${S}"/imap/{ChangeLog,BUGS,BUGS.html,README} + docinto maildir + dodoc "${S}"/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt} + docinto tcpd + dodoc "${S}"/tcpd/README.couriertls +} + +pkg_postinst() { + elog "Authdaemond is no longer provided by this package." + elog "Authentication libraries are now in courier-authlib." + elog "For a quick-start howto please refer to:" + elog "/usr/share/doc/${P}/${PN}-gentoo.readme.gz" + # Some users have been reporting that permissions on this directory were + # getting scrambled, so let's ensure that they are sane. + chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${ROOT}/usr/$(get_libdir)/${PN}" +} + +src_test() { + ewarn "make check is not supported by this package due to the" + ewarn "--enable-workarounds-for-imap-client-bugs option." +} diff --git a/net-mail/courier-imap/courier-imap-4.1.2-r2.ebuild b/net-mail/courier-imap/courier-imap-4.1.2-r2.ebuild new file mode 100644 index 000000000000..6b314ac56ef4 --- /dev/null +++ b/net-mail/courier-imap/courier-imap-4.1.2-r2.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/courier-imap-4.1.2-r2.ebuild,v 1.1 2008/12/14 21:19:10 mabi Exp $ + +inherit autotools eutils multilib + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd" + +DESCRIPTION="An IMAP daemon designed specifically for maildirs." +HOMEPAGE="http://www.courier-mta.org/" +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +IUSE="berkdb debug fam gdbm ipv6 nls selinux" + +# userpriv breaks linking against vpopmail +RESTRICT="userpriv" + +RDEPEND=">=dev-libs/openssl-0.9.6 + >=net-libs/courier-authlib-0.57 + >=net-mail/mailbase-0.00-r8 + berkdb? ( sys-libs/db ) + fam? ( virtual/fam ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + selinux? ( sec-policy/selinux-courier-imap )" +DEPEND="${RDEPEND} + dev-lang/perl + !mail-mta/courier + userland_GNU? ( sys-process/procps )" +RDEPEND="${RDEPEND} + !virtual/imapd" + +PROVIDE="virtual/imapd" + +RC_VER="4.0.6-r1" +INITD_VER="4.0.6-r1" + +pkg_setup() { + if ! use berkdb && ! use gdbm ; then + echo + eerror "Either the 'berkdb' or the 'gdbm' USE flag is required." + eerror "Please add it to '/etc/make.conf' or '/etc/portage/package.use'." + eerror "Use 'man 5 portage' for more info on '/etc/portage/package.use'." + echo + die "Required USE flag missing." + fi +} + +vpopmail_setup() { + VPOPMAIL_INSTALLED= + VPOPMAIL_DIR= + export VPOPMAIL_INSTALLED VPOPMAIL_DIR + VPOPMAIL_DIR=$(grep ^vpopmail /etc/passwd 2>/dev/null | cut -d: -f6) + VPOPMAIL_INSTALLED= + if has_version 'net-mail/vpopmail' && [[ -n "${VPOPMAIL_DIR}" ]] && [[ -f "${VPOPMAIL_DIR}/etc/lib_deps" ]] ; then + VPOPMAIL_INSTALLED=1 + else + VPOPMAIL_DIR= + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Bug #48838. Patch to enable/disable FAM support. + # 20 Aug 2004 langthang@gentoo.org + # This patch should fix bug #51540. fam USE flag is not needed for shared folder support. + epatch "${FILESDIR}"/${PN}-4.0.1-disable-fam-configure.in.patch + + # Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206). + epatch "${FILESDIR}"/${PN}-4.0.6-aclocal-fix.patch + + # as-needed fix (bug #168769). + epatch "${FILESDIR}"/${P}-as-needed.patch + + # These patches should fix problems detecting BerkeleyDB. + # We now can compile with db4 support. + if use berkdb ; then + epatch "${FILESDIR}"/${PN}-4.0.6-db4-bdbobj_configure.in.patch + epatch "${FILESDIR}"/${PN}-4.0.6-db4-tcpd_configure.in.patch + epatch "${FILESDIR}"/${PN}-4.0.6-db4-configure.in.patch + fi + + ebegin "Recreating configure" + AT_NO_RECURSIVE="true" eautoreconf || die "eautoreconf on . failed" + eend $? + + cd "${S}/maildir" + ebegin "Recreating maildir/configure" + eautoreconf || die "eautoreconf on maildir failed" + eend $? + + cd "${S}/bdbobj" + ebegin "Recreating bdbobj/configure" + eautoreconf || die "eautoreconf on bdbobj failed" + eend $? + + cd "${S}/tcpd" + ebegin "Recreating tcpd/configure" + eautoreconf || die "eautoreconf on tcpd failed" + eend $? +} + +src_compile() { + vpopmail_setup + + local myconf="" + + # 19 Aug 2004 langthang@gentoo.org + # Default to gdbm if both berkdb and gdbm are present. + if use gdbm ; then + einfo "Building with GDBM support" + myconf="${myconf} --with-db=gdbm" + elif use berkdb ; then + einfo "Building with BerkeleyDB support" + myconf="${myconf} --with-db=db" + fi + + # The default character set is ISO-8859-1/US-ASCII. + # USE 'nls' will enable all available character sets. + # Set ENABLE_UNICODE=iso-8859-1,utf-8,iso-8859-10 + # to include only specified translation tables. + if use nls && [[ -z "${ENABLE_UNICODE}" ]] ; then + einfo "ENABLE_UNICODE is not set, building with all available character sets" + myconf="${myconf} --enable-unicode" + elif use nls ; then + einfo "ENABLE_UNICODE is set, building with unicode=${ENABLE_UNICODE}" + myconf="${myconf} --enable-unicode=${ENABLE_UNICODE}" + else + einfo "Disabling unicode support" + myconf="${myconf} --disable-unicode" + fi + + use debug && myconf="${myconf} debug=true" + + # Fix for bug #21330 + CFLAGS="$(echo ${CFLAGS} | xargs)" + CXXFLAGS="$(echo ${CXXFLAGS} | xargs)" + LDFLAGS="$(echo ${LDFLAGS} | xargs)" + + # Do the actual build now + LDFLAGS="${LDFLAGS} " econf \ + --disable-root-check \ + --bindir=/usr/sbin \ + --mandir=/usr/share/man \ + --sysconfdir=/etc/${PN} \ + --libexecdir=/usr/$(get_libdir)/${PN} \ + --localstatedir=/var/lib/${PN} \ + --with-authdaemonvar=/var/lib/${PN}/authdaemon \ + --enable-workarounds-for-imap-client-bugs \ + --with-mailuser=mail \ + --with-mailgroup=mail \ + $(use_with fam) \ + $(use_with ipv6) \ + ${myconf} || die "econf failed" + + # Change the pem file location. + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \ + imap/imapd-ssl.dist || \ + die "sed failed" + + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \ + imap/pop3d-ssl.dist || \ + die "sed failed" + + emake || die "emake failed" +} + +src_install() { + vpopmail_setup + + dodir /var/lib/${PN} /etc/pam.d + emake DESTDIR="${D}" install || die "emake install failed" + rm -Rf "${D}/etc/pam.d" + + # Avoid name collisions in /usr/sbin wrt imapd and pop3d + cd "${D}/usr/sbin" + for name in imapd pop3d ; do + mv -f "${name}" "courier-${name}" || die "Failed to mv ${name} to courier-${name}" + done + + # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of + # 'Maildir', and to use /usr/sbin/courier-foo names. + cd "${D}/usr/$(get_libdir)/${PN}" + for service in {imapd,pop3d}{,-ssl} ; do + sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed" + sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed" + done + + # Rename the config files correctly and add a value for ${MAILDIR} to them. + cd "${D}/etc/${PN}" + for service in {imapd,pop3d}{,-ssl} ; do + mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}" + echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}" + echo 'MAILDIR=.maildir' >> "${service}" + echo 'MAILDIRPATH=.maildir' >> "${service}" + done + for service in imapd pop3d ; do + echo -e '# Put any program for ${PRERUN} here' >> "${service}" + echo 'PRERUN=' >> "${service}" + echo -e '# Put any program for ${LOGINRUN} here' >> "${service}" + echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}" + echo 'LOGINRUN=' >> "${service}" + done + + cd "${D}/usr/sbin" + for x in * ; do + if [[ -L "${x}" ]] ; then + rm -f "${x}" || die "Failed to rm ${x}" + fi + done + + cd ../share + mv -f * ../sbin + mv -f ../sbin/man . + cd .. + + for x in mkimapdcert mkpop3dcert ; do + mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig" + done + + exeinto /usr/sbin + doexe "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert" || die "doexe failed" + + dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger || die "dosym failed" + + mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp" + for initd in courier-{imapd,pop3d}{,-ssl} ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed" + doinitd "${initd}" || die "doinitd ${initd} failed" + done + exeinto /usr/$(get_libdir)/${PN} + for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${RC_VER}-${exe}" > "${exe}" || die "exe libdir-sed failed" + doexe "${exe}" || die "doexe ${exe} failed" + done + + dodir /usr/bin + mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake" + + # Bug #45953, more docs. + cd "${S}" + dohtml -r "${S}"/* + dodoc "${S}"/{00README.NOW.OR.SUFFER,AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme + docinto imap + dodoc "${S}"/imap/{ChangeLog,BUGS,BUGS.html,README} + docinto maildir + dodoc "${S}"/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt} + docinto tcpd + dodoc "${S}"/tcpd/README.couriertls +} + +pkg_postinst() { + elog "Authdaemond is no longer provided by this package." + elog "Authentication libraries are now in courier-authlib." + elog "For a quick-start howto please refer to:" + elog "/usr/share/doc/${P}/${PN}-gentoo.readme.gz" + # Some users have been reporting that permissions on this directory were + # getting scrambled, so let's ensure that they are sane. + chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${ROOT}/usr/$(get_libdir)/${PN}" +} + +src_test() { + ewarn "make check is not supported by this package due to the" + ewarn "--enable-workarounds-for-imap-client-bugs option." +} diff --git a/net-mail/courier-imap/courier-imap-4.4.1-r1.ebuild b/net-mail/courier-imap/courier-imap-4.4.1-r1.ebuild new file mode 100644 index 000000000000..07f4a8ed0c4c --- /dev/null +++ b/net-mail/courier-imap/courier-imap-4.4.1-r1.ebuild @@ -0,0 +1,250 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/courier-imap-4.4.1-r1.ebuild,v 1.1 2008/12/14 21:19:10 mabi Exp $ + +inherit autotools eutils multilib libtool + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd" + +DESCRIPTION="An IMAP daemon designed specifically for maildirs." +HOMEPAGE="http://www.courier-mta.org/" +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" +LICENSE="GPL-3" +SLOT="0" +IUSE="berkdb debug fam gdbm ipv6 nls selinux gnutls" + +# userpriv breaks linking against vpopmail +RESTRICT="userpriv" + +RDEPEND="gnutls? ( net-libs/gnutls ) + !gnutls? ( >=dev-libs/openssl-0.9.6 ) + >=net-libs/courier-authlib-0.61 + >=net-mail/mailbase-0.00-r8 + berkdb? ( sys-libs/db ) + fam? ( virtual/fam ) + gdbm? ( >=sys-libs/gdbm-1.8.0 ) + selinux? ( sec-policy/selinux-courier-imap )" +DEPEND="${RDEPEND} + dev-lang/perl + !mail-mta/courier + userland_GNU? ( sys-process/procps )" +RDEPEND="${RDEPEND} + !virtual/imapd" + +PROVIDE="virtual/imapd" + +RC_VER="4.0.6-r1" +INITD_VER="4.0.6-r1" + +pkg_setup() { + if ! use berkdb && ! use gdbm ; then + echo + eerror "Either the 'berkdb' or the 'gdbm' USE flag is required." + eerror "Please add it to '/etc/make.conf' or '/etc/portage/package.use'." + eerror "Use 'man 5 portage' for more info on '/etc/portage/package.use'." + echo + die "Required USE flag missing." + fi +} + +vpopmail_setup() { + VPOPMAIL_INSTALLED= + VPOPMAIL_DIR= + export VPOPMAIL_INSTALLED VPOPMAIL_DIR + VPOPMAIL_DIR=$(grep ^vpopmail /etc/passwd 2>/dev/null | cut -d: -f6) + VPOPMAIL_INSTALLED= + if has_version 'net-mail/vpopmail' && [[ -n "${VPOPMAIL_DIR}" ]] && [[ -f "${VPOPMAIL_DIR}/etc/lib_deps" ]] ; then + VPOPMAIL_INSTALLED=1 + else + VPOPMAIL_DIR= + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # Bug #48838. Patch to enable/disable FAM support. + # 20 Aug 2004 langthang@gentoo.org + # This patch should fix bug #51540. fam USE flag is not needed for shared folder support. + epatch "${FILESDIR}"/${PN}-4.0.1-disable-fam-configure.in.patch + + # Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206). + epatch "${FILESDIR}"/${PN}-4.0.6-aclocal-fix.patch + + # These patches should fix problems detecting BerkeleyDB. + # We now can compile with db4 support. + if use berkdb ; then + epatch "${FILESDIR}"/${PN}-4.0.6-db4-bdbobj_configure.in.patch + epatch "${FILESDIR}"/${PN}-4.0.6-db4-configure.in.patch + fi + + ebegin "Recreating configure" + eautoreconf || die "eautoreconf failed" + eend $? +} + +src_compile() { + vpopmail_setup + + local myconf="" + + # 19 Aug 2004 langthang@gentoo.org + # Default to gdbm if both berkdb and gdbm are present. + if use gdbm ; then + einfo "Building with GDBM support" + myconf="${myconf} --with-db=gdbm" + elif use berkdb ; then + einfo "Building with BerkeleyDB support" + myconf="${myconf} --with-db=db" + fi + + # The default character set is ISO-8859-1/US-ASCII. + # USE 'nls' will enable all available character sets. + # Set ENABLE_UNICODE=iso-8859-1,utf-8,iso-8859-10 + # to include only specified translation tables. + if use nls && [[ -z "${ENABLE_UNICODE}" ]] ; then + einfo "ENABLE_UNICODE is not set, building with all available character sets" + myconf="${myconf} --enable-unicode" + elif use nls ; then + einfo "ENABLE_UNICODE is set, building with unicode=${ENABLE_UNICODE}" + myconf="${myconf} --enable-unicode=${ENABLE_UNICODE}" + else + einfo "Disabling unicode support" + myconf="${myconf} --disable-unicode" + fi + + use debug && myconf="${myconf} debug=true" + + # Fix for bug #21330 + CFLAGS="$(echo ${CFLAGS} | xargs)" + CXXFLAGS="$(echo ${CXXFLAGS} | xargs)" + LDFLAGS="$(echo ${LDFLAGS} | xargs)" + + # Do the actual build now + LDFLAGS="${LDFLAGS} " econf \ + --disable-root-check \ + --bindir=/usr/sbin \ + --mandir=/usr/share/man \ + --sysconfdir=/etc/${PN} \ + --libexecdir=/usr/$(get_libdir)/${PN} \ + --localstatedir=/var/lib/${PN} \ + --with-authdaemonvar=/var/lib/${PN}/authdaemon \ + --enable-workarounds-for-imap-client-bugs \ + --with-mailuser=mail \ + --with-mailgroup=mail \ + $(use_with fam) \ + $(use_with ipv6) \ + $(use_with gnutls) \ + ${myconf} || die "econf failed" + + # Change the pem file location. + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \ + imap/imapd-ssl.dist || \ + die "sed failed" + + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \ + imap/pop3d-ssl.dist || \ + die "sed failed" + + emake || die "emake failed" +} + +src_install() { + vpopmail_setup + + dodir /var/lib/${PN} /etc/pam.d + emake DESTDIR="${D}" install || die "emake install failed" + rm -Rf "${D}/etc/pam.d" + + # Avoid name collisions in /usr/sbin wrt imapd and pop3d + cd "${D}/usr/sbin" + for name in imapd pop3d ; do + mv -f "${name}" "courier-${name}" || die "Failed to mv ${name} to courier-${name}" + done + + # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of + # 'Maildir', and to use /usr/sbin/courier-foo names. + cd "${D}/usr/$(get_libdir)/${PN}" + for service in {imapd,pop3d}{,-ssl} ; do + sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed" + sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed" + done + + # Rename the config files correctly and add a value for ${MAILDIR} to them. + cd "${D}/etc/${PN}" + for service in {imapd,pop3d}{,-ssl} ; do + mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}" + echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}" + echo 'MAILDIR=.maildir' >> "${service}" + echo 'MAILDIRPATH=.maildir' >> "${service}" + done + for service in imapd pop3d ; do + echo -e '# Put any program for ${PRERUN} here' >> "${service}" + echo 'PRERUN=' >> "${service}" + echo -e '# Put any program for ${LOGINRUN} here' >> "${service}" + echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}" + echo 'LOGINRUN=' >> "${service}" + done + + cd "${D}/usr/sbin" + for x in * ; do + if [[ -L "${x}" ]] ; then + rm -f "${x}" || die "Failed to rm ${x}" + fi + done + + cd ../share + mv -f * ../sbin + mv -f ../sbin/man . + cd .. + + for x in mkimapdcert mkpop3dcert ; do + mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig" + done + + exeinto /usr/sbin + doexe "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert" || die "doexe failed" + + dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger || die "dosym failed" + + mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp" + for initd in courier-{imapd,pop3d}{,-ssl} ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed" + doinitd "${initd}" || die "doinitd ${initd} failed" + done + exeinto /usr/$(get_libdir)/${PN} + for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${RC_VER}-${exe}" > "${exe}" || die "exe libdir-sed failed" + doexe "${exe}" || die "doexe ${exe} failed" + done + + dodir /usr/bin + mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake" + + # Bug #45953, more docs. + cd "${S}" + dohtml -r "${S}"/* + dodoc "${S}"/{00README.NOW.OR.SUFFER,AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme + docinto imap + dodoc "${S}"/imap/{ChangeLog,BUGS,BUGS.html,README} + docinto maildir + dodoc "${S}"/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt} + docinto tcpd + dodoc "${S}"/tcpd/README.couriertls +} + +pkg_postinst() { + elog "Authdaemond is no longer provided by this package." + elog "Authentication libraries are now in courier-authlib." + elog "For a quick-start howto please refer to:" + elog "/usr/share/doc/${P}/${PN}-gentoo.readme.gz" + # Some users have been reporting that permissions on this directory were + # getting scrambled, so let's ensure that they are sane. + chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${ROOT}/usr/$(get_libdir)/${PN}" +} + +src_test() { + ewarn "make check is not supported by this package due to the" + ewarn "--enable-workarounds-for-imap-client-bugs option." +} diff --git a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.indirect b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.indirect index 2367ae0a2e77..26e0ba2cd5c0 100644 --- a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.indirect +++ b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.indirect @@ -1,3 +1,3 @@ #!/bin/bash XMAILDIR="$1" -eval ${LOGINRUN} /usr/sbin/courier-imapd "${XMAILDIR}" +exec ${LOGINRUN} /usr/sbin/courier-imapd "${XMAILDIR}" diff --git a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.indirect b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.indirect index 4651a048ac8b..1a523f24db4f 100644 --- a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.indirect +++ b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.indirect @@ -1,3 +1,3 @@ #!/bin/bash XMAILDIR="$1" -eval ${LOGINRUN} /usr/sbin/courier-pop3d "${XMAILDIR}" +exec ${LOGINRUN} /usr/sbin/courier-pop3d "${XMAILDIR}" |