# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools eutils DESCRIPTION="PgBouncer uses libevent for low-level socket handling." HOMEPAGE="http://pgfoundry.org/projects/pgbouncer/" SRC_URI="http://pgfoundry.org/frs/download.php/1873/${P}.tgz" LICENSE="BSD" SLOT="0" KEYWORDS="~x86 ~sparc" IUSE="" DEPEND=">=dev-db/postgresql-server-8.0 >=dev-libs/libevent-1.3" RDEPEND="${DEPENDS}" src_unpack(){ unpack ${A} cd ${S} epatch "${FILESDIR}/${PN}-auto-database.patch" eautoreconf } src_compile(){ econf \ --with-libevent=/usr \ || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "install failed" cd ${S}/etc mv example.debian.init.sh pgbouncer-${PV} insinto /etc newins "${S}/etc/pgbouncer.ini" pgbouncer.conf doinitd ${S}/etc/pgbouncer-${PV} cd ${S} dodoc README NEWS AUTHORS cd ${S}/doc dodoc *.txt } pkg_postinst() { einfo "Make sure to edit conf file and init.d script to adjust for your setup" }