# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 58605 2009-10-01 23:42:08Z snc@macports.org $

PortSystem          1.0

name                phpbb
version             3.0.5
categories          www php
maintainers         snc openmaintainer
description         A PHP-based bulletin board / discussion forum system
long_description    phpBB is a high powered, fully scalable, and highly \
                    customisable open-source bulletin board package.  phpBB \
                    has a user-friendly interface, simple and straightforward \
                    administration panel, and helpful FAQ.  Based on the \
                    powerful PHP server language and your choice of MySQL, \
                    MS-SQL, PostgreSQL or Access/ODBC database servers, phpBB \
                    is the ideal free community solution for all web sites.
homepage            http://www.phpbb.com

platforms           darwin freebsd
depends_run         port:php5-web port:php5-ftp port:php5-imagick port:php5-gd

master_sites        sourceforge
distname            phpBB-${version}
use_bzip2           yes

checksums           md5     734b8f9c2390d5cc8c971cfcb29da185 \
                    sha1    0097f18eb6eacea49219ddd58b290d6b4c218629 \
                    rmd160  99a54ad912353ff40fd115f02cfd921039ce66b9

variant mysql {
    depends_run-append  port:php5-mysql
}

variant postgresql {
    depends_run-append    port:php5-postgresql
}

set docpath ${destroot}${prefix}/www/data
set worksrcpath ${workpath}/phpBB3
             
use_configure   no

build            {}

destroot {
    xinstall -d -m 0755 ${docpath}/phpbb
    eval file copy [glob ${worksrcpath}/*] ${docpath}/phpbb
    file rename ${docpath}/phpbb/config.php \
            ${docpath}/phpbb/config.php-dist
}

livecheck.regex     phpBB (\\d+\\.\\d+(\\.\\d+)?) released
