diff --git a/www/xavante/Makefile b/www/xavante/Makefile index 4e69a360f13..ece45486db1 100644 --- a/www/xavante/Makefile +++ b/www/xavante/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.6 2005/12/01 20:17:05 pedro Exp $ +# $OpenBSD: Makefile,v 1.7 2005/12/02 01:12:08 jolan Exp $ COMMENT= "lua web server with cgi support" DISTNAME= xavante-1.1 -PKGNAME= ${DISTNAME}p3 +PKGNAME= ${DISTNAME}p4 CATEGORIES= www MASTER_SITES= http://luaforge.net/frs/download.php/958/ @@ -25,31 +25,34 @@ RUN_DEPENDS= ${BUILD_DEPENDS} post-extract: @sed -e "s:@xavantepath@:${PREFIX}/lua/xavante/?.lua:g" \ -e "s:@sajaxpath@:${PREFIX}/lua/sajax/?.lua:g" \ + -e "s:@sysconfdir@:${SYSCONFDIR}/?.lua:g" \ ${FILESDIR}/init.lua > ${WRKSRC}/init.lua post-patch: - @perl -pi -e 's:\@xavanteweb@:${PREFIX}/share/examples/xavante/:g;' \ - ${WRKSRC}/src/t_xavante_start.lua + @perl -pi -e 's:\@xavanteweb@:${PREFIX}/share/examples/xavante/htdocs/:g;' \ + ${WRKSRC}/src/xavante/config.lua @perl -pi -e 's:\@localbase@:${LOCALBASE}:g;' \ ${WRKSRC}/src/t_xavante_start.lua do-install: - ${INSTALL_DATA_DIR} ${PREFIX}/lua/xavante ${INSTALL_DATA_DIR} ${PREFIX}/lua/sajax + ${INSTALL_DATA} ${WRKSRC}/src/sajax/sajax.lua ${PREFIX}/lua/sajax + ${INSTALL_DATA_DIR} ${PREFIX}/lua/xavante ${INSTALL_DATA_DIR} ${PREFIX}/lua/xavante/xavante ${INSTALL_DATA} ${WRKSRC}/init.lua ${PREFIX}/lua/xavante - ${INSTALL_DATA} ${WRKSRC}/src/xavante/*.lua \ + ${INSTALL_DATA} ${WRKSRC}/src/xavante/{cgiluahandler,davFileProps,davFileRepository,davhandler,filehandler,httpd,mime,redirecthandler,server}.lua \ ${PREFIX}/lua/xavante/xavante ${INSTALL_DATA} ${WRKSRC}/src/coxpcall/coxpcall.lua \ ${PREFIX}/lua/xavante/xavante/coxpcall.lua ${INSTALL_PROGRAM} ${WRKSRC}/src/t_xavante_start.lua \ ${PREFIX}/bin/xavante - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/xavante - ${INSTALL_DATA} ${WRKSRC}/src/sajax/sajax.lua ${PREFIX}/lua/sajax - ${INSTALL_DATA} ${WRKSRC}/web/*.lp ${PREFIX}/share/examples/xavante - ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/xavante/img + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/xavante/htdocs/img + ${INSTALL_DATA} ${WRKSRC}/src/xavante/config.lua \ + ${PREFIX}/share/examples/xavante + ${INSTALL_DATA} ${WRKSRC}/web/*.lp \ + ${PREFIX}/share/examples/xavante/htdocs ${INSTALL_DATA} ${WRKSRC}/web/img/*.{gif,jpg} \ - ${PREFIX}/share/examples/xavante/img + ${PREFIX}/share/examples/xavante/htdocs/img ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/xavante ${INSTALL_DATA} ${WRKSRC}/doc/us/* ${PREFIX}/share/doc/xavante diff --git a/www/xavante/files/init.lua b/www/xavante/files/init.lua index 70ac9027e77..7a9a73ef7cd 100644 --- a/www/xavante/files/init.lua +++ b/www/xavante/files/init.lua @@ -1,4 +1,5 @@ --- $OpenBSD: init.lua,v 1.2 2005/12/01 20:17:05 pedro Exp $ +-- $OpenBSD: init.lua,v 1.3 2005/12/02 01:12:08 jolan Exp $ -- xavante's initialization steps lua_addpath("@xavantepath@") lua_addpath("@sajaxpath@") +lua_addpath("@sysconfdir@") diff --git a/www/xavante/patches/patch-src_t_xavante_start_lua b/www/xavante/patches/patch-src_t_xavante_start_lua index c3e006d4c41..2c439f714cf 100644 --- a/www/xavante/patches/patch-src_t_xavante_start_lua +++ b/www/xavante/patches/patch-src_t_xavante_start_lua @@ -1,13 +1,13 @@ -$OpenBSD: patch-src_t_xavante_start_lua,v 1.2 2005/09/06 16:51:44 pedro Exp $ ---- src/t_xavante_start.lua.orig Mon Jul 4 15:37:44 2005 -+++ src/t_xavante_start.lua Thu Aug 18 13:57:10 2005 +$OpenBSD: patch-src_t_xavante_start_lua,v 1.3 2005/12/02 01:12:08 jolan Exp $ +--- src/t_xavante_start.lua.orig Mon Jul 4 13:37:44 2005 ++++ src/t_xavante_start.lua Thu Dec 1 18:27:06 2005 @@ -1,4 +1,4 @@ -#!/usr/local/bin/lua50 +#!@localbase@/bin/lua ------------------------------------------------------------------------------- -- Starts the Xavante Web server. -- -@@ -8,18 +8,10 @@ +@@ -8,18 +8,8 @@ -- Copyright (c) 2004-2005 Kepler Project ------------------------------------------------------------------------------- @@ -21,9 +21,8 @@ $OpenBSD: patch-src_t_xavante_start_lua,v 1.2 2005/09/06 16:51:44 pedro Exp $ -end require "xavante.server" - +- -xavante.setwebdir([[XAVANTE_WEB]]) -+xavante.setwebdir([[@xavanteweb@]]) ------------------------------------------------------------------------------- -- Loads the configuration file and starts Xavante diff --git a/www/xavante/patches/patch-src_xavante_config_lua b/www/xavante/patches/patch-src_xavante_config_lua new file mode 100644 index 00000000000..9686775201f --- /dev/null +++ b/www/xavante/patches/patch-src_xavante_config_lua @@ -0,0 +1,19 @@ +$OpenBSD: patch-src_xavante_config_lua,v 1.1 2005/12/02 01:12:08 jolan Exp $ +--- src/xavante/config.lua.orig Tue Jun 7 10:43:02 2005 ++++ src/xavante/config.lua Thu Dec 1 18:28:56 2005 +@@ -19,6 +19,8 @@ require "xavante.filehandler" + require "xavante.cgiluahandler" + require "xavante.redirecthandler" + ++xavante.setwebdir([[@xavanteweb@]]) ++ + local simplerules = { + -- URL remapping example + {match = "/", with = xavante.redirecthandler, params = {"index.lp"}}, +@@ -36,4 +38,4 @@ xavante.HTTP{ + defaultHost = { + rules = simplerules + }, +-} +\ No newline at end of file ++} diff --git a/www/xavante/patches/patch-web_index_lp b/www/xavante/patches/patch-web_index_lp new file mode 100644 index 00000000000..e52a21bc662 --- /dev/null +++ b/www/xavante/patches/patch-web_index_lp @@ -0,0 +1,17 @@ +$OpenBSD: patch-web_index_lp,v 1.1 2005/12/02 01:12:08 jolan Exp $ +--- web/index.lp.orig Wed Mar 16 15:35:24 2005 ++++ web/index.lp Thu Dec 1 18:43:21 2005 +@@ -12,10 +12,10 @@ + If you are reading this page, <%= cgilua.servervariable("SERVER_SOFTWARE") %> + has been successfully installed on your system.
+
+-From here you can browse the Xavante documentation ++From here you can browse the Xavante documentation + or run some Xavante tests.
+
+ Copyright 2004-2005 - Kepler Project
+ + +- +\ No newline at end of file ++ diff --git a/www/xavante/pkg/PLIST b/www/xavante/pkg/PLIST index b271cfa6f7f..3d01b2d88e5 100644 --- a/www/xavante/pkg/PLIST +++ b/www/xavante/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.6 2005/12/01 20:17:05 pedro Exp $ +@comment $OpenBSD: PLIST,v 1.7 2005/12/02 01:12:08 jolan Exp $ @newgroup _xavante:552 @newuser _xavante:552:552:daemon:Xavante WWW Server:/var/empty:/sbin/nologin @unexec lua ${SYSCONFDIR}/lua/luapkg.lua del xavante @@ -9,7 +9,6 @@ lua/xavante/ lua/xavante/init.lua lua/xavante/xavante/ lua/xavante/xavante/cgiluahandler.lua -lua/xavante/xavante/config.lua lua/xavante/xavante/coxpcall.lua lua/xavante/xavante/davFileProps.lua lua/xavante/xavante/davFileRepository.lua @@ -27,10 +26,14 @@ share/doc/xavante/manual.html share/doc/xavante/sajax.html share/doc/xavante/xavante.gif share/examples/xavante/ -share/examples/xavante/calculator.lp -share/examples/xavante/img/ -share/examples/xavante/img/test.jpg -share/examples/xavante/img/xavante.gif -share/examples/xavante/index.lp -share/examples/xavante/loop.lp -share/examples/xavante/test.lp +@sample ${SYSCONFDIR}/xavante/ +share/examples/xavante/config.lua +@sample ${SYSCONFDIR}/xavante/config.lua +share/examples/xavante/htdocs/ +share/examples/xavante/htdocs/calculator.lp +share/examples/xavante/htdocs/img/ +share/examples/xavante/htdocs/img/test.jpg +share/examples/xavante/htdocs/img/xavante.gif +share/examples/xavante/htdocs/index.lp +share/examples/xavante/htdocs/loop.lp +share/examples/xavante/htdocs/test.lp