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

github.setup        koalaman shellcheck 0.10.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            6
categories          devel haskell

license             GPL-3+
maintainers         nomaintainer

description         ShellCheck, a static analysis tool for shell scripts
long_description    The goals of ShellCheck are: \
                    \n - To point out and clarify typical beginner's \
                    syntax issues, that causes a shell to give cryptic \
                    error messages. \
                    \n - To point out and clarify typical intermediate \
                    level semantic problems, that causes a shell to \
                    behave strangely and counter-intuitively. \
                    \n - To point out subtle caveats, corner cases and\
                    pitfalls, that may cause an advanced user's \
                    otherwise working script to fail under future \
                    circumstances.

checksums           rmd160  ad6d0032a391181418af0e3b367ee8d24b439281 \
                    sha256  d2920c8338028f9f2a4498f4a20fb1bafbb8a110f2659b9b4fd9d472eb89b154 \
                    size    460751

livecheck.url       https://hackage.haskell.org/package/ShellCheck

installs_libs       no
depends_build-append \
                    port:pandoc

variant stack \
    description {Use stack to build.} {}

if { [variant_isset "stack"] } {
    PortGroup       haskell_stack 1.0
} else {
    PortGroup       haskell_cabal 1.0
}

post-build {
    system -W ${worksrcpath} "./manpage"
}

post-destroot {
    xinstall -m 0644 ${worksrcpath}/${name}.1 \
        ${destroot}${prefix}/share/man/man1/
}