# -*- 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        bats-core bats-support 0.3.0 v
github.tarball_from archive
revision            0

categories          sysutils devel
platforms           any
supported_archs     noarch
# CC0 1.0, a public-domain dedication; MacPorts has no CC0 license name.
license             public-domain
maintainers         {@jrjsmrtn gmail.com:jrjsmrtn} openmaintainer

description         Supporting library for Bats test helpers
long_description    bats-support is a supporting library providing common functions to \
                    test helper libraries written for Bats, such as \
                    formatted error output.

checksums           rmd160  c0899f69987d481e964c592dcec3203f7bfe5f85 \
                    sha256  7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f \
                    size    10403

use_configure       no
build               {}

# Where bats-core's bats_load_library looks: bats_load_library bats-support.
destroot {
    set dir ${destroot}${prefix}/lib/bats/${name}
    xinstall -d ${dir} ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 ${worksrcpath}/load.bash ${dir}
    copy ${worksrcpath}/src ${dir}
    xinstall -m 0644 ${worksrcpath}/README.md ${worksrcpath}/LICENSE \
        ${destroot}${prefix}/share/doc/${name}
}

depends_test        port:bats-core
test.run            yes
test.cmd            ${prefix}/bin/bats
test.target         test
