--- lua-wsapi-1.1.0.orig/debian/watch +++ lua-wsapi-1.1.0/debian/watch @@ -0,0 +1,5 @@ +# test this watch file using: +# uscan --watchfile debian/watch --upstream-version 0.0.1 --package lua-wsapi +# +version=3 +http://luaforge.net/frs/?group_id=312 /frs/download.php/\d+/wsapi-([\d\.]*).tar.gz --- lua-wsapi-1.1.0.orig/debian/liblua5.1-wsapi-fcgi-1.install.in +++ lua-wsapi-1.1.0/debian/liblua5.1-wsapi-fcgi-1.install.in @@ -0,0 +1 @@ +/usr/bin/wsapi.fcgi --- lua-wsapi-1.1.0.orig/debian/copyright +++ lua-wsapi-1.1.0/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Enrico Tassi +Sat Dec 22 17:32:34 CET 2007 + +It was downloaded from http://luaforge.net/projects/wsapi/. + + +Copyright © 2004-2007 The Kepler Project. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + --- lua-wsapi-1.1.0.orig/debian/01-fcgi.Makefile.Debian.conf +++ lua-wsapi-1.1.0/debian/01-fcgi.Makefile.Debian.conf @@ -0,0 +1,44 @@ +### $Id: Makefile.Debian.conf.sample 399 2007-07-21 09:59:16Z gareuselesinge $ + +### mandatory fields +PKG_NAME=wsapi.fcgi + +### things relative to the C library part +CLIB_CFLAGS= +CLIB_LDFLAGS=-lfcgi +CLIB_OBJS=src/fastcgi/lfcgi.lo +VERSION_INFO=1:0:0 +LUA_MODNAME_CPART=lfcgi + +### things relative to the lua library part +LUA_HEADER= +LUA_SOURCES= +LUA_MODNAME= +LUA_TEST= + +### this part is relative to pkg-config +PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1) +PKG_LIBS_PRIVATE= +PKG_URL=http://luaforge.net/projects/wsapi/ +PKG_REQUIRES= +PKG_CONFLICTS= + +### this part is relative to debian libs naming policy +DEB_EXTRA_DASH=- + +### In addition, to gather flexibility, you can set these hooks +### (called in this order) +pre-all-hook:: +post-all-hook:: +pre-test-hook:: +pre-lua-dynamic-test-hook:: +pre-dynamic-link-hook:: +pre-app-dynamic-test-hook:: +pre-static-link-hook:: +pre-app-static-test-hook:: +pre-install-hook:: +post-install-hook:: + mkdir -p debian/tmp/usr/bin + cp src/launcher/wsapi.fcgi debian/tmp/usr/bin/ +pre-clean-hook:: +post-clean-hook:: --- lua-wsapi-1.1.0.orig/debian/changelog +++ lua-wsapi-1.1.0/debian/changelog @@ -0,0 +1,66 @@ +lua-wsapi (1.1.0-7) unstable; urgency=low + + * Updated standards-version to 3.8.3: + - added README.source + * Added dependency over liblua5.1-filesystem0 (Closes: #566215) + + -- Enrico Tassi Sun, 31 Jan 2010 16:19:21 +0100 + +lua-wsapi (1.1.0-6) unstable; urgency=low + + * fixed end-of-line in launchers.dpatch (Closes: #539863) + + -- Enrico Tassi Wed, 05 Aug 2009 18:44:39 +0200 + +lua-wsapi (1.1.0-5) unstable; urgency=low + + * bumped standards-version to 3.8.2, no changes needed + * build depend on lua5.1-policy-dev >= 22 + + -- Enrico Tassi Tue, 21 Jul 2009 18:06:53 +0200 + +lua-wsapi (1.1.0-4) unstable; urgency=low + + * Added dependency over liblua5.1-filesystem0 (Closes: #531971) + + -- Enrico Tassi Fri, 05 Jun 2009 14:41:47 +0200 + +lua-wsapi (1.1.0-3) unstable; urgency=low + + * wsapi.cgi and wsapi.fcgi installed in /usr/bin, ready to be used in + Apache configuration file + * manpages for wsapi.cgi and wsapi.fcgi written + + -- Enrico Tassi Wed, 25 Mar 2009 10:57:51 +0100 + +lua-wsapi (1.1.0-2) unstable; urgency=low + + * added conflicts and replaces to control + + -- Enrico Tassi Tue, 24 Mar 2009 10:09:04 +0100 + +lua-wsapi (1.1.0-1) unstable; urgency=low + + * new upstream release + * bumped standards-version to 3.8.1, no changes needed + * soname bump, since some functions are new and some changed module + + -- Enrico Tassi Tue, 24 Mar 2009 10:07:19 +0100 + +lua-wsapi (1.0.0-1) unstable; urgency=low + + * new upstream release + + -- Enrico Tassi Wed, 21 May 2008 11:01:14 +0200 + +lua-wsapi (1.0~rc1-1) unstable; urgency=low + + * Release candidate 1 + + -- Enrico Tassi Wed, 16 Apr 2008 23:41:56 +0200 + +lua-wsapi (1.0~cvs20080412-1) unstable; urgency=low + + * Initial release. (Closes: #462223) + + -- Enrico Tassi Sat, 12 Apr 2008 17:17:37 +0200 --- lua-wsapi-1.1.0.orig/debian/README.source +++ lua-wsapi-1.1.0/debian/README.source @@ -0,0 +1 @@ +Please refer to /usr/share/doc/dpatch/README.source.gz --- lua-wsapi-1.1.0.orig/debian/wsapi.cgi.1 +++ lua-wsapi-1.1.0/debian/wsapi.cgi.1 @@ -0,0 +1,43 @@ +.\"Text automatically generated by txt2man +.TH wsapi.cgi 1 "28 April 2009" "" "wsapi documentation" +.SH NAME +\fBwsapi.cgi \fP- cgi wrapper for wsapi based dynamic pages +\fB +.SH SYNOPSIS +.nf +.fam C +#!/usr/bin/env wsapi.cgi + +.fam T +.fi +.fam T +.fi +.SH DESCRIPTION +A sample dynamic page follows: +.PP +.nf +.fam C + #!/usr/bin/env wsapi.cgi + + module(\.\.\., package.seeall) + + function run(wsapi_env) + local headers = { ["Content-type"] = "text/html" } + + local function hello_text() + coroutine.yield("") + coroutine.yield("

