Portfile

# $Id: Portfile 23149 2007-03-26 17:55:08Z jwa@macports.org $

PortSystem 1.0
name pgAdmin3
version 1.6.3

categories aqua
maintainers jwa@macports.org
#maintainers jyrki.wahlstedt@wahlstedt.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-${version}

checksums ${distname}${extract.suffix} sha1 3c56fbbec37a6d4ef5def0c1c0f775b177d4805d

depends_lib port:postgresql82 \
port:wxWidgets \
port:openssl \
port:libxml2 \
port:libxslt

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

configure.args --with-pgsql=${worksrcpath}/postgresql82 \
--with-wx=${prefix} \
--with-wx-version=2.8 \
--with-libxml2=${prefix} \
--with-libxslt=${prefix} \
--enable-appbundle

build.target all install

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