# $Id: Portfile 67336 2010-05-06 08:52:50Z giorgio_v@macports.org $

PortSystem 1.0

name			pgpool-II
version			2.3.3
categories		databases
platforms		darwin
maintainers		mac.com:giorgio_v
description		PostgreSQL connection pool server
long_description	pgpool is a connection server program for PostgreSQL. \
			It runs between PostgreSQL's client(frontend) and \
			server(backend). Any PostgreSQL clients can connect to \
			pgpool as if it's a real PostgreSQL server. It \
			supports connection pooling, failover and replication.

homepage		http://pgpool.projects.postgresql.org/
master_sites		http://pgfoundry.org/frs/download.php/2664/
checksums           md5 fae5a3b50eab995d15a18f80fee2e92b \
                    sha1 425080e9fc3e504681f5a08a10e4e6440078c6f2 \
                    rmd160 202fd89ee3770110fdb0b53ee32673b0cbbc71ff
configure.env		PATH=$env(PATH):${prefix}/lib/postgresql84/bin
configure.args		--bindir=${prefix}/sbin/${name} \
			--mandir=${prefix}/share/man/${name} \
			--sysconfdir=${prefix}/etc/${name}
depends_build		port:postgresql84

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS \
		README README.euc_jp TODO ${destroot}${prefix}/share/doc/${name}
}

livecheck.type	regex
livecheck.url	http://pgfoundry.org/frs/?group_id=1000055
livecheck.regex	pgpool-II-(\[0-9\\.\]+)\\.tar\\.gz

variant postgresql82 description {uses postgresql82 installation} {
	depends_build		port:postgresql82
	configure.env		PATH=$env(PATH):${prefix}/lib/postgresql82/bin
}


variant postgresql83 description {uses postgresql83 installation} {
	depends_build		port:postgresql83
	configure.env		PATH=$env(PATH):${prefix}/lib/postgresql83/bin
}
