%define luaver 5.1 %define lualibdir %{_libdir}/lua/%{luaver} %define luapkgdir %{_datadir}/lua/%{luaver} Name: lua-copas Version: 1.1.6 Release: 1%{?dist} Summary: Coroutine Oriented Portable Asynchronous Services for Lua Group: Development/Libraries License: MIT URL: http://keplerproject.github.com/copas/ Source0: http://github.com/downloads/keplerproject/copas/copas-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: lua >= %{luaver}, lua-devel >= %{luaver} Requires: lua >= %{luaver} Requires: lua-coxpcall, lua-socket %description Copas is a dispatcher based on coroutines that can be used by TCP/IP servers. It uses LuaSocket as the interface with the TCP/IP stack. A server registered with Copas should provide a handler for requests and use Copas socket functions to send the response. Copas loops through requests and invokes the corresponding handlers. For a full implementation of a Copas HTTP server you can refer to Xavante as an example. %prep %setup -q -n copas-%{version} %build %install rm -rf %{buildroot} mkdir -p %{buildroot}%{luapkgdir} make install LUA_DIR=%{buildroot}%{luapkgdir} rm -rf %{buildroot}%{luapkgdir}/copas %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README doc/us/* %{luapkgdir}/* %changelog * Wed Oct 20 2010 Tim Niemueller - 1.1.6-1 - Initial package