# $Id: Portfile,v 1.7 2006/08/07 02:37:52 jwa Exp $

PortSystem 1.0
name		pgAdmin3
version		1.4.3
revision	0
categories	aqua
maintainers	jyrki.wahlstedt@hut.fi
description	"An administration program to PostgreSQL"
long_description "pgAdmin III is a powerful administration and development\
		platform for the PostgreSQL database, free for any use. The\
		application works on several platforms (GNU/Linux, FreeBSD,\
		OS X and Windows 2000/XP). This port is for OS X."
platforms	macosx
homepage	http://www.pgadmin.org/

master_sites	http://developer.pgadmin.org/ftp/release/v${version}/src/ \
		http://www.postgresql.org/ftp/pgadmin3/release/v${version}/src/

distname	pgadmin3-${portversion}

checksums	${distname}${extract.suffix} md5 28388816f867cd8723a4c0a460cf26b4

depends_lib	port:postgresql81\
		port:wxWidgets\
		port:openssl

post-extract {
	file mkdir ${worksrcpath}/pgsql8
	file link ${worksrcpath}/pgsql8/lib ${prefix}/lib/pgsql8
	file link ${worksrcpath}/pgsql8/include ${prefix}/include/pgsql8
	file link ${worksrcpath}/pgsql8/bin ${prefix}/lib/pgsql8/bin
}

configure.args	--with-pgsql=${worksrcpath}/pgsql8 --with-wx=${prefix} --enable-appbundle

build.target	all install

destroot {
	xinstall -d -m 0755 ${destroot}/Applications/DarwinPorts
	file copy ${worksrcpath}/${name}.app ${destroot}/Applications/DarwinPorts/${name}.app
}

