# $Id: Portfile 63006 2010-01-23 14:10:01Z alakazam@macports.org $

PortSystem          1.0

name                phpmyadmin
set my_name         phpMyAdmin
version             3.2.5
categories          www php databases
maintainers         alakazam
description         A tool written in PHP intended to handle the \
                    administration of MySQL over the Web.
long_description    phpMyAdmin is a tool written in PHP intended to handle \
                    the administration of MySQL over the Web. phpMyAdmin \
                    supports a wide range of operations with MySQL. The most \
                    frequently used operations are supported by the user \
                    interface (managing databases, tables, fields, relations, \
                    indexes, users, permissions, etc), while you still have \
                    the ability to directly execute any SQL statement.
homepage            http://www.phpmyadmin.net
master_sites        sourceforge
distname            ${my_name}-${version}-all-languages
use_bzip2           yes

checksums           md5     6083ea867a152f58f5c332d0c9b92ac1 \
                    sha1    e8511c9ddfcd7d157965a6c43a0afcc2be019f08 \
                    rmd160  4a7bfb6fedb0cceeb038aabacf05f8235ab19e51

platforms           darwin freebsd

depends_run         port:php5-gd \
                    port:php5-mbstring \
                    port:php5-mcrypt \
                    port:php5-mysql \
                    port:php5-zip

set docroot         ${destroot}${prefix}/www/${name}
set configfile      ${prefix}/www/${name}/config.inc.php

use_configure       no
build               {}

destroot {
    xinstall -d -m 0755 ${docroot}
    eval copy [glob ${worksrcpath}/*] ${docroot}
}

post-activate {
    if {![file exists ${configfile}]} {
        xinstall -m 644 ${prefix}/www/${name}/config.sample.inc.php ${configfile}
        
        ui_msg "A new configuration file has been created at ${configfile}."
        ui_msg "Please refer to the ${my_name} documentation when editing this file,"
        ui_msg "an online version of which can be found at ${homepage}documentation/Documentation.html#config"
        ui_msg ""
    }
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     ">Download (\\d+(?:\\.\\d+)*)<"
