summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormrxx2016-03-13 21:37:01 +0100
committermrxx2016-03-13 21:37:01 +0100
commit4bde63ac48be0e1f496ee3e43260e0f4b9a68db6 (patch)
tree4dffc83693327fb77ce42e7578e51bbfc3ede5d8
parent84a09cc426d74d91f52ef59b2e6fd68a23b3f744 (diff)
downloadaur-4bde63ac48be0e1f496ee3e43260e0f4b9a68db6.tar.gz
Added Lua support
-rw-r--r--.SRCINFO7
-rw-r--r--LICENSE24
-rw-r--r--PKGBUILD12
-rw-r--r--bozohttpd.install4
-rw-r--r--bozohttpd.service9
-rw-r--r--sample.cgi1
-rw-r--r--sample_perl.cgi1
7 files changed, 50 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b832eb2b6a5..e3fded0f000 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,29 @@
+# Generated by mksrcinfo v8
+# Sun Mar 13 20:35:54 UTC 2016
pkgbase = bozohttpd
pkgdesc = A small and secure HTTP version 1.1 server
pkgver = 20150320
- pkgrel = 2
+ pkgrel = 3
url = http://www.eterna.com.au/bozohttpd/
install = bozohttpd.install
arch = i686
arch = x86_64
license = BSD
depends = openssl
+ depends = lua
optdepends = php-cgi
source = http://www.eterna.com.au/bozohttpd/bozohttpd-20150320.tar.bz2
source = bozohttpd.service
source = bozohttpd.install
source = sample.cgi
source = sample_perl.cgi
+ source = LICENSE
md5sums = 60e2cf933d028a096523214fab8e6590
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
+ md5sums = SKIP
pkgname = bozohttpd
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 00000000000..791a030f715
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 1997-2015 Matthew R. Green
+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 and
+ dedication in the documentation and/or other materials provided
+ with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index 6f00987ff71..7d028b11ef9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,24 +3,26 @@
pkgname=bozohttpd
pkgver=20150320
-pkgrel=2
+pkgrel=3
pkgdesc="A small and secure HTTP version 1.1 server"
arch=('i686' 'x86_64')
url="http://www.eterna.com.au/bozohttpd/"
license=('BSD')
-depends=('openssl')
+depends=('openssl' 'lua')
optdepends=('php-cgi')
source=("http://www.eterna.com.au/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
'bozohttpd.service'
'bozohttpd.install'
'sample.cgi'
'sample_perl.cgi'
+ 'LICENSE'
)
md5sums=('60e2cf933d028a096523214fab8e6590'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
+ 'SKIP'
)
install=bozohttpd.install
@@ -29,17 +31,19 @@ build()
cd "${pkgname}-${pkgver}"
cp Makefile.boot Makefile
sed -i 's/d_namlen/d_reclen/g' bozohttpd.c
- make || return 1
+ make LOCAL_CFLAGS= LDFLAGS=-llua || return 1
}
package()
{
cd "${pkgname}-${pkgver}"
mkdir -p "${pkgdir}"/usr/{bin,lib/cgi-bin,share/{${pkgname},man/man8}}
- install -D *.* testsuite/*.* testsuite/data/*.* "${pkgdir}/usr/share/${pkgname}/"
+ install -D testsuite/*.* testsuite/data/*.* "${pkgdir}/usr/share/${pkgname}/"
+ install -D *.lua "${pkgdir}/usr/lib/cgi-bin/"
install -m755 bozohttpd "${pkgdir}/usr/bin/"
install -m644 bozohttpd.8 "${pkgdir}/usr/share/man/man8/"
cd "$srcdir"
install -Dm644 bozohttpd.service "${pkgdir}"/usr/lib/systemd/system/bozohttpd.service
install -D *.cgi "${pkgdir}/usr/lib/cgi-bin/"
+ install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/bozohttpd.install b/bozohttpd.install
index 557b93f2cda..c4d4a3aee14 100644
--- a/bozohttpd.install
+++ b/bozohttpd.install
@@ -6,8 +6,8 @@ post_install() {
echo
echo "'systemctl start bozohttpd.service' starts the web server."
echo "Web server root is /srv/http. CGI dir is /usr/lib/cgi-bin."
- echo "To enable CGI, PHP, and dir indexing"
- echo "modify /usr/lib/systemd/system/bozohttpd.service ."
+ echo "To enable CGI, PHP, Lua and dir indexing, modify"
+ echo "/usr/lib/systemd/system/bozohttpd.service ."
echo
}
diff --git a/bozohttpd.service b/bozohttpd.service
index d0c44911397..5d3203889e2 100644
--- a/bozohttpd.service
+++ b/bozohttpd.service
@@ -6,14 +6,21 @@ After=network.target
[Service]
PIDFile=/run/bozohttpd.pid
StandardOutput=null
+#
# Simplest use:
ExecStart=/usr/bin/bozohttpd -b -f -s -U nobody -P /run/bozohttpd.pid /srv/http
-# Enable directory index:
+#
+# Enable directory indexing:
#ExecStart=/usr/bin/bozohttpd -b -f -s -U nobody -P /run/bozohttpd.pid -X /srv/http
+#
# Enable CGI:
#ExecStart=/usr/bin/bozohttpd -b -f -s -U nobody -P /run/bozohttpd.pid -c /usr/lib/cgi-bin /srv/http
+#
# Enable PHP and set default to index.php (instead of index.html):
#ExecStart=/usr/bin/bozohttpd -b -f -s -U nobody -P /run/bozohttpd.pid -x index.php -C .php /usr/bin/php-cgi /srv/http
+#
+# Enable Lua scripting:
+#ExecStart=/usr/bin/bozohttpd -L rest /usr/lib/cgi-bin/printenv.lua -b -f -s -U nobody -P /run/bozohttpd.pid /srv/http
[Install]
WantedBy=multi-user.target
diff --git a/sample.cgi b/sample.cgi
index 529ab790f5d..c5d55967bc0 100644
--- a/sample.cgi
+++ b/sample.cgi
@@ -1,5 +1,6 @@
#!/bin/bash
echo "Content-type: text/html"
+echo
echo "<html>
<body>
<h2>CGI Bash Example</h2>
diff --git a/sample_perl.cgi b/sample_perl.cgi
index d13d651d9f1..9398fc77273 100644
--- a/sample_perl.cgi
+++ b/sample_perl.cgi
@@ -2,6 +2,7 @@
print "Content-type: text/html\n\n";
print <<htmlcode;
+
<html>
<body>
<h2>CGI Perl Example</h2>