summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormrxx2015-07-10 01:30:14 +0200
committermrxx2015-07-10 01:30:14 +0200
commit159d741318f677f4e0d817081344e298507da531 (patch)
tree13f3eb0f7da7aaa9f380d57cb5d304cb055bac08
downloadaur-159d741318f677f4e0d817081344e298507da531.tar.gz
Update to 20150320
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD49
-rw-r--r--bozohttpd.install20
-rw-r--r--bozohttpd.service19
-rw-r--r--sample_index.html5
-rw-r--r--sample_index.php1
6 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ad74f785e13
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = bozohttpd
+ pkgdesc = A small and secure HTTP version 1.1 server
+ pkgver = 20150320
+ pkgrel = 1
+ url = http://www.eterna.com.au/bozohttpd/
+ install = bozohttpd.install
+ arch = i686
+ arch = x86_64
+ license = BSD
+ depends = openssl
+ optdepends = php-cgi
+ source = http://www.eterna.com.au/bozohttpd/bozohttpd-20150320.tar.bz2
+ source = bozohttpd.service
+ source = bozohttpd.install
+ source = sample_index.html
+ source = sample_index.php
+ md5sums = 60e2cf933d028a096523214fab8e6590
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = bozohttpd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e89ad1549d3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: mrxx <mrxx at cyberhome dot at>
+# Contributors: Se7endAY, Nathan Owe <ndowens04 at gmail>
+
+pkgname=bozohttpd
+pkgver=20150320
+pkgrel=1
+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')
+optdepends=('php-cgi')
+source=("http://www.eterna.com.au/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
+ 'bozohttpd.service'
+ 'bozohttpd.install'
+ 'sample_index.html'
+ 'sample_index.php'
+)
+md5sums=('60e2cf933d028a096523214fab8e6590'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+)
+install=bozohttpd.install
+
+build()
+{
+ cd "${pkgname}-${pkgver}"
+ cp Makefile.boot Makefile
+ sed -i 's/d_namlen/d_reclen/g' bozohttpd.c
+ make || return 1
+}
+
+package()
+{
+ cd "${pkgname}-${pkgver}"
+ mkdir -p "${pkgdir}"/usr/{bin,share/{${pkgname},man/man8}}
+ install -D *.* testsuite/*.* testsuite/data/*.* "${pkgdir}/usr/share/${pkgname}/"
+ 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
+ mkdir -p -m 755 "${pkgdir}"/srv/http/{www,cgi-bin}
+ install -Dm644 sample_index.html "${pkgdir}/srv/http/www/"
+ chown nobody.nobody "${pkgdir}/srv/http/www/sample_index.html"
+ install -Dm644 sample_index.php "${pkgdir}/srv/http/www/"
+ chown nobody.nobody "${pkgdir}/srv/http/www/sample_index.php"
+}
diff --git a/bozohttpd.install b/bozohttpd.install
new file mode 100644
index 00000000000..6303e629c78
--- /dev/null
+++ b/bozohttpd.install
@@ -0,0 +1,20 @@
+post_install() {
+ if [ ! -f "${pkgdir}"/srv/http/www/index.html ]; then
+ ln -s "${pkgdir}"/srv/http/www/sample_index.html "${pkgdir}/srv/http/www/index.html"
+ fi
+ if [ ! -f "${pkgdir}"/srv/http/www/index.php ]; then
+ ln -s "${pkgdir}"/srv/http/www/sample_index.php "${pkgdir}/srv/http/www/index.php"
+ fi
+ echo
+ echo "*** USAGE ***"
+ echo
+ echo "Web server root is /srv/http/www ."
+ echo "Use 'systemctl start bozohttpd.service' to start the web server."
+ echo "Instructions on how to enable CGI and PHP support, dir indexing and much more"
+ echo "are in /usr/lib/systemd/system/bozohttpd.service ."
+ echo
+}
+
+post_upgrade() {
+ post_install
+}
diff --git a/bozohttpd.service b/bozohttpd.service
new file mode 100644
index 00000000000..d8bc001f017
--- /dev/null
+++ b/bozohttpd.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=the bozotic HTTP server
+After=syslog.target
+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/www
+# Enable directory index:
+#ExecStart=/usr/bin/bozohttpd -b -f -s -U nobody -P /run/bozohttpd.pid -X /srv/http/www
+# Enable CGI:
+#ExecStart=/usr/bin/bozohttpd -b -f -s -U nobody -P /run/bozohttpd.pid -c /srv/http/cgi-bin /srv/http/www
+# 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/www
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sample_index.html b/sample_index.html
new file mode 100644
index 00000000000..e9a8b0f65e7
--- /dev/null
+++ b/sample_index.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+<h2>Server online.</h2>
+</body>
+</html>
diff --git a/sample_index.php b/sample_index.php
new file mode 100644
index 00000000000..147cebcdd47
--- /dev/null
+++ b/sample_index.php
@@ -0,0 +1 @@
+<?php phpinfo(); ?>