github.setup keplerproject wsapi 1.5 v
name lua-${github.project}
description Lua Web Server API
long_description WSAPI is an API that abstracts the web server from Lua web applications. \
By coding against WSAPI your application can run on any of the supported \
servers and interfaces (currently CGI, FastCGI and Xavante, on Windows \
github.tarball_from downloads
checksums md5 5c983a1db3659ed73e28c473ffd4f4d5 \
sha1 8c9c86f4cb45f94afb110390c6af808ed8238fe4 \
rmd160 a675f92700b588771f9da977912fb0171a28e0bf
patchfiles patch-Makefile.diff \
patch-src-fastcgi-lfcgi.c.diff
reinplace "s|\x0D||g" ${worksrcpath}/src/launcher/wsapi.cgi
reinplace "s|#!/usr/bin/lua|#!/usr/bin/env lua|" ${worksrcpath}/src/launcher/wsapi.cgi
reinplace "s|#!/usr/bin/lua|#!/usr/bin/env lua|" ${worksrcpath}/src/launcher/wsapi.fcgi
reinplace "s|lua51|lua|" ${worksrcpath}/samples/cgi-example.lua
reinplace "s|lua51|lua|" ${worksrcpath}/samples/fastcgi-example.lua
destroot.target-append install-fcgi
destroot.post_args-append PREFIX=${prefix}
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 ${worksrcpath}/README \
{*}[glob ${worksrcpath}/doc/us/*] \
${destroot}${prefix}/share/doc/${name}
xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
file copy ${worksrcpath}/samples \
${destroot}${prefix}/share/examples/${name}