debian/0000755000000000000000000000000012246135035007167 5ustar debian/localhost.lua0000644000000000000000000000251412246135035011664 0ustar -- This is a sample virtual host -- Define here where Xavante HTTP documents scripts are located -- local webDir = '/usr/share/doc/xavante/' local simplerules = { { -- URI remapping example -- here / -> /README -- match = "^[^%./]*/$", with = xavante.redirecthandler, params = {"README"} }, { -- filehandler example -- /README -> webDir/README -- match = ".", with = xavante.filehandler, params = {baseDir = webDir} }, -- { -- This is the WSAPI launcher, it automatically wraps each WSAPI -- -- app in a (reused) ring -- -- remember to require 'wsapi.xavante' -- -- -- match = { "%.ws$", "%.ws/"}, -- with = wsapi.xavante.makeGenericHandler(webDir) -- }, -- { -- This is a cgilua handler example -- -- remember to require 'xavante.cgiluahandler' -- -- -- match = {"%.lp$", "%.lp/.*$", "%.lua$", "%.lua/.*$" }, -- with = xavante.cgiluahandler.makeHandler (webDir) -- }, -- { -- This is an orbit example -- -- remember to require 'orbit.ophandler' -- -- -- match = {"%.op$", "%.op/.*$" }, -- with = orbit.ophandler.makeHandler (webDir) -- }, } -- add your vhost rules to the virtualhosts map -- config.virtualhosts["localhost:8080"] = { rules = simplerules, } debian/xavante-doc.docs0000644000000000000000000000002612246135035012250 0ustar doc/ examples/ README debian/xavante.install0000644000000000000000000000011612246135035012223 0ustar etc/xavante/* etc/default/* usr/share/lua/5.1/* README usr/share/doc/xavante/ debian/watch0000644000000000000000000000030512246135035010216 0ustar # test this watch file using: # uscan --watchfile debian/watch --upstream-version 0.0.1 --package xavante # version=3 https://github.com/keplerproject/xavante/downloads .*/xavante-([\d\.]+).tar.gz debian/rules0000755000000000000000000000102512246135035010245 0ustar #!/usr/bin/make -f %: dh $@ override_dh_auto_install: dh_auto_install # config file mkdir -p debian/tmp/etc/xavante/sites-available mkdir -p debian/tmp/etc/xavante/sites-enabled cp debian/localhost.lua debian/tmp/etc/xavante/sites-available cd debian/tmp/etc/xavante/sites-enabled; ln -s ../sites-available/* . cp debian/xavante_start.lua debian/tmp/etc/xavante/xavante_start.lua # start mkdir -p debian/tmp/etc/default/ echo "RUN_XAVANTE=" > debian/tmp/etc/default/xavante override_dh_compress: dh_compress -XREADME debian/xavante_start.lua0000644000000000000000000000172612246135035012563 0ustar -- Some standard includes used by xavante -- require "xavante" require "xavante.filehandler" require "xavante.redirecthandler" -- xavante only recommends cgilua, thus this handler in not required by default -- -- require "xavante.cgiluahandler" -- To list the configuration files -- require "lfs" local conf_dir = "/etc/xavante/sites-enabled/" -- This is the configuration table, virtual hsots should -- fill it with rules (see the sample localhost.lua) config = { server = {host = "*", port = 8080}, defaultHost = {}, virtualhosts = {}, } -- load all configuration files for f in lfs.dir(conf_dir) do if string.match(f,"\.lua$") then local rc, err = pcall(dofile,conf_dir..f) if not rc then print('Error loading '..conf_dir..f..': '..tostring(err)) end end end -- we also set the default host to localhost config.defaultHost = config.virtualhosts["localhost:8080"] -- load the configuration table xavante.HTTP(config) -- run xavante xavante.start() debian/compat0000644000000000000000000000000212246135035010365 0ustar 8 debian/xavante.preinst0000644000000000000000000000157612246135035012254 0ustar #!/bin/sh set -e # Remove a no-longer used conffile rm_conffile() { PKGNAME="$1" CONFFILE="$2" if [ -e "$CONFFILE" ]; then md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi fi } case "$1" in install|upgrade) if dpkg --compare-versions "$2" le "2.0.0~cvs20080120-1"; then rm_conffile xavante /etc/xavante/config.lua rm_conffile xavante /etc/xavante/xavante_init.lua fi esac #DEBHELPER# debian/source/0000755000000000000000000000000012246135035010467 5ustar debian/source/format0000644000000000000000000000001412246135035011675 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000307612246135035011047 0ustar xavante (2.3.0-1) unstable; urgency=low * New upstream release with webdav support -- Enrico Tassi Fri, 29 Nov 2013 16:53:24 +0100 xavante (2.2.1+git9927c2a-1) unstable; urgency=low * New upstream snapshot with lua 5.2 support * Packaging moved to git -- Enrico Tassi Sat, 12 May 2012 19:13:00 +0200 xavante (2.2.1-1) unstable; urgency=low * New upstream release * CDBS -> dh * debian/compat set to 8 * bumped standards-version to 3.9.3 * update watch file * copyright format 1.0 -- Enrico Tassi Thu, 03 May 2012 17:23:07 +0200 xavante (2.0.1-2) unstable; urgency=low * source format 3.0 (quilt) * bumped standards-version to 3.9.2 * fixed LSB init scri w.r.t. $remote_fs -- Enrico Tassi Sat, 23 Jul 2011 10:45:03 +0200 xavante (2.0.1-1) unstable; urgency=low * new bugfix upstream release * bumped standards-version to 3.8.1 * depend on wsapi 1.1 * added -e in preinst -- Enrico Tassi Tue, 24 Mar 2009 10:12:30 +0100 xavante (2.0.0-1) unstable; urgency=low * new upstream release -- Enrico Tassi Sat, 24 May 2008 11:16:56 +0200 xavante (2.0~rc1-1) unstable; urgency=low * New upstream major release candidate -- Enrico Tassi Thu, 17 Apr 2008 10:09:39 +0200 xavante (1.3.2~20070929-1) unstable; urgency=low * Initial release. (Closes: #444607) -- Enrico Tassi Wed, 12 Sep 2007 12:10:28 +0100 debian/xavante.init0000644000000000000000000000337212246135035011527 0ustar #!/bin/bash ### BEGIN INIT INFO # Provides: xavante # Required-Start: $network $remote_fs # Required-Stop: $network $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts the xavante httpd daemon. # Description: Starts xavante, a lightweight web server # written in lua ### END INIT INFO # lsb functions, to use those ugly colors.. . /lib/lsb/init-functions ### some default values ### PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/bin/lua5.1 PIDFILE=/var/run/xavante.pid DESC="xavante web server" ### /etc/default/ loading ### if [ -f /etc/default/xavante ] ; then . /etc/default/xavante fi if [ -z "$RUN_XAVANTE" ] ; then exit 0 fi test -x $DAEMON || exit 0 set -e sites="" for X in /etc/xavante/sites-enabled/*.lua; do sites="$sites `basename $X .lua`" done ### helpers ### start_xavante () { log_daemon_msg "Starting $DESC" "$sites" start-stop-daemon --start -b --quiet -m -p $PIDFILE -c www-data:www-data\ --exec $DAEMON -- /etc/xavante/xavante_start.lua log_end_msg $? } stop_xavante () { if [ -e $PIDFILE ]; then log_daemon_msg "Stopping $DESC" "$sites" start-stop-daemon --stop --quiet -p $PIDFILE || true log_end_msg $? rm $PIDFILE fi } status_xavante () { P=`cat $PIDFILE` N=`ps -e | grep "^ *$P " | grep $DAEMON | wc -l` if [ $N > 0 ]; then echo "xavante is running with pid $P." else echo "xavante is dead." fi } ### real code ### case "$1" in start) start_xavante ;; stop) stop_xavante ;; restart|force-reload) stop_xavante sleep 1 start_xavante ;; status) status_xavante ;; *) N=/etc/init.d/xavante echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0 debian/copyright0000644000000000000000000000637312246135035011133 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: xavante Upstream-Contact: Fabio Mascarenhas Source: https://github.com/keplerproject/xavante Files: * Copyright: 2003-2007 The Kepler Project. Comment: In the Lua community this license is better known as "MIT". Unfortunately other variants of this license are also known as "MIT". To obtain a machine intepretable copyright file Debian prefers to name this version of the MIT license using the non ambiguous term "Expat". License: Expat 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. Files: src/sajax/sajax.lua Copyright: 2005 modernmethod, inc. Comment: only a snippet of Javascript code embedded in this file is under BSD License: BSD Copyright (c) The Regents of the University of California. All rights reserved. . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/control0000644000000000000000000000235312246135035010575 0ustar Source: xavante Section: net Priority: optional Maintainer: Enrico Tassi Build-Depends: debhelper (>= 8) Standards-Version: 3.9.3 Homepage: http://keplerproject.github.com/xavante/ Vcs-Git: git://git.debian.org/git/pkg-lua/xavante.git Vcs-Browser: http://git.debian.org/?p=pkg-lua/xavante.git Package: xavante Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, lua5.1-coxpcall, lua5.1-copas, lua-copas (>= 1.1.6), lua5.1-filesystem, lua-filesystem (>= 1.5.0), lua5.1 Recommends: lua5.1-wsapi, lua5.1-cgi Description: Lua HTTP 1.1 Web server This package contains xavante, a Lua HTTP 1.1 Web server that uses a modular architecture based on URI mapped handlers. Xavante currently offers a file handler, a redirect handler and a CGILua handler. Those are used for general files, URI remapping and CGILua scripts respectively. . The CGILua handler is considered optional thus xavante just recommends the packages needed for that handler. Package: xavante-doc Architecture: all Depends: ${misc:Depends} Recommends: xavante Section: doc Description: Documentation files for the Xavante web server This package contains the documentation for the Xavante web server as well as some examples of configuration files. debian/patches/0000755000000000000000000000000012246135035010616 5ustar debian/patches/series0000644000000000000000000000001512246135035012027 0ustar config.patch debian/patches/config.patch0000644000000000000000000000112012246135035013076 0ustar Author: Enrico Tassi Description: add DESTDIR variable --- xavante-2.0.1.orig/config +++ xavante-2.0.1/config @@ -1,7 +1,7 @@ # $Id: config,v 1.16 2007/11/17 14:15:23 carregal Exp $ # Default prefix -PREFIX = /usr/local +PREFIX = $(DESTDIR)/usr/ # System's libraries directory (where binary libraries are installed) LUA_LIBDIR= $(PREFIX)/lib/lua/5.1 @@ -10,4 +10,4 @@ LUA_DIR= $(PREFIX)/share/lua/5.1 # Complete path to Lua command line interpreter -LUA_INTERPRETER= $(PREFIX)/bin/lua \ No newline at end of file +LUA_INTERPRETER= $(PREFIX)/bin/lua5.1