Hello Wsapi!

") + coroutine.yield("

PATH_INFO: " .. wsapi_env.PATH_INFO .. "

") + coroutine.yield("

SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "

") + coroutine.yield("") + end + + return 200, headers, coroutine.wrap(hello_text) + end + +.fam T +.fi +.SH SEE ALSO +\fBwsapi.fcgi\fP(1) +.SH AUTHOR +Enrico Tassi --- lua-wsapi-1.1.0.orig/debian/wsapi.cgi.1.txt +++ lua-wsapi-1.1.0/debian/wsapi.cgi.1.txt @@ -0,0 +1,32 @@ +NAME + wsapi.cgi - cgi wrapper for wsapi based dynamic pages + +SYNOPSIS + #!/usr/bin/env wsapi.cgi + +DESCRIPTION + A sample dynamic page follows: + + #!/usr/bin/env wsapi.cgi + + module(..., package.seeall) + + function run(wsapi_env) + local headers = { ["Content-type"] = "text/html" } + + local function hello_text() + coroutine.yield("") + coroutine.yield("

Hello Wsapi!

") + coroutine.yield("

PATH_INFO: " .. wsapi_env.PATH_INFO .. "

") + coroutine.yield("

SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "

") + coroutine.yield("") + end + + return 200, headers, coroutine.wrap(hello_text) + end + +SEE ALSO + wsapi.fcgi(1) + +AUTHOR + Enrico Tassi --- lua-wsapi-1.1.0.orig/debian/wsapi.fcgi.1 +++ lua-wsapi-1.1.0/debian/wsapi.fcgi.1 @@ -0,0 +1,54 @@ +.\"Text automatically generated by txt2man +.TH wsapi.fcgi 1 "28 April 2009" "" "wsapi documentation" +.SH NAME +\fBwsapi.fcgi \fP- fast cgi wrapper for wsapi based dynamic pages +\fB +.SH SYNOPSIS +.nf +.fam C +\fBFCGIWrapper\fP wsapi.fcgi .lua + +.fam T +.fi +.fam T +.fi +.SH DESCRIPTION +If you are using Apache, you may want to add the following lines to +define an hanler for .lua files: +.PP +.nf +.fam C + AddHandler fcgid-script .lua + FCGIWrapper /usr/bin/wsapi.fcgi .lua + +.fam T +.fi +A sample dynamic page follows: +.PP +.nf +.fam C + #!/usr/bin/env wsapi.fcgi + + module(\.\.\., package.seeall) + + function run(wsapi_env) + local headers = { ["Content-type"] = "text/html" } + + local function hello_text() + coroutine.yield("") + coroutine.yield("

