# $Id: Portfile 55543 2009-08-13 06:26:03Z giorgio_v@macports.org $

PortSystem 1.0

name			pgpool-II
version			2.2.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/2329/
checksums           md5     a6bee08d6440765ffcea4e015c927717 \
                    sha1    5ae552843b35a9f84a0cf4d9e7588edd63349d76 \
                    rmd160  0ca2d3fabe064e8ca8e3377f20ea9ee450f49cc6
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.check	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
}
