# -*- 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           ruby 1.0

ruby.branches       3.3 3.2 3.1 3.0 2.7 2.6 2.5 2.4
ruby.setup          mustache 1.1.1 gem
revision            0
maintainers         {judaew @judaew} openmaintainer
description         Logic-less templates, implemented in Ruby.
long_description    \
    Inspired by ctemplate and et, Mustache is a framework-agnostic way to \
    render logic-free views.
categories-append   www
license             MIT
platforms           any
supported_archs     noarch
homepage            https://github.com/mustache/mustache

checksums           rmd160  bad296ce20b6eebd2d75e921ad2f49ae03e70812 \
                    sha256  90891fdd50b53919ca334c8c1031eada1215e78d226d5795e523d6123a2717d0 \
                    size    42496

if {${name} ne ${subport}} {
    post-destroot {
        set gemdir ${destroot}${ruby.gemdir}/gems/${worksrcdir}
        set mandir ${destroot}${prefix}/share/man/
        set docdir ${destroot}${prefix}/share/doc/${ruby.module}${ruby.link_binaries_suffix}
        xinstall -d ${docdir}

        xinstall ${gemdir}/man/${ruby.module}.1 ${mandir}/man1/${ruby.module}${ruby.link_binaries_suffix}.1
        xinstall ${gemdir}/man/${ruby.module}.5 ${mandir}/man5/${ruby.module}${ruby.link_binaries_suffix}.1
        xinstall -W ${gemdir} README.md LICENSE ${docdir}
        xinstall {*}[glob ${gemdir}/man/*.html] ${docdir}
    }
}
