# $Id: Portfile 66939 2010-04-26 13:21:45Z raimue@macports.org $

PortSystem 1.0

name            bam
version         0.3.2
categories      devel
platforms       darwin
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     8dd54d166818fc4ed56e6db94d4413d8 \
                sha1    f0ee1917c58e4a58f27f8233b5d1e6fbc4aa6c9f \
                rmd160  8050428b71f08c7fdcd773099b6f40472de324f8

depends_build   port:asciidoc

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

use_configure   no

build.cmd       ./make_unix.sh
build.target

# manually generate man page using asciidoc
post-build {
    system "cd ${worksrcpath} && a2x -f manpage docs/bam.1.txt"
}

test.run        yes
test.cmd        ./test.py
test.target

# there is no install target
destroot {
    copy ${worksrcpath}/docs/bam.1 ${destroot}${prefix}/share/man/man1/
    copy ${worksrcpath}/bam ${destroot}${prefix}/bin/
}

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