# $Id$

PortSystem 1.0

name            bam
version         0.4.0
categories      devel
platforms       darwin
license         zlib
maintainers     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.

homepage        http://matricks.github.com/bam/

master_sites    http://github.com/downloads/matricks/bam/
checksums       md5     2f8e8336b8884110e8a355b12c9fa58a \
                sha1    c0f32ff9272d5552e02a9d68fbdd72106437ee69 \
                rmd160  cbb8d56c891e650f0a14c9a55efc4e9cc96e0e28

depends_build   port:python26

post-patch {
    reinplace "s:^gcc:${configure.cc}:" ${worksrcpath}/make_unix.sh
}

use_configure   no

build.cmd       ./make_unix.sh
build.target

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

test.run        yes
test.cmd        ${prefix}/bin/python2.6 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/
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex ${name}-(\\d+(?:\\.\\d+)+)\\.tar