# -*- 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
PortGroup           ocaml 1.0

name                stog
version             0.8.0
revision            3
categories          www ocaml
platforms           darwin
license             GPL-3
maintainers         nomaintainer
description         stog is a static web site generator, able to handle blog posts as well as regular pages
long_description    ${description}

homepage            https://www.good-eris.net/stog/
master_sites        ${homepage}

checksums           rmd160  33fe3f6972eb0cbf9f6c79816248cfcdeaefef6e \
                    sha256  11de9abe83f8e8b38fb19fd97ee31799be4b34de8297086c285f470c2b73338c

depends_lib         port:ocaml port:ocaml-findlib port:ocaml-xmlm \
                    port:ocaml-ocamlrss port:ocaml-xtmpl port:ocaml-pcre \
                    port:ocaml-config-file
depends_run         port:highlight port:texlive-bin \
                    path:bin/dvisvgm:dvisvgm

patchfiles          patch-Makefile.diff

configure {
    reinplace "s|ocamlfind|${ocamlfind_wrapper}|g" ${worksrcpath}/Makefile
}

use_parallel_build  no

destroot.args       BINDIR=${prefix}/bin

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} README Changes LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}install.html
livecheck.regex     stog-(\[0-9.\]+)${extract.suffix}

