# $Id$

PortSystem 1.0

name                lua-lunit
version             0.3
categories          devel
platforms           darwin
maintainers         nomaintainer

description         The lunit library extends lua with a simple unit testing framework
long_description    Lunit is a unit testing framework for lua, written in lua. It provides currently 26 assert functions, 8 type checking functions and a few misc functions for usage as an easy unit testing framework.

homepage            http://www.nessie.de/mroth/lunit/

master_sites        http://www.nessie.de/mroth/lunit/
checksums           md5 1510d14d3149a2d0050a220dbc797424 \
                    sha1 b8c052bc68bb2c05ece4c406b7a7c31c61a611b9
distname            lunit-${version}alpha

depends_lib         port:lua

livecheck.type      regex
livecheck.url       http://www.nessie.de/mroth/lunit/
livecheck.regex     /lunit-(.*?)alpha.tar.gz

use_configure       no
build               {}
destroot            {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -W ${worksrcpath} ANNOUNCE DOCUMENTATION README README.alpha CHANGES LICENSE TODO ${destroot}${prefix}/share/doc/${name}
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}/examples
    foreach luaexamp [glob ${worksrcpath}/examples/*] {
        xinstall -m 0644 ${luaexamp} ${destroot}${prefix}/share/doc/${name}/examples
    }

    xinstall -m 755 -d ${destroot}${prefix}/share/lua/5.1
    foreach luadat [glob ${worksrcpath}/*.lua] {
        xinstall -m 0644 ${luadat} ${destroot}${prefix}/share/lua/5.1
    }
}