# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0

name                tiki
version             19.1
revision            1
categories          www
maintainers         nomaintainer
license             LGPL-2.1
description         php based wiki with lots of extra features
long_description    \
    TikiWiki is an open source web application which provides a     \
    full Wiki environment as well as Articles, Sections, User/Group \
    Management (including optinal LDAP interaction), Polls and      \
    Quizzes, File and Image Galleries, Forums, Comments on many     \
    areas, Weblogs, and much more.
homepage            http://tikiwiki.org

platforms           any
supported_archs     noarch

master_sites        sourceforge:tikiwiki
distname            tiki-${version}
use_bzip2           yes

checksums           rmd160  b4af6a672af4ebc3fb1034698daf957c71ad6954 \
                    sha256  d3f28697e019f7345be40a9888a5e36a9129028b8426fd80ba9b292b36baaef0 \
                    size    36075483

foreach php {php56 php70 php71 php72 php73} {
    variant ${php} description "Use ${php}" "
        depends_run \
                port:${php} \
                port:${php}-mysql
    "
}

if {![variant_isset php56] && ![variant_isset php70] && ![variant_isset php71] && ![variant_isset php72]} {
   default_variants +php73
}

use_configure       no

build {}

destroot    {
    set dname tikiwiki-${version}
    file mkdir ${destroot}${prefix}/www
    file copy ${worksrcpath} \
        ${destroot}${prefix}/www/${name}
}

notes "
For more details in setting up a new installation or\
upgrading, please see:\
https://doc.tiki.org/tiki-index.php?page=Installation
A lot of extra work is required to get this software\
to work.  Run tiki-check.php in the local web server\
to obtain additional compatibility info.  See\
https://doc.tiki.org/Server-Check
"

livecheck.regex     tiki-(\\d+\\.\\d+)${extract.suffix}
