# -*- 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 80376 2011-07-10 23:50:51Z ryandesign@macports.org $

PortSystem          1.0

name                mybb
version             1.6.3
set download_id     139
categories          www php
platforms           darwin freebsd
maintainers         freebsd.org:miwi
supported_archs     noarch
license             GPL

description         A PHP-based bulletin board / discussion forum system

long_description    MyBB is the free and open source, intuitive, extensible, \
                    and incredibly powerful forum software you've been \
                    looking for.

depends_run         port:php5-web \
                    port:php5-imagick \
                    port:php5-gd \
                    port:php5-mysql \
                    port:php5-xsl

homepage            http://www.mybb.com/
master_sites        ${homepage}download/${download_id}
distname            ${name}_[string map {. ""} [regsub {\.(\d)$} ${version} {.0\1}]]
use_zip             yes

checksums           sha1    4862105c153e2896ea370a57d86c365985258096 \
                    rmd160  4f7bb8c8b1f2b9d4c5ea43c56ceaa2219f281d74

extract.mkdir       yes

use_configure       no

build               {}

set docpath         ${destroot}${prefix}/www/data

destroot {
    xinstall -d -m 0755 ${docpath}
    copy ${worksrcpath}/Upload ${docpath}/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}downloads
livecheck.regex     {>Download MyBB ([0-9.]+)<}
