ChangeLog

# ChangeLog for net-libs/courier-authlib
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/ChangeLog,v 1.90 2008/06/22 11:27:34 maekke Exp $

22 Jun 2008; Markus Meier
courier-authlib-0.60.6.ebuild:
amd64 stable, bug #225407

17 Jun 2008; Christian Faulhammer
courier-authlib-0.60.6.ebuild:
stable x86, security bug 225407

17 Jun 2008; Christian Faulhammer
courier-authlib-0.60.6.ebuild:
don't execute tests when USE=berkdb is disabled

15 Jun 2008; Diego Pettenò
courier-authlib-0.60.6.ebuild:
Don't install libltdl in any case, replace the installable macro with the
convenience one.

14 Jun 2008; Diego Pettenò
courier-authlib-0.60.6.ebuild:
Don't run eautoreconf twice (first recursive and then non-recursive), as
it would also have deleted elibtoolize results.

11 Jun 2008; Raúl Porcel
courier-authlib-0.60.6.ebuild:
alpha/ia64/sparc stable wrt #225407

10 Jun 2008; Tobias Scherbaum
courier-authlib-0.60.6.ebuild:
ppc stable, bug #225407

10 Jun 2008; Brent Baude
courier-authlib-0.60.6.ebuild:
Marking courier-authlib-0.60.6 ppc64 for bug 225407

