# Copyright 1999-2006 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.9 2006/04/24 17:24:35 kumba Exp $

inherit eutils gnuconfig flag-o-matic

DESCRIPTION="vmailmgr drop-in replacement"
MY_P=vtoaster-${PV}
SRC_URI="http://www.saout.de/misc/${MY_P}.tar.bz2"
HOMEPAGE="http://www.saout.de/misc/"
S="${WORKDIR}/${MY_P}"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~amd64"
IUSE=""

DEPEND="virtual/libc
		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? ( >=dev-db/mysql-3.23.36 )
		ldap? ( >=net-nds/openldap-1.2.11 )
		postgres? ( >=dev-db/postgresql-7.2 )
		>=net-libs/courier-authlib-0.58
		>=dev-lang/python-2.4
		>=dev-python/pygobject-2.12"

RDEPEND="virtual/libc
		>=dev-libs/glib-2.8"

src_install() {
	cd ${S}/lib/authlib
	emake install DESTDIR="${D}" || die "install"

	cd ${S}/src
	insinto /usr/bin
	dobin getventry

	cd ${S}/python
	emake install DESTDIR="${D}" || die "install"

	exeinto /etc/init.d
	newexe ${FILESDIR}/init-vtoasterd vtoasterd

	cd ${S}
	dodoc AUTHORS COPYING ChangeLog* INSTALL NEWS README
	insinto /etc
	newins ${FILESDIR}/vtoaster.conf vtoaster.conf
}