Hello Wsapi!

") + coroutine.yield("

PATH_INFO: " .. wsapi_env.PATH_INFO .. "

") + coroutine.yield("

SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "

") + coroutine.yield("") + end + + return 200, headers, coroutine.wrap(hello_text) + end + + +.fam T +.fi +.SH SEE ALSO +\fBwsapi.cgi\fP(1) +.SH AUTHOR +Enrico Tassi --- lua-wsapi-1.1.0.orig/debian/liblua5.1-wsapi-doc.docs +++ lua-wsapi-1.1.0/debian/liblua5.1-wsapi-doc.docs @@ -0,0 +1,2 @@ +doc/ +samples/ --- lua-wsapi-1.1.0.orig/debian/liblua5.1-wsapi1.manpages +++ lua-wsapi-1.1.0/debian/liblua5.1-wsapi1.manpages @@ -0,0 +1 @@ +debian/wsapi.cgi.1 --- lua-wsapi-1.1.0.orig/debian/liblua5.1-wsapi1.install.in +++ lua-wsapi-1.1.0/debian/liblua5.1-wsapi1.install.in @@ -0,0 +1 @@ +/usr/bin/wsapi.cgi --- lua-wsapi-1.1.0.orig/debian/liblua5.1-wsapi-fcgi-1.manpages +++ lua-wsapi-1.1.0/debian/liblua5.1-wsapi-fcgi-1.manpages @@ -0,0 +1 @@ +debian/wsapi.fcgi.1 --- lua-wsapi-1.1.0.orig/debian/control +++ lua-wsapi-1.1.0/debian/control @@ -0,0 +1,57 @@ +Source: lua-wsapi +Section: interpreters +Priority: optional +Maintainer: Enrico Tassi +Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 5), libfcgi-dev, lua5.1-policy-dev (>= 22), dpatch +Standards-Version: 3.8.3 +Vcs-Svn: svn://svn.debian.org/pkg-lua/packages/lua-wsapi +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-lua/packages/lua-wsapi +Homepage: http://wsapi.luaforge.net + +Package: liblua5.1-wsapi-fcgi-1 +Architecture: any +Depends: ${shlibs:Depends}, liblua5.1-wsapi1, liblua5.1-filesystem0, ${misc:Depends}, lua5.1 +Conflicts: liblua5.1-wsapi-fcgi-0 +Replaces: liblua5.1-wsapi-fcgi-0 +Description: Web server API fastcgi backend + WSAPI is an API that abstracts the web server for Lua web applications, + allowing the same application to be used in different web servers. + . + This package contains the backend for the fastcgi protocol. + +Package: liblua5.1-wsapi-fcgi-dev +Architecture: any +Section: libdevel +Depends: liblua5.1-wsapi-fcgi-1 (= ${binary:Version}), ${misc:Depends} +Description: wsapi fastcgi development files for the Lua language version 5.1 + This package contains the development files of the wsapi library (extra + backend), useful to create a statically linked binary (like a C application or + a standalone Lua interpreter). + +Package: liblua5.1-wsapi1 +Architecture: all +Depends: ${shlibs:Depends}, liblua5.1-rings0, liblua5.1-filesystem0, ${misc:Depends}, lua5.1 +Suggests: liblua5.1-cgi0 +Conflicts: liblua5.1-wsapi0 +Replaces: liblua5.1-wsapi0 +Description: Web server API abstraction layer for the Lua language version 5.1 + WSAPI is an API that abstracts the web server for Lua web applications, + allowing the same application to be used in different web servers. + . + This package contains the WSAPI utility libraries (for common tasks like url + encoding/decoding) as well as the following backends (server implementations): + . + - CGI (the regular environment-variables based protocol) + - xavante (for the Xavante web server) + . + The fastcgi backends is available in the separate package liblua5.1-wsapi-fcgi. + . + This package also includes a backward compatible implementation of SAPI, used + by old versions of cgilua. + +Package: liblua5.1-wsapi-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Description: wsapi documentation files for the Lua language version 5.1 + This package contains the documentation of the wsapi library. --- lua-wsapi-1.1.0.orig/debian/wsapi.fcgi.1.txt +++ lua-wsapi-1.1.0/debian/wsapi.fcgi.1.txt @@ -0,0 +1,39 @@ +NAME + wsapi.fcgi - fast cgi wrapper for wsapi based dynamic pages + +SYNOPSIS + FCGIWrapper wsapi.fcgi .lua + +DESCRIPTION + If you are using Apache, you may want to add the following lines to + define an hanler for .lua files: + + AddHandler fcgid-script .lua + FCGIWrapper /usr/bin/wsapi.fcgi .lua + + A sample dynamic page follows: + + #!/usr/bin/env wsapi.fcgi + + module(..., package.seeall) + + function run(wsapi_env) + local headers = { ["Content-type"] = "text/html" } + + local function hello_text() + coroutine.yield("") + coroutine.yield("

