%define luaver 5.1 %define lualibdir %{_libdir}/lua/%{luaver} %define luapkgdir %{_datadir}/lua/%{luaver} Name: lua-wsapi Version: 1.3.4 Release: 2%{?dist} Summary: Lua Web Server API Group: Development/Libraries License: MIT URL: http://keplerproject.github.com/wsapi/ Source0: http://github.com/downloads/keplerproject/wsapi/wsapi-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver} BuildRequires: dos2unix Requires: lua >= %{luaver} %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 and UNIX-based systems). WSAPI provides a set of helper libraries that help with request processing and output buffering. You can also write applications that act as filters that provide some kind of service to other applications, such as authentication, file uploads, request isolation, or multiplexing. WSAPI's main influence is Ruby's Rack framework, but it was also influenced by Python's WSGI (PEP 333). It's not a direct clone of either of them, though, and tries to follow standard Lua idioms. %prep %setup -q -n wsapi-%{version} %build dos2unix src/launcher/wsapi.cgi %install rm -rf %{buildroot} mkdir -p %{buildroot}%{luapkgdir} mkdir -p %{buildroot}/var/www/cgi-bin/wsapi make install LUA_DIR=%{buildroot}%{luapkgdir} BIN_DIR=%{buildroot}/var/www/cgi-bin/wsapi %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README doc/us/* %{luapkgdir}/* %dir /var/www %dir /var/www/cgi-bin /var/www/cgi-bin/* %changelog * Thu Oct 23 2010 Tim Niemueller - 1.3.4-2 - Own /var/www and /var/www/cgi-bin * Wed Oct 20 2010 Tim Niemueller - 1.3.4-1 - Initial package