10 Jun 2008; Jeroen Roovers
courier-authlib-0.60.6.ebuild:
Stable for HPPA (bug #225407).

*courier-authlib-0.60.6 (08 Jun 2008)

08 Jun 2008; Hanno Boeck
+courier-authlib-0.60.6.ebuild:
Version bump, security.

25 May 2008; Hanno Boeck courier-authlib-0.60.2.ebuild,
courier-authlib-0.60.2-r1.ebuild:
Fix license (GPL-3).

23 May 2008; Raúl Porcel
courier-authlib-0.60.2-r1.ebuild:
ia64 stable wrt #222737

22 May 2008; Markus Meier
courier-authlib-0.60.2-r1.ebuild:
amd64/x86 stable, bug #222737

22 May 2008; Tobias Klausmann
courier-authlib-0.60.2-r1.ebuild:
Stable on alpha, bug #222737

21 May 2008; Tiziano Müller
courier-authlib-0.58.ebuild, courier-authlib-0.59.2.ebuild,
courier-authlib-0.60.2.ebuild, courier-authlib-0.60.2-r1.ebuild:
Changed dependency for postgresql from dev-db/postgresql to
virtual/postgresql-server

21 May 2008; nixnut courier-authlib-0.60.2-r1.ebuild:
Stable on ppc wrt bug 222737

20 May 2008; Jeroen Roovers
courier-authlib-0.60.2-r1.ebuild:
Stable for HPPA (bug #222737).

*courier-authlib-0.60.2-r1 (20 May 2008)

20 May 2008; Hanno Boeck
+courier-authlib-0.60.2-r1.ebuild:
Remove vpopmail-support.

18 May 2008; Ferris McCormick
courier-authlib-0.60.2.ebuild:
Sparc stable --- Bug #222737 --- builds, installs, works for me.

20 Apr 2008; Mike Frysinger
courier-authlib-0.60.2.ebuild:
Run autotools in all directories, not just the toplevel #218295.

16 Apr 2008; Luca Longinotti metadata.xml:
Update metadata, assign this solely to the herd, I'm no longer interested
in maintaining it myself.

*courier-authlib-0.60.2 (15 Apr 2008)

15 Apr 2008; Hanno Boeck
+courier-authlib-0.60.2.ebuild:
Version bump, proxy-maintained ebuild by user Bernd Wurst.

09 Mar 2008; courier-authlib-0.58.ebuild:
Drop to ~mips due to unstable deps

02 Jul 2007; Piotr Jaroszyński
courier-authlib-0.58.ebuild:
(QA) RESTRICT clean up.

08 May 2007; Marius Mauch courier-authlib-0.58.ebuild,
courier-authlib-0.59.2.ebuild:
Replacing einfo with elog

08 Apr 2007; Luca Longinotti metadata.xml:
Update metadata.

*courier-authlib-0.59.2 (08 Apr 2007)

08 Apr 2007; Luca Longinotti
-files/0.59.1-configure-db4.patch,
-files/0.59.1-remove-obsolete-macro.patch,
+files/0.59.2-configure-db4.patch,
+files/0.59.2-remove-obsolete-macro.patch, files/courier-authlib,
-files/initd/courier-authlib, metadata.xml, courier-authlib-0.58.ebuild,
-courier-authlib-0.58-r1.ebuild, -courier-authlib-0.59.1.ebuild,
+courier-authlib-0.59.2.ebuild:
Ebuild cleanup, version bump to 0.59.2.

30 Mar 2007; Timothy Redaelli
courier-authlib-0.59.1.ebuild:
Add ~x86-fbsd keyword

*courier-authlib-0.59.1 (03 Feb 2007)

03 Feb 2007; Charlie Shepherd
+files/0.59.1-configure-db4.patch,
+files/0.59.1-remove-obsolete-macro.patch, +courier-authlib-0.59.1.ebuild:
Bump to version, bug 162531, thanks to Conrad Kostecki. Add a vpopmail use
flag, bug 161754, thanks to Georgi Georgiev.

*courier-authlib-0.58-r1 (16 Jan 2007)

16 Jan 2007; Charlie Shepherd
+files/0.58-configure-db4.patch, +files/0.58-remove-obsolete-macro.patch,
-files/configure-db4.patch, -files/CVE-2005-3532.patch,
+files/courier-authlib, -files/courier-authlib-initd,
+files/initd/courier-authlib, -courier-authlib-0.53.ebuild,
-courier-authlib-0.54.20050224.ebuild, -courier-authlib-0.55.ebuild,
-courier-authlib-0.55.20050320.ebuild, -courier-authlib-0.56.ebuild,
-courier-authlib-0.57.ebuild, -courier-authlib-0.57-r1.ebuild,
-courier-authlib-0.57-r2.ebuild, -courier-authlib-0.57.20051116.ebuild,
courier-authlib-0.58.ebuild, +courier-authlib-0.58-r1.ebuild:
Clean out old versions. Sanitize remaining ebuild. Bump to -r1 for bug 117290.
Fix configure for bug 117290 for >db-4.3, thanks to Hanno Meyer-Thurow. Fix
configure for bug 160286, thanks to Sheldon Hearn.

05 Jan 2007; Diego Pettenò
courier-authlib-0.53.ebuild, courier-authlib-0.54.20050224.ebuild,
courier-authlib-0.55.ebuild, courier-authlib-0.55.20050320.ebuild,
courier-authlib-0.56.ebuild, courier-authlib-0.57.ebuild,
courier-authlib-0.57-r1.ebuild, courier-authlib-0.57-r2.ebuild,
courier-authlib-0.57.20051116.ebuild:
Remove gnuconfig_update usage, leave it to econf.

04 Jan 2007; Diego Pettenò
courier-authlib-0.58.ebuild:
Fix broken autotools handling.

23 Nov 2006; Francesco Riosa
courier-authlib-0.53.ebuild, courier-authlib-0.54.20050224.ebuild,
courier-authlib-0.55.ebuild, courier-authlib-0.55.20050320.ebuild,
courier-authlib-0.56.ebuild, courier-authlib-0.57.ebuild,
courier-authlib-0.57-r1.ebuild, courier-authlib-0.57-r2.ebuild,
courier-authlib-0.57.20051116.ebuild, courier-authlib-0.58.ebuild:
dev-db/mysql => virtual/mysql

14 Oct 2006; Bryan Østergaard metadata.xml:
Remove swtaylor from metadata.xml due to retiring.

24 Apr 2006; Joshua Kinard courier-authlib-0.58.ebuild:
Marked stable on mips.

02 Apr 2006; Jason Wever courier-authlib-0.58.ebuild:
Stable on SPARC.

07 Feb 2006; Simon Stelling
courier-authlib-0.58.ebuild:
stable on amd64

07 Feb 2006; Aron Griffis
courier-authlib-0.58.ebuild:
Mark 0.58 stable on alpha

21 Jan 2006; Markus Rothe
courier-authlib-0.58.ebuild:
Stable on ppc64

21 Jan 2006; Michael Hanselmann
courier-authlib-0.58.ebuild:
Stable on ppc.

17 Jan 2006; Paul Varner
courier-authlib-0.58.ebuild:
Stable on x86. Bug #119055

*courier-authlib-0.58 (10 Dec 2005)

10 Dec 2005; Scott Taylor
files/courier-authlib-initd, +courier-authlib-0.58.ebuild:
add 0.58 ebuild, update init script to export params, for bug 111672

*courier-authlib-0.57.20051116 (06 Dec 2005)
*courier-authlib-0.57-r2 (06 Dec 2005)

06 Dec 2005; Scott Taylor +files/CVE-2005-3532.patch,
+courier-authlib-0.57-r2.ebuild, +courier-authlib-0.57.20051116.ebuild:
patch for Bug 113074

27 Nov 2005; Rene Nussbaumer
courier-authlib-0.57-r1.ebuild:
Stable on hppa.

12 Nov 2005; Jason Wever
courier-authlib-0.57-r1.ebuild:
Stable on SPARC.

18 Oct 2005; Aron Griffis
courier-authlib-0.57-r1.ebuild:
Mark 0.57-r1 stable on alpha

02 Oct 2005; Michael Hanselmann
courier-authlib-0.57-r1.ebuild:
Stable on ppc.

02 Oct 2005; Aron Griffis
courier-authlib-0.57-r1.ebuild:
Mark 0.57-r1 stable on ia64

02 Oct 2005; MATSUU Takuto
courier-authlib-0.57-r1.ebuild:
Stable on sh.

24 Sep 2005; Markus Rothe
courier-authlib-0.57-r1.ebuild:
Stable on ppc64

21 Sep 2005; Francesco Riosa
courier-authlib-0.57-r1.ebuild:
Stable on "x86" and "amd64"

*courier-authlib-0.57-r1 (24 Aug 2005)

24 Aug 2005; Roy Marples
files/courier-authlib-initd, +courier-authlib-0.57-r1.ebuild:
Rev bump for new init script. Fixes #103104

*courier-authlib-0.57 (26 Jul 2005)

26 Jul 2005; Francesco Riosa
+courier-authlib-0.57.ebuild:
version bump
fix Bug #88415 : courier-authlib-0.5* doesn't compile using mysql when
LDFLAGS are set in system

*courier-authlib-0.56 (02 Jul 2005)

02 Jul 2005; Scott W Taylor
+courier-authlib-0.56.ebuild:
bump

29 May 2005; courier-authlib-0.53.ebuild,
courier-authlib-0.54.20050224.ebuild, courier-authlib-0.55.20050320.ebuild,
courier-authlib-0.55.ebuild:
- update courier-authlib to use libc expanded variable elibc_uclibc vs uclibc
so USE=-* works

*courier-authlib-0.55.20050320 (21 Mar 2005)

21 Mar 2005; Scott W Taylor
-courier-authlib-0.54.ebuild, +courier-authlib-0.55.20050320.ebuild:
bump

20 Mar 2005; Scott W Taylor
courier-authlib-0.53.ebuild, courier-authlib-0.55.ebuild:
promote 0.55, strip -fomit-frame-pointer

19 Mar 2005; Scott W Taylor
courier-authlib-0.53.ebuild, courier-authlib-0.54.ebuild,
courier-authlib-0.54.20050224.ebuild, courier-authlib-0.55.ebuild:
bash cleanup

17 Mar 2005; Scott W Taylor
courier-authlib-0.53.ebuild, courier-authlib-0.54.ebuild,
courier-authlib-0.54.20050224.ebuild, courier-authlib-0.55.ebuild:
install mysql readme file for pgsql users

15 Mar 2005; Scott W Taylor
-courier-authlib-0.52-r1.ebuild, courier-authlib-0.53.ebuild,
courier-authlib-0.54.ebuild, courier-authlib-0.54.20050224.ebuild,
courier-authlib-0.55.ebuild:
change vpopmail detection for #85391

*courier-authlib-0.55 (04 Mar 2005)

04 Mar 2005; Scott W Taylor
+courier-authlib-0.55.ebuild:
bump

*courier-authlib-0.54.20050224 (25 Feb 2005)

25 Feb 2005; Scott W Taylor
+courier-authlib-0.54.20050224.ebuild:
bump. adds cram-sha256

*courier-authlib-0.54 (13 Feb 2005)

13 Feb 2005; Scott W Taylor
+courier-authlib-0.54.ebuild:
errata bump

04 Feb 2005; Scott W Taylor
files/courier-authlib-initd:
add "provide authdaemond" to init script

31 Jan 2005; Scott W Taylor
courier-authlib-0.52-r1.ebuild, courier-authlib-0.53.ebuild:
changed sed calls for more consistent edits.
make sure userdb is found and migrated
call makeuserdb after the install, if userdb exists

30 Jan 2005; Scott W Taylor
courier-authlib-0.52-r1.ebuild, courier-authlib-0.53.ebuild:
mostly cosmetic changes. also puts authldap.schema in /etc/openldap/schema/

30 Jan 2005; Scott W Taylor
courier-authlib-0.52-r1.ebuild:
initial stable keywording

*courier-authlib-0.53 (30 Jan 2005)

30 Jan 2005; Scott W Taylor
+courier-authlib-0.53.ebuild:
bump to 0.53

*courier-authlib-0.52-r1 (07 Jan 2005)

07 Jan 2005; Scott W Taylor
+courier-authlib-0.52-r1.ebuild:
build authshadow (bug 71909) and use /usr/$(get_libdir) for better arch support

06 Jan 2005; Jeremy Huddleston
courier-authlib-0.52.ebuild:
multilib and cross-compilation fixes.

01 Jan 2005; Tuan Van courier-authlib-0.52.ebuild:
add "libtoolize --copy --force"

01 Jan 2005; Tuan Van files/configure-db4.patch:
adjust patch for the newer version.

*courier-authlib-0.52 (01 Jan 2005)

01 Jan 2005; Scott W Taylor
-courier-authlib-0.51_pre.ebuild, +courier-authlib-0.52.ebuild:
courier-authlib 0.52 released

24 Dec 2004; Markus Rothe
courier-authlib-0.51_pre.ebuild:
Added ~ppc64 to KEYWORDS; bug #75450

22 Dec 2004; Tuan Van
courier-authlib-0.51_pre.ebuild:
arm/hppa/ia64/s390 keywords on behalf of vapier.

15 Dec 2004; Scott W Taylor
courier-authlib-0.50.20041203.ebuild:
change keepdir in the other one too

15 Dec 2004; Scott W Taylor
courier-authlib-0.51_pre.ebuild:
keep more specific dir, and one that doesn't collide with courier

10 Dec 2004; Scott W Taylor
-courier-authlib-0.50.20041120.ebuild,
-courier-authlib-0.50.20041129.ebuild:
housecleaning

09 Dec 2004; Scott W Taylor
courier-authlib-0.51_pre.ebuild:
don't mirror release candidate

*courier-authlib-0.51_pre (09 Dec 2004)

09 Dec 2004; Scott W Taylor
+courier-authlib-0.51_pre.ebuild:
bump

*courier-authlib-0.50.20041203 (04 Dec 2004)

04 Dec 2004; Scott W Taylor
+courier-authlib-0.50.20041203.ebuild:
bump

01 Dec 2004; Scott W Taylor
courier-authlib-0.50.20041129.ebuild:
~mips

01 Dec 2004; Scott W Taylor
-courier-authlib-0.50.20041116.ebuild,
courier-authlib-0.50.20041129.ebuild:
also check /etc/courier-imap folder for auth*rc configs to migrate

*courier-authlib-0.50.20041129 (01 Dec 2004)

01 Dec 2004; Scott W Taylor
+courier-authlib-0.50.20041129.ebuild:
bump. fix migration from self

27 Nov 2004; Scott W Taylor
files/courier-authlib-initd, courier-authlib-0.50.20041120.ebuild:
almost there

26 Nov 2004; Scott W Taylor
courier-authlib-0.50.20041120.ebuild:
fix postgres

26 Nov 2004; Scott W Taylor
files/courier-authlib-initd:
fix initd

*courier-authlib-0.50.20041120 (21 Nov 2004)

21 Nov 2004; Scott W Taylor
+courier-authlib-0.50.20041120.ebuild:
version bump. work in progress.

20 Nov 2004; Scott W Taylor
+files/configure-db4.patch, courier-authlib-0.50.20041116.ebuild:
work in progress. merging stuff from imap

*courier-authlib-0.50.20041116 (19 Nov 2004)

19 Nov 2004; Scott W Taylor +metadata.xml,
+courier-authlib-0.50.20041116.ebuild:
work in progress

Manifest

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

AUX 0.58-configure-db4.patch 2616 RMD160 a65654c28537fc797eb0d7633d1b0b38f97af6f7 SHA1 9e66d0f69dc5ae157868c63d48009ef2a27a3d46 SHA256 629888b8363b0debcc592b4bed7390dfb01d9fc0ee15712d7c5a56575e25efe0
AUX 0.58-remove-obsolete-macro.patch 252 RMD160 f7bffc4956e078c5700394cfa6641df0c04ba050 SHA1 b199c22cbb6e449db76fdc924f6481a86361314f SHA256 ea6753f82c2b267ff373286f0c0a9e379e30f5d68bfe1df1c375d0a547d12a62
AUX 0.59.2-configure-db4.patch 2618 RMD160 33691117802c3a9fe75c75c69594a4f63f4d2575 SHA1 47fc3ba36441c79fa4d8188530a4a2e1a9c8dcd2 SHA256 a60e2f5d26673be2ae107d9fcec024f41c522663d28f4741000fb1885ce067bc
AUX 0.59.2-remove-obsolete-macro.patch 254 RMD160 268c175e0e75893661c9d17a36265a008469d49d SHA1 1afe4d21d480ab71d58a60cfca03d0a5abef2a3b SHA256 1e9d8df4d8a29c91384891a389da090a9c0a16e963936e21d2f999e13cfdbc1f
AUX courier-authlib 1112 RMD160 a0d5bf781ed1792677d83efd5034c83f689f7f2f SHA1 e755e781157787c921ef4884c1aca27e0ec68e87 SHA256 c946e42e5ed31a210da99af4d83cb739e2008ad2ea524955cdb141f4c7289dc9
DIST courier-authlib-0.58.tar.bz2 2006735 RMD160 6474612496cd287f294c7f52239ea853c44e4aa1 SHA1 8bdab3c2e734cc8f47230924ec638ba3609a92a1 SHA256 d877cc6c65e90471ec9410c5ce7af467ba5beb3922b9cfbf2bf6aa24f6bdc7ad
DIST courier-authlib-0.59.2.tar.bz2 2109549 RMD160 499da7ec09fbe46be5ea9450c6ecb9c3d648244b SHA1 84dfd3175b2fcbbb18a1ea87f3cb803daff827df SHA256 326f4a2e0c2a6259083f521ae838984eca051483dadfdcda4b0a535d7472f396
DIST courier-authlib-0.60.2.tar.bz2 2158473 RMD160 bdf6d68b7b6a5c6d13079477d83312f98dd7bd31 SHA1 cd5969075de212ecfb406ffb1ac974ea939ddcc0 SHA256 824e92b6b6f7755ec06a22b5b1eb3734853ee8824612c62f92a9b2f33be04bbd
DIST courier-authlib-0.60.6.tar.bz2 2173779 RMD160 7d2dd176497754bc50c3e4f76e7fb72513f7285b SHA1 31224309d6cde82e57fcddf73fc1999fd7529fd4 SHA256 3ac028bfb34110fccf88e78b3235c6129d2b856e81589ce9b9cf60fd8f4af408
EBUILD courier-authlib-0.58.ebuild 5872 RMD160 83747b4c5e50f8f3d071e810f0e4c6cbe8e3c54a SHA1 4866b468399f5177fd3ced26200b03fe968d8649 SHA256 e33d86092317f8c644203f4f0f03a0f4989bfdaca45f5e665b36939e8b729c7c
EBUILD courier-authlib-0.59.2.ebuild 5947 RMD160 dd4b55148807addd08eca7e6342c99c8940792ef SHA1 599a46dfc885f33b1f25ce6c308099df842f4531 SHA256 263ee83b45922e3407b40e6bdcb30f26f7f0e7cce6fb67e437546dfdb4a62d25
EBUILD courier-authlib-0.60.2-r1.ebuild 5886 RMD160 ed7c0251cc22cdd32c37cfe501aa9cd76fa6f3cd SHA1 0ba410ed723e2935ebd23dbc19db0ffebbdd1f2f SHA256 e47cf5e6a0bae8a9ae1adebd8c62f3e31dc6a39df2ea276bc16da346ac71d87f
EBUILD courier-authlib-0.60.2.ebuild 5894 RMD160 46d68d503f22e6d2a9d106fff11596d60dde3b1b SHA1 48a60c3d6b768f412b4723ec96764265ba01f622 SHA256 3efabb29d58c077c36441a6c167aa53449b7563966d253b31bd03a144257af10
EBUILD courier-authlib-0.60.6.ebuild 6086 RMD160 096f0d0c05d27dade66147349b66e1c6d975cbc5 SHA1 9aad6b98968e3d8294d4fac9241f27324d7133a3 SHA256 5bb51030613264b49de4a2de51727d506c54c19ae762a9480a0d772ec6d9227e
MISC ChangeLog 15132 RMD160 bb2ebaad6ba0832f5ac9ec4dae084023f5d04720 SHA1 89455d22ea3abc1f550596515cf7da2a24dcf523 SHA256 fe8e734056f670273223a3961dffd3a44510870de0265a96acce168f12ef974b
MISC metadata.xml 162 RMD160 fd38b82541901b3c6df18b630d79fe7883ae3f01 SHA1 e6aecefcc2137d6047cedfe447686775ab59cb48 SHA256 569031668e39895fb20829fb17a49a91a83e8f41b2195b0f04825c4340d2af6b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkheN2gACgkQkKaRLQcq0GKSLQCgpbTQop7F4VozyvpUxEnJShK9
PoQAnR/7vKRNWBFaJ7HWmDWqd8hp7tWX
=5AGe
-----END PGP SIGNATURE-----

courier-authlib-0.58.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.58.ebuild,v 1.18 2008/05/21 18:57:28 dev-zero Exp $

WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"

inherit eutils flag-o-matic autotools

DESCRIPTION="courier authentication library"
[ -z "${PV/?.??/}" ] && SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
[ -z "$SRC_URI" ] && SRC_URI="http://www.courier-mta.org/beta/courier-authlib/${P%%_pre}.tar.bz2"
HOMEPAGE="http://www.courier-mta.org/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
IUSE="postgres ldap mysql berkdb gdbm pam crypt debug"

RESTRICT="userpriv"

DEPEND="gdbm? ( sys-libs/gdbm )
!gdbm? ( >=sys-devel/autoconf-2.5 sys-libs/db )
>=dev-libs/openssl-0.9.6
pam? ( >=sys-libs/pam-0.75 )
mysql? ( virtual/mysql )
ldap? ( >=net-nds/openldap-1.2.11 )
postgres? ( >=virtual/postgresql-server-7.2 )"

RDEPEND="gdbm? ( sys-libs/gdbm )
!gdbm? ( sys-libs/db )"

S="${WORKDIR}/${P%%_pre}"

pkg_setup() {
if ! has_version 'dev-tcltk/expect' ; then
ewarn 'The dev-tcltk/expect package is not installed.'
ewarn 'Without it, you will not be able to change system login passwords.'
ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,'
ewarn 'and others) will work just fine.'
fi
}

src_unpack() {
unpack ${A}
cd "${S}"
sed -e "s|^chk_file .* |&\${DESTDIR}|g" -i.orig authmigrate.in
use elibc_uclibc && sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub
if ! use gdbm ; then
epatch "${FILESDIR}/${PV}-configure-db4.patch"
else
epatch "${FILESDIR}/${PV}-remove-obsolete-macro.patch"
fi
sed -i -e'/for dir in/a@@INDENT@@/etc/courier-imap \\' ${S}/authmigrate.in
sed -i -e'/for dir in/a@@INDENT@@/etc/courier/authlib \\' ${S}/authmigrate.in
sed -i -e"s|@@INDENT@@| |g" ${S}/authmigrate.in
sed -i -e"s|\$sbindir/makeuserdb||g" ${S}/authmigrate.in

eautoreconf
}

src_compile() {
filter-flags -fomit-frame-pointer

local myconf
myconf="$(use_with pam authpam) $(use_with ldap authldap)"

if use berkdb; then
if use gdbm; then
ewarn "Both gdbm and berkdb selected. Using gdbm."
else
myconf="${myconf} --with-db=db"
fi
fi
use gdbm && myconf="${myconf} --with-db=gdbm"

if has_version 'net-mail/vpopmail' ; then
myconf="${myconf} --with-authvchkpw --without-authmysql --without-authpgsql"
use mysql && ewarn "vpopmail found. authmysql will not be built."
use postgres && ewarn "vpopmail found. authpgsql will not be built."
else
myconf="${myconf} --without-authvchkpw $(use_with mysql authmysql) $(use_with postgres authpgsql)"
fi

use debug && myconf="${myconf} debug=true"

einfo "Configuring courier-authlib: ${myconf}"

econf \
--sysconfdir=/etc/courier \
--datadir=/usr/share/courier \
--libexecdir=/usr/$(get_libdir)/courier \
--localstatedir=/var/lib/courier \
--sharedstatedir=/var/lib/courier/com \
--with-authdaemonvar=/var/lib/courier/authdaemon \
--with-authshadow \
--without-redhat \
--with-mailuser=mail \
--with-mailgroup=mail \
--cache-file="${S}/configuring.cache" \
${myconf} || die "econf failed"
emake || die "emake failed"
}

orderfirst() {
file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}"
if [ -e "${file}" ] ; then
orig="$(grep \"^${option}=\" ${file} | cut -d'\"' -f 2)"
new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\""
sed -i -e"s/^${option}=.*$/${new}/" ${file}
fi
}

finduserdb() {
for dir in \
/etc/courier/authlib /etc/courier /etc/courier-imap \
/usr/lib/courier/etc /usr/lib/courier-imap/etc \
/usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \
/usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \
/usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do
if [ -e "$dir/userdb" ]; then
einfo "found $dir/userdb"
cp -v $dir/userdb ${D}/etc/courier/authlib/
chmod go-rwx ${D}/etc/courier/authlib/userdb
continue
fi
done
}

src_install() {
diropts -o mail -g mail
dodir /etc/courier
keepdir /var/lib/courier/authdaemon
keepdir /etc/courier/authlib
emake install DESTDIR="${D}" || die "install failed"
emake install-migrate DESTDIR="${D}" || die "migrate failed"
[ ! -e "${D}/etc/courier/authlib/userdb" ] && finduserdb
emake install-configure DESTDIR="${D}" || die "install-configure failed"
rm -vf ${D}/etc/courier/authlib/*.bak
chown mail:mail ${D}/etc/courier/authlib/*
for y in ${D}/etc/courier/authlib/*.dist ; do
[ ! -e "${y%%.dist}" ] && cp -v ${y} ${y%%.dist}
done
use pam && orderfirst authdaemonrc authmodulelist authpam
use ldap && orderfirst authdaemonrc authmodulelist authldap
use postgres && orderfirst authdaemonrc authmodulelist authpgsql
use mysql && orderfirst authdaemonrc authmodulelist authmysql
dodoc AUTHORS COPYING ChangeLog* INSTALL NEWS README
dohtml README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html
if use mysql; then
dodoc README.authmysql.myownquery
dohtml README.authmysql.html
fi
use postgres && dohtml README.authpostgres.html README.authmysql.html
if use ldap; then
dodoc README.ldap
dodir /etc/openldap/schema
cp authldap.schema "${D}/etc/openldap/schema/"
fi
doinitd "${FILESDIR}/${PN}" || die "doinitd failed"
}

pkg_postinst() {
if [ -e /etc/courier/authlib/userdb ]; then
einfo "running makeuserdb"
chmod go-rwx /etc/courier/authlib/userdb
makeuserdb
fi

# Suggest cleaning out the following old files
list="$(find /etc/courier -type f -maxdepth 1 | grep \"^/etc/courier/auth\")"
if [ ! -z "${list}" ] ; then
ewarn "Courier authentication files are now in /etc/courier/authlib/"
elog "The following files are no longer needed and can likely be removed:"
elog " rm $(echo \"${list}\")"
fi
}

courier-authlib-0.59.2.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.59.2.ebuild,v 1.3 2008/05/21 18:57:28 dev-zero Exp $

WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"

inherit eutils flag-o-matic autotools

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"

DESCRIPTION="Courier authentication library."
SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
HOMEPAGE="http://www.courier-mta.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="berkdb crypt debug gdbm ldap mysql pam postgres vpopmail"

RESTRICT="userpriv"

RDEPEND="gdbm? ( sys-libs/gdbm )
!gdbm? ( sys-libs/db )"

DEPEND="${RDEPEND}
>=dev-libs/openssl-0.9.6
ldap? ( >=net-nds/openldap-1.2.11 )
mysql? ( virtual/mysql )
pam? ( virtual/pam )
postgres? ( >=virtual/postgresql-server-7.2 )"

pkg_setup() {
enewuser mail -1 -1 /var/spool/mail

if ! has_version 'dev-tcltk/expect' ; then
ewarn 'The dev-tcltk/expect package is not installed.'
ewarn 'Without it, you will not be able to change system login passwords.'
ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,'
ewarn 'and others) will work just fine.'
fi
}

src_unpack() {
unpack ${A}
cd "${S}"

sed -i -e "s|^chk_file .* |&\${DESTDIR}|g" authmigrate.in || die "sed failed"

if use elibc_uclibc ; then
sed -i -e 's:linux-gnu\*:linux-gnu\*\ \|\ linux-uclibc:' config.sub || die "sed failed"
fi

if ! use gdbm ; then
epatch "${FILESDIR}/${PV}-configure-db4.patch"
else
epatch "${FILESDIR}/${PV}-remove-obsolete-macro.patch"
fi

sed -i -e'/for dir in/a@@INDENT@@/etc/courier-imap \\' authmigrate.in || die "sed failed"
sed -i -e'/for dir in/a@@INDENT@@/etc/courier/authlib \\' authmigrate.in || die "sed failed"
sed -i -e"s|@@INDENT@@| |g" authmigrate.in || die "sed failed"
sed -i -e"s|\$sbindir/makeuserdb||g" authmigrate.in || die "sed failed"

eautoreconf
}

src_compile() {
filter-flags -fomit-frame-pointer

local myconf=""

myconf="${myconf} `use_with pam authpam`"
myconf="${myconf} `use_with ldap authldap`"

if use berkdb ; then
if use gdbm ; then
ewarn "Both gdbm and berkdb selected. Using gdbm."
else
myconf="${myconf} --with-db=db"
fi
fi
use gdbm && myconf="${myconf} --with-db=gdbm"

if use vpopmail ; then
myconf="${myconf} --with-authvchkpw --without-authmysql --without-authpgsql"
use mysql && ewarn "Building vpopmail support instead of authmysql"
use postgres && ewarn "Building vpopmail support instead of authpgsql"
else
myconf="${myconf} --without-authvchkpw `use_with mysql authmysql` `use_with postgres authpgsql`"
fi

use debug && myconf="${myconf} debug=true"

einfo "Configuring courier-authlib: ${myconf}"

econf \
--sysconfdir=/etc/courier \
--datadir=/usr/share/courier \
--libexecdir=/usr/$(get_libdir)/courier \
--localstatedir=/var/lib/courier \
--sharedstatedir=/var/lib/courier/com \
--with-authdaemonvar=/var/lib/courier/authdaemon \
--with-authshadow \
--without-redhat \
--with-mailuser=mail \
--with-mailgroup=mail \
--cache-file="${S}/configuring.cache" \
${myconf} || die "econf failed"
emake || die "emake failed"
}

orderfirst() {
file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}"
if [[ -e "${file}" ]] ; then
orig="$(grep \"^${option}=\" ${file} | cut -d'\"' -f 2)"
new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\""
sed -i -e "s/^${option}=.*$/${new}/" "${file}"
fi
}

finduserdb() {
for dir in \
/etc/courier/authlib /etc/courier /etc/courier-imap \
/usr/lib/courier/etc /usr/lib/courier-imap/etc \
/usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \
/usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \
/usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do
if [[ -e "${dir}/userdb" ]] ; then
einfo "Found userdb at: ${dir}/userdb"
cp -f "${dir}/userdb" "${D}/etc/courier/authlib/"
chmod go-rwx "${D}/etc/courier/authlib/userdb"
continue
fi
done
}

src_install() {
diropts -o mail -g mail
dodir /etc/courier
keepdir /var/lib/courier/authdaemon
keepdir /etc/courier/authlib
emake DESTDIR="${D}" install || die "emake install failed"
emake DESTDIR="${D}" install-migrate|| die "emake install-migrate failed"
[[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb
emake DESTDIR="${D}" install-configure || die "emake install-configure failed"
rm -f "${D}"/etc/courier/authlib/*.bak
chown mail:mail "${D}"/etc/courier/authlib/*
for y in "${D}"/etc/courier/authlib/*.dist ; do
[[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}"
done
use pam && orderfirst authdaemonrc authmodulelist authpam
use ldap && orderfirst authdaemonrc authmodulelist authldap
use postgres && orderfirst authdaemonrc authmodulelist authpgsql
use mysql && orderfirst authdaemonrc authmodulelist authmysql
dodoc AUTHORS COPYING ChangeLog* INSTALL NEWS README
dohtml README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html
if use mysql ; then
dodoc README.authmysql.myownquery
dohtml README.authmysql.html
fi
if use postgres ; then
dohtml README.authpostgres.html README.authmysql.html
fi
if use ldap ; then
dodoc README.ldap
dodir /etc/openldap/schema
cp -f authldap.schema "${D}/etc/openldap/schema/"
fi
doinitd "${FILESDIR}/${PN}" || die "doinitd failed"
}

pkg_postinst() {
if [[ -e /etc/courier/authlib/userdb ]] ; then
einfo "Running makeuserdb ..."
chmod go-rwx /etc/courier/authlib/userdb
makeuserdb
fi

# Suggest cleaning out the following old files
list="$(find /etc/courier -maxdepth 1 -type f | grep \"^/etc/courier/auth\")"
if [[ ! -z "${list}" ]] ; then
ewarn "Courier authentication files are now in /etc/courier/authlib/"
elog "The following files are no longer needed and can likely be removed:"
elog " rm $(echo \"${list}\")"
fi
}

courier-authlib-0.60.2-r1.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.60.2-r1.ebuild,v 1.9 2008/05/25 12:11:34 hanno Exp $

inherit eutils flag-o-matic autotools

KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ~ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"

DESCRIPTION="Courier authentication library."
SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
HOMEPAGE="http://www.courier-mta.org/"
LICENSE="GPL-3"
SLOT="0"
IUSE="berkdb crypt debug gdbm ldap mysql pam postgres vpopmail"

RESTRICT="userpriv"

RDEPEND="gdbm? ( sys-libs/gdbm )
!gdbm? ( sys-libs/db )"

DEPEND="${RDEPEND}
>=dev-libs/openssl-0.9.6
ldap? ( >=net-nds/openldap-1.2.11 )
mysql? ( virtual/mysql )
pam? ( virtual/pam )
postgres? ( >=virtual/postgresql-server-7.2 )"

pkg_setup() {
enewuser mail -1 -1 /var/spool/mail

if ! has_version 'dev-tcltk/expect' ; then
ewarn 'The dev-tcltk/expect package is not installed.'
ewarn 'Without it, you will not be able to change system login passwords.'
ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,'
ewarn 'and others) will work just fine.'
fi

if use vpopmail ; then
eerror
eerror "vpopmail support has been removed, it's unmaintained upstream and will be"
eerror "removed with the next release."
eerror
eerror "Please remove vpopmail USE-flag."
die "vpopmail support removed"
fi

}

src_unpack() {
unpack ${A}
cd "${S}"

if ! use gdbm ; then
epatch "${FILESDIR}/0.59.2-configure-db4.patch"
else
epatch "${FILESDIR}/0.59.2-remove-obsolete-macro.patch"
fi

sed -i -e "s|^chk_file .* |&\${DESTDIR}|g" authmigrate.in || die "sed failed"
sed -i -e'/for dir in/a@@INDENT@@/etc/courier-imap \\' authmigrate.in || die "sed failed"
sed -i -e'/for dir in/a@@INDENT@@/etc/courier/authlib \\' authmigrate.in || die "sed failed"
sed -i -e"s|@@INDENT@@| |g" authmigrate.in || die "sed failed"
sed -i -e"s|\$sbindir/makeuserdb||g" authmigrate.in || die "sed failed"

local d
for d in $(find -name configure.in) ; do
[[ ${d} == */libltdl/* ]] && continue
cd "${S}"/${d%configure.in}
eautoreconf
done
}

src_compile() {
filter-flags -fomit-frame-pointer

local myconf=""

myconf="${myconf} `use_with pam authpam`"
myconf="${myconf} `use_with ldap authldap`"

if use berkdb ; then
if use gdbm ; then
ewarn "Both gdbm and berkdb selected. Using gdbm."
else
myconf="${myconf} --with-db=db"
fi
fi
use gdbm && myconf="${myconf} --with-db=gdbm"

myconf="${myconf} --without-authvchkpw `use_with mysql authmysql` `use_with postgres authpgsql`"

use debug && myconf="${myconf} debug=true"

einfo "Configuring courier-authlib: ${myconf}"

econf \
--sysconfdir=/etc/courier \
--datadir=/usr/share/courier \
--libexecdir=/usr/$(get_libdir)/courier \
--localstatedir=/var/lib/courier \
--sharedstatedir=/var/lib/courier/com \
--with-authdaemonvar=/var/lib/courier/authdaemon \
--with-authshadow \
--without-redhat \
--with-mailuser=mail \
--with-mailgroup=mail \
--cache-file="${S}/configuring.cache" \
${myconf} || die "econf failed"
emake || die "emake failed"
}

orderfirst() {
file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}"
if [[ -e "${file}" ]] ; then
orig="$(grep \"^${option}=\" ${file} | cut -d'\"' -f 2)"
new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\""
sed -i -e "s/^${option}=.*$/${new}/" "${file}"
fi
}

finduserdb() {
for dir in \
/etc/courier/authlib /etc/courier /etc/courier-imap \
/usr/lib/courier/etc /usr/lib/courier-imap/etc \
/usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \
/usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \
/usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do
if [[ -e "${dir}/userdb" ]] ; then
einfo "Found userdb at: ${dir}/userdb"
cp -f "${dir}/userdb" "${D}/etc/courier/authlib/"
chmod go-rwx "${D}/etc/courier/authlib/userdb"
continue
fi
done
}

src_install() {
diropts -o mail -g mail
dodir /etc/courier
keepdir /var/lib/courier/authdaemon
keepdir /etc/courier/authlib
emake DESTDIR="${D}" install || die "emake install failed"
emake DESTDIR="${D}" install-migrate|| die "emake install-migrate failed"
[[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb
emake DESTDIR="${D}" install-configure || die "emake install-configure failed"
rm -f "${D}"/etc/courier/authlib/*.bak
chown mail:mail "${D}"/etc/courier/authlib/*
for y in "${D}"/etc/courier/authlib/*.dist ; do
[[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}"
done
use pam && orderfirst authdaemonrc authmodulelist authpam
use ldap && orderfirst authdaemonrc authmodulelist authldap
use postgres && orderfirst authdaemonrc authmodulelist authpgsql
use mysql && orderfirst authdaemonrc authmodulelist authmysql
dodoc AUTHORS ChangeLog* INSTALL NEWS README
dohtml README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html
if use mysql ; then
dodoc README.authmysql.myownquery
dohtml README.authmysql.html
fi
if use postgres ; then
dohtml README.authpostgres.html README.authmysql.html
fi
if use ldap ; then
dodoc README.ldap
dodir /etc/openldap/schema
cp -f authldap.schema "${D}/etc/openldap/schema/"
fi
doinitd "${FILESDIR}/${PN}" || die "doinitd failed"
}

pkg_postinst() {
if [[ -e /etc/courier/authlib/userdb ]] ; then
einfo "Running makeuserdb ..."
chmod go-rwx /etc/courier/authlib/userdb
makeuserdb
fi

# Suggest cleaning out the following old files
list="$(find /etc/courier -maxdepth 1 -type f | grep \"^/etc/courier/auth\")"
if [[ ! -z "${list}" ]] ; then
ewarn "Courier authentication files are now in /etc/courier/authlib/"
elog "The following files are no longer needed and can likely be removed:"
elog " rm $(echo \"${list}\")"
fi
}

courier-authlib-0.60.2.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.60.2.ebuild,v 1.5 2008/05/25 12:11:34 hanno Exp $

inherit eutils flag-o-matic autotools

KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh sparc ~x86 ~x86-fbsd"

DESCRIPTION="Courier authentication library."
SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
HOMEPAGE="http://www.courier-mta.org/"
LICENSE="GPL-3"
SLOT="0"
IUSE="berkdb crypt debug gdbm ldap mysql pam postgres vpopmail"

RESTRICT="userpriv"

RDEPEND="gdbm? ( sys-libs/gdbm )
!gdbm? ( sys-libs/db )"

DEPEND="${RDEPEND}
>=dev-libs/openssl-0.9.6
ldap? ( >=net-nds/openldap-1.2.11 )
mysql? ( virtual/mysql )
pam? ( virtual/pam )
postgres? ( >=virtual/postgresql-server-7.2 )"

pkg_setup() {
enewuser mail -1 -1 /var/spool/mail

if ! has_version 'dev-tcltk/expect' ; then
ewarn 'The dev-tcltk/expect package is not installed.'
ewarn 'Without it, you will not be able to change system login passwords.'
ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,'
ewarn 'and others) will work just fine.'
fi
}

src_unpack() {
unpack ${A}
cd "${S}"

if ! use gdbm ; then
epatch "${FILESDIR}/0.59.2-configure-db4.patch"
else
epatch "${FILESDIR}/0.59.2-remove-obsolete-macro.patch"
fi

sed -i -e "s|^chk_file .* |&\${DESTDIR}|g" authmigrate.in || die "sed failed"
sed -i -e'/for dir in/a@@INDENT@@/etc/courier-imap \\' authmigrate.in || die "sed failed"
sed -i -e'/for dir in/a@@INDENT@@/etc/courier/authlib \\' authmigrate.in || die "sed failed"
sed -i -e"s|@@INDENT@@| |g" authmigrate.in || die "sed failed"
sed -i -e"s|\$sbindir/makeuserdb||g" authmigrate.in || die "sed failed"

local d
for d in $(find -name configure.in) ; do
[[ ${d} == */libltdl/* ]] && continue
cd "${S}"/${d%configure.in}
eautoreconf
done
}

src_compile() {
filter-flags -fomit-frame-pointer

local myconf=""

myconf="${myconf} `use_with pam authpam`"
myconf="${myconf} `use_with ldap authldap`"

if use berkdb ; then
if use gdbm ; then
ewarn "Both gdbm and berkdb selected. Using gdbm."
else
myconf="${myconf} --with-db=db"
fi
fi
use gdbm && myconf="${myconf} --with-db=gdbm"

if use vpopmail ; then
myconf="${myconf} --with-authvchkpw --without-authmysql --without-authpgsql"
use mysql && ewarn "Building vpopmail support instead of authmysql"
use postgres && ewarn "Building vpopmail support instead of authpgsql"
else
myconf="${myconf} --without-authvchkpw `use_with mysql authmysql` `use_with postgres authpgsql`"
fi

use debug && myconf="${myconf} debug=true"

einfo "Configuring courier-authlib: ${myconf}"

econf \
--sysconfdir=/etc/courier \
--datadir=/usr/share/courier \
--libexecdir=/usr/$(get_libdir)/courier \
--localstatedir=/var/lib/courier \
--sharedstatedir=/var/lib/courier/com \
--with-authdaemonvar=/var/lib/courier/authdaemon \
--with-authshadow \
--without-redhat \
--with-mailuser=mail \
--with-mailgroup=mail \
--cache-file="${S}/configuring.cache" \
${myconf} || die "econf failed"
emake || die "emake failed"
}

orderfirst() {
file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}"
if [[ -e "${file}" ]] ; then
orig="$(grep \"^${option}=\" ${file} | cut -d'\"' -f 2)"
new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\""
sed -i -e "s/^${option}=.*$/${new}/" "${file}"
fi
}

finduserdb() {
for dir in \
/etc/courier/authlib /etc/courier /etc/courier-imap \
/usr/lib/courier/etc /usr/lib/courier-imap/etc \
/usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \
/usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \
/usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do
if [[ -e "${dir}/userdb" ]] ; then
einfo "Found userdb at: ${dir}/userdb"
cp -f "${dir}/userdb" "${D}/etc/courier/authlib/"
chmod go-rwx "${D}/etc/courier/authlib/userdb"
continue
fi
done
}

src_install() {
diropts -o mail -g mail
dodir /etc/courier
keepdir /var/lib/courier/authdaemon
keepdir /etc/courier/authlib
emake DESTDIR="${D}" install || die "emake install failed"
emake DESTDIR="${D}" install-migrate|| die "emake install-migrate failed"
[[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb
emake DESTDIR="${D}" install-configure || die "emake install-configure failed"
rm -f "${D}"/etc/courier/authlib/*.bak
chown mail:mail "${D}"/etc/courier/authlib/*
for y in "${D}"/etc/courier/authlib/*.dist ; do
[[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}"
done
use pam && orderfirst authdaemonrc authmodulelist authpam
use ldap && orderfirst authdaemonrc authmodulelist authldap
use postgres && orderfirst authdaemonrc authmodulelist authpgsql
use mysql && orderfirst authdaemonrc authmodulelist authmysql
dodoc AUTHORS ChangeLog* INSTALL NEWS README
dohtml README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html
if use mysql ; then
dodoc README.authmysql.myownquery
dohtml README.authmysql.html
fi
if use postgres ; then
dohtml README.authpostgres.html README.authmysql.html
fi
if use ldap ; then
dodoc README.ldap
dodir /etc/openldap/schema
cp -f authldap.schema "${D}/etc/openldap/schema/"
fi
doinitd "${FILESDIR}/${PN}" || die "doinitd failed"
}

pkg_postinst() {
if [[ -e /etc/courier/authlib/userdb ]] ; then
einfo "Running makeuserdb ..."
chmod go-rwx /etc/courier/authlib/userdb
makeuserdb
fi

# Suggest cleaning out the following old files
list="$(find /etc/courier -maxdepth 1 -type f | grep \"^/etc/courier/auth\")"
if [[ ! -z "${list}" ]] ; then
ewarn "Courier authentication files are now in /etc/courier/authlib/"
elog "The following files are no longer needed and can likely be removed:"
elog " rm $(echo \"${list}\")"
fi
}

courier-authlib-0.60.6.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-libs/courier-authlib/courier-authlib-0.60.6.ebuild,v 1.10 2008/06/22 11:27:34 maekke Exp $

inherit eutils flag-o-matic autotools libtool

KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"

DESCRIPTION="Courier authentication library."
SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
HOMEPAGE="http://www.courier-mta.org/"
LICENSE="GPL-3"
SLOT="0"
IUSE="berkdb crypt debug gdbm ldap mysql pam postgres vpopmail"

RESTRICT="userpriv
!berkdb? ( test )"

RDEPEND="gdbm? ( sys-libs/gdbm )
!gdbm? ( sys-libs/db )"

DEPEND="${RDEPEND}
>=dev-libs/openssl-0.9.6
ldap? ( >=net-nds/openldap-1.2.11 )
mysql? ( virtual/mysql )
pam? ( virtual/pam )
postgres? ( >=virtual/postgresql-server-7.2 )"

pkg_setup() {
enewuser mail -1 -1 /var/spool/mail

if ! has_version 'dev-tcltk/expect' ; then
ewarn 'The dev-tcltk/expect package is not installed.'
ewarn 'Without it, you will not be able to change system login passwords.'
ewarn 'However non-system authentication modules (LDAP, MySQL, PostgreSQL,'
ewarn 'and others) will work just fine.'
fi

if use vpopmail ; then
eerror
eerror "vpopmail support has been removed, it's unmaintained upstream and will be"
eerror "removed with the next release."
eerror
eerror "Please remove vpopmail USE-flag."
die "vpopmail support removed"
fi

}

src_unpack() {
unpack ${A}
cd "${S}"

if ! use gdbm ; then
epatch "${FILESDIR}/0.59.2-configure-db4.patch"
else
epatch "${FILESDIR}/0.59.2-remove-obsolete-macro.patch"
fi

sed -i -e "s|^chk_file .* |&\${DESTDIR}|g" authmigrate.in || die "sed failed"
sed -i -e'/for dir in/a@@INDENT@@/etc/courier-imap \\' authmigrate.in || die "sed failed"
sed -i -e'/for dir in/a@@INDENT@@/etc/courier/authlib \\' authmigrate.in || die "sed failed"
sed -i -e"s|@@INDENT@@| |g" authmigrate.in || die "sed failed"
sed -i -e"s|\$sbindir/makeuserdb||g" authmigrate.in || die "sed failed"

sed -i -e 's:AC_LIBLTDL_INSTALLABLE:AC_LIBLTDL_CONVENIENCE:' configure.in \
|| die "fixing libltdl call failed"

local d
for d in $(find -name configure.in) ; do
[[ ${d} == */libltdl/* ]] && continue
cd "${S}"/${d%configure.in}
AT_NO_RECURSIVE="yes" AT_NOELIBTOOLIZE="yes" eautoreconf
done

elibtoolize
}

src_compile() {
filter-flags -fomit-frame-pointer

local myconf=""

myconf="${myconf} `use_with pam authpam`"
myconf="${myconf} `use_with ldap authldap`"

if use berkdb ; then
if use gdbm ; then
ewarn "Both gdbm and berkdb selected. Using gdbm."
else
myconf="${myconf} --with-db=db"
fi
fi
use gdbm && myconf="${myconf} --with-db=gdbm"

myconf="${myconf} --without-authvchkpw `use_with mysql authmysql` `use_with postgres authpgsql`"

use debug && myconf="${myconf} debug=true"

einfo "Configuring courier-authlib: ${myconf}"

econf \
--sysconfdir=/etc/courier \
--datadir=/usr/share/courier \
--libexecdir=/usr/$(get_libdir)/courier \
--localstatedir=/var/lib/courier \
--sharedstatedir=/var/lib/courier/com \
--with-authdaemonvar=/var/lib/courier/authdaemon \
--with-authshadow \
--without-redhat \
--with-mailuser=mail \
--with-mailgroup=mail \
--cache-file="${S}/configuring.cache" \
${myconf} || die "econf failed"
emake || die "emake failed"
}

orderfirst() {
file="${D}/etc/courier/authlib/${1}" ; option="${2}" ; param="${3}"
if [[ -e "${file}" ]] ; then
orig="$(grep \"^${option}=\" ${file} | cut -d'\"' -f 2)"
new="${option}=\"${param} `echo ${orig} | sed -e\"s/${param}//g\" -e\"s/ / /g\"`\""
sed -i -e "s/^${option}=.*$/${new}/" "${file}"
fi
}

finduserdb() {
for dir in \
/etc/courier/authlib /etc/courier /etc/courier-imap \
/usr/lib/courier/etc /usr/lib/courier-imap/etc \
/usr/local/etc /usr/local/etc/courier /usr/local/courier/etc \
/usr/local/lib/courier/etc /usr/local/lib/courier-imap/etc \
/usr/local/share/sqwebmail /usr/local/etc/courier-imap ; do
if [[ -e "${dir}/userdb" ]] ; then
einfo "Found userdb at: ${dir}/userdb"
cp -f "${dir}/userdb" "${D}/etc/courier/authlib/"
chmod go-rwx "${D}/etc/courier/authlib/userdb"
continue
fi
done
}

src_install() {
diropts -o mail -g mail
dodir /etc/courier
keepdir /var/lib/courier/authdaemon
keepdir /etc/courier/authlib
emake DESTDIR="${D}" install || die "emake install failed"
emake DESTDIR="${D}" install-migrate|| die "emake install-migrate failed"
[[ ! -e "${D}/etc/courier/authlib/userdb" ]] && finduserdb
emake DESTDIR="${D}" install-configure || die "emake install-configure failed"
rm -f "${D}"/etc/courier/authlib/*.bak
chown mail:mail "${D}"/etc/courier/authlib/*
for y in "${D}"/etc/courier/authlib/*.dist ; do
[[ ! -e "${y%%.dist}" ]] && cp -f "${y}" "${y%%.dist}"
done
use pam && orderfirst authdaemonrc authmodulelist authpam
use ldap && orderfirst authdaemonrc authmodulelist authldap
use postgres && orderfirst authdaemonrc authmodulelist authpgsql
use mysql && orderfirst authdaemonrc authmodulelist authmysql
dodoc AUTHORS ChangeLog* INSTALL NEWS README
dohtml README.html README_authlib.html NEWS.html INSTALL.html README.authdebug.html
if use mysql ; then
dodoc README.authmysql.myownquery
dohtml README.authmysql.html
fi
if use postgres ; then
dohtml README.authpostgres.html README.authmysql.html
fi
if use ldap ; then
dodoc README.ldap
dodir /etc/openldap/schema
cp -f authldap.schema "${D}/etc/openldap/schema/"
fi
doinitd "${FILESDIR}/${PN}" || die "doinitd failed"
}

pkg_postinst() {
if [[ -e /etc/courier/authlib/userdb ]] ; then
einfo "Running makeuserdb ..."
chmod go-rwx /etc/courier/authlib/userdb
makeuserdb
fi

# Suggest cleaning out the following old files
list="$(find /etc/courier -maxdepth 1 -type f | grep \"^/etc/courier/auth\")"
if [[ ! -z "${list}" ]] ; then
ewarn "Courier authentication files are now in /etc/courier/authlib/"
elog "The following files are no longer needed and can likely be removed:"
elog " rm $(echo \"${list}\")"
fi
}

files

metadata.xml




net-mail