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

go.setup            github.com/cpuguy83/go-md2man 2.0.5 v
# Delete this on next update to use golang PortGroup's default ('archive')
github.tarball_from tarball
revision            0

categories          textproc
maintainers         {judaew @judaew} openmaintainer
license             MIT

description         Converts markdown into roff (man pages).
long_description    {*}${description}

checksums           ${distname}${extract.suffix} \
                        rmd160  9af69f242ce0d508cc132b933960356f7c763b31 \
                        sha256  ebb019c79ca6b8f331d256fe63eb7bb549b1b15fdfb7eb4f168969966df05734 \
                        size    10941

go.vendors          github.com/russross/blackfriday \
                        lock    v2.1.0 \
                        rmd160  c42a9332a2c2f3074c6f7e8d37a58d6148d2af08 \
                        sha256  c4df56f2012a7d16471418245e78b5790569e27bbe8d72a860d7117a801a7fae \
                        size    92950

destroot {
    xinstall -m 0755 ${worksrcpath}/${name} ${destroot}${prefix}/bin/

    system -W ${worksrcpath} "./${name} -in=${name}.1.md -out=${name}.1"
    xinstall -m 0644 ${worksrcpath}/${name}.1 \
        ${destroot}${prefix}/share/man/man1
}
