# -*- 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        TypedDevs bashunit 0.42.0
github.tarball_from releases
revision            0

master_sites        ${github.master_sites}/${name}?dummy=

homepage            https://bashunit.typeddevs.com/

description         A simple testing library for bash scripts.

long_description    \
    ${name} is a dedicated testing tool crafted specifically for Bash \
    scripts. It empowers you with tests on your Bash codebase, ensuring that \
    your scripts operate reliably and as intended. With an intuitive API and \
    documentation, it streamlines the process for developers to implement and \
    manage tests. This is beneficial regardless of the project's size or \
    intricacy in Bash.

categories          devel shells
platforms           any
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer
supported_archs     noarch

checksums           rmd160  eee6db2291bf7fbaee6efad577fcd0c5dd1e542e \
                    sha256  a0e39761363d8b6876059cd5927cd4bed1b578be616c5490a8bf4102284a308c \
                    size    502636

depends_lib-append  port:bash

use_configure       no

extract.mkdir       yes
extract.only
extract.suffix

extract {
    copy ${distpath}/${distfiles} ${worksrcpath}/${name}
}

build {}

post-extract {
    reinplace -E \
        "s|^#!.*bash|#!${prefix}/bin/bash|g" ${worksrcpath}/${name}
}

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