# -*- 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
PortGroup       python 1.0

github.setup    matricks bam 0.5.1 v

name            bam
categories      devel
platforms       darwin
license         zlib
maintainers     {raimue @raimue} openmaintainer

description     A fast and flexible build system
long_description \
    Bam is a fast and flexible build system. It uses Lua to describe the build \
    process.

checksums       rmd160  fba2bed2c2904f5bcb477c3a42f41a8c091221c6 \
                sha256  a81c5217e2ccc86d9957819c08cbe730777cae9185776574cc0c5e708df9464b \
                size    258770

python.default_version  27

patchfiles      patch-scripts_gendocs.py.diff

use_configure   no
use_parallel_build  no

build.cmd       ./make_unix.sh
build.target

post-build {
    system "cd ${worksrcpath} && ${python.bin} scripts/gendocs.py"
}

test.run        yes
test.cmd        ${python.bin} scripts/test.py
test.target

# there is no install target
destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/bam/
    xinstall -m 644 ${worksrcpath}/docs/bam.html ${destroot}${prefix}/share/doc/bam/
    xinstall -m 755 ${worksrcpath}/bam ${destroot}${prefix}/bin/
}