Hello Wsapi!

") + coroutine.yield("

PATH_INFO: " .. wsapi_env.PATH_INFO .. "

") + coroutine.yield("

SCRIPT_NAME: " .. wsapi_env.SCRIPT_NAME .. "

") + coroutine.yield("") + end + + return 200, headers, coroutine.wrap(hello_text) + end + + +SEE ALSO + wsapi.cgi(1) + +AUTHOR + Enrico Tassi --- lua-wsapi-1.1.0.orig/debian/rules +++ lua-wsapi-1.1.0/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/class/lua.mk +include /usr/share/cdbs/1/rules/dpatch.mk --- lua-wsapi-1.1.0.orig/debian/99-common.Makefile.Debian.conf +++ lua-wsapi-1.1.0/debian/99-common.Makefile.Debian.conf @@ -0,0 +1,48 @@ +### $Id: Makefile.Debian.conf.sample 399 2007-07-21 09:59:16Z gareuselesinge $ + +### mandatory fields +PKG_NAME=wsapi + +### things relative to the C library part +CLIB_CFLAGS= +CLIB_LDFLAGS= +CLIB_OBJS= +VERSION_INFO=1:0:0 +LUA_MODNAME_CPART= + +### things relative to the lua library part +LUA_HEADER= +LUA_SOURCES=src/wsapi/ +LUA_MODNAME= +LUA_TEST= + +### this part is relative to pkg-config +PKG_VERSION=$(shell dpkg-parsechangelog|grep ^Ver|cut -d ' ' -f 2|cut -d '-' -f 1) +PKG_LIBS_PRIVATE= +PKG_URL=http://luaforge.net/projects/wsapi/ +PKG_REQUIRES= +PKG_CONFLICTS= + +### this part is relative to debian libs naming policy +DEB_EXTRA_DASH= + +### In addition, to gather flexibility, you can set these hooks +### (called in this order) +pre-all-hook:: + chmod a-x src/wsapi/* + rm -f doc/*/*.md + rm -f src/launcher/*.c + rm -f src/launcher/*.lua +post-all-hook:: +pre-test-hook:: +pre-lua-dynamic-test-hook:: +pre-dynamic-link-hook:: +pre-app-dynamic-test-hook:: +pre-static-link-hook:: +pre-app-static-test-hook:: +pre-install-hook:: +post-install-hook:: + mkdir -p debian/tmp/usr/bin + cp src/launcher/wsapi.cgi debian/tmp/usr/bin/ +pre-clean-hook:: +post-clean-hook:: --- lua-wsapi-1.1.0.orig/debian/patches/launchers.dpatch +++ lua-wsapi-1.1.0/debian/patches/launchers.dpatch @@ -0,0 +1,72 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## launchers.dpatch by Enrico Tassi +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: put proper shebang in lauchers + +@DPATCH@ +diff -urNad trunk~/src/launcher/wsapi.cgi trunk/src/launcher/wsapi.cgi +--- trunk~/src/launcher/wsapi.cgi 2008-04-14 21:15:51.000000000 +0200 ++++ trunk/src/launcher/wsapi.cgi 2009-08-05 18:43:46.000000000 +0200 +@@ -1,26 +1,26 @@ +-#!/usr/bin/lua +- +--- Generic WSAPI CGI launcher, extracts application to launch +--- either from the command line (use #!wsapi in the script) +--- or from SCRIPT_FILENAME/PATH_TRANSLATED +- +-pcall(require, "luarocks.require") +- +-local common = require "wsapi.common" +-local cgi = require "wsapi.cgi" +- +-local arg_filename = (...) +- +-local function wsapi_loader(wsapi_env) +- local path, file, modname, ext = +- common.find_module(wsapi_env, arg_filename, "wsapi.cgi") +- if not path then +- error({ 404, "Resource " .. wsapi_env.SCRIPT_NAME .. " not found" }) +- end +- wsapi.app_path = path +- local app = common.load_wsapi(path, file, modname, ext) +- wsapi_env.APP_PATH = path +- return app(wsapi_env) +-end +- +-cgi.run(wsapi_loader) ++#!/usr/bin/env lua5.1 ++ ++-- Generic WSAPI CGI launcher, extracts application to launch ++-- either from the command line (use #!wsapi in the script) ++-- or from SCRIPT_FILENAME/PATH_TRANSLATED ++ ++pcall(require, "luarocks.require") ++ ++local common = require "wsapi.common" ++local cgi = require "wsapi.cgi" ++ ++local arg_filename = (...) ++ ++local function wsapi_loader(wsapi_env) ++ local path, file, modname, ext = ++ common.find_module(wsapi_env, arg_filename, "wsapi.cgi") ++ if not path then ++ error({ 404, "Resource " .. wsapi_env.SCRIPT_NAME .. " not found" }) ++ end ++ wsapi.app_path = path ++ local app = common.load_wsapi(path, file, modname, ext) ++ wsapi_env.APP_PATH = path ++ return app(wsapi_env) ++end ++ ++cgi.run(wsapi_loader) +diff -urNad trunk~/src/launcher/wsapi.fcgi trunk/src/launcher/wsapi.fcgi +--- trunk~/src/launcher/wsapi.fcgi 2009-02-04 20:07:14.000000000 +0100 ++++ trunk/src/launcher/wsapi.fcgi 2009-08-05 18:43:55.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/lua ++#!/usr/bin/env lua5.1 + + -- Generic WSAPI FastCGI launcher, extracts application to launch + -- from SCRIPT_FILENAME/PATH_TRANSLATED, each application (defined --- lua-wsapi-1.1.0.orig/debian/patches/00dpatch.conf +++ lua-wsapi-1.1.0/debian/patches/00dpatch.conf @@ -0,0 +1,2 @@ +conf_debianonly=1 +conf_origtargzpath=../tarballs/ --- lua-wsapi-1.1.0.orig/debian/patches/00list +++ lua-wsapi-1.1.0/debian/patches/00list @@ -0,0 +1,2 @@ +sheebang.dpatch +launchers.dpatch --- lua-wsapi-1.1.0.orig/debian/patches/sheebang.dpatch +++ lua-wsapi-1.1.0/debian/patches/sheebang.dpatch @@ -0,0 +1,15 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## sheebang.dpatch by Enrico Tassi +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: remove sheebang in a non executable file + +@DPATCH@ +diff -urNad trunk~/src/wsapi/sapi.lua trunk/src/wsapi/sapi.lua +--- trunk~/src/wsapi/sapi.lua 2008-01-19 21:03:45.000000000 +0100 ++++ trunk/src/wsapi/sapi.lua 2008-01-20 14:54:14.000000000 +0100 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env wsapi.cgi + + require "wsapi.response" +