# $Id: Portfile 78228 2011-04-29 02:42:44Z ryandesign@macports.org $
PortSystem 1.0

name                lua-luafilesystem
version             1.5.0
revision            1
categories          devel
platforms           darwin
maintainers         and.damore openmaintainer
description         File System Library for the Lua Programming Language
long_description    LuaFileSystem is a Lua library developed to complement the set of functions \
                    related to file systems offered by the standard Lua distribution.

homepage            http://keplerproject.github.com/luafilesystem/
master_sites        http://github.com/downloads/keplerproject/luafilesystem
checksums           md5     3cf4882bbce956e7a0b010f148f194a3 \
                    sha1    1ee2ca3b5dbc3cf7c21c7168a0873b2983b7e241 \
                    rmd160  db1e597046d47ab12df202e7c65fb3b815c9f922

distname            luafilesystem-${version}
depends_lib         port:lua
patchfiles          patch-config.diff \
                    patch-Makefile.diff

post-patch {
   reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/config
}
use_configure       no
build.target        

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
    
    xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
    eval xinstall -m 644 [glob ${worksrcpath}/doc/us/*] ${destroot}${prefix}/share/doc/${name}
    eval xinstall -m 644 [glob ${worksrcpath}/tests/*] ${destroot}${prefix}/share/examples/${name}
}

