aboutsummaryrefslogtreecommitdiffstats
path: root/extra/mini_httpd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-27 09:16:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-27 09:16:15 +0000
commit9fc1b28e24cd53442793b6b8c8dd319ae6f23f7b (patch)
tree26da971ccbeebd6a60553455791b4b20808b1243 /extra/mini_httpd
parentd41b368a2fe77470d3a1ba68c9beb7a2712d36aa (diff)
downloadaports-9fc1b28e24cd53442793b6b8c8dd319ae6f23f7b.tar.bz2
aports-9fc1b28e24cd53442793b6b8c8dd319ae6f23f7b.tar.xz
extra/mini_httpd: new aport
Diffstat (limited to 'extra/mini_httpd')
-rw-r--r--extra/mini_httpd/APKBUILD45
-rw-r--r--extra/mini_httpd/mini_httpd.conf.sample48
-rw-r--r--extra/mini_httpd/mini_httpd.confd26
-rw-r--r--extra/mini_httpd/mini_httpd.initd29
4 files changed, 148 insertions, 0 deletions
diff --git a/extra/mini_httpd/APKBUILD b/extra/mini_httpd/APKBUILD
new file mode 100644
index 0000000000..2751979769
--- /dev/null
+++ b/extra/mini_httpd/APKBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mini_httpd
+pkgver=1.19
+pkgrel=0
+pkgdesc="Small forking webserver with ssl and ipv6 support"
+url="http://www.acme.com/software/mini_httpd/"
+license="BSD"
+depends="uclibc openssl"
+makedepends="openssl-dev"
+subpackages="$pkgname-doc"
+source="http://www.acme.com/software/mini_httpd/$pkgname-$pkgver.tar.gz
+ $pkgname.confd
+ $pkgname.conf.sample
+ $pkgname.initd
+ "
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make CFLAGS="${CFLAGS} -DUSE_SSL" \
+ LDFLAGS="${LDFLAGS}" \
+ SSL_LIBS="-lssl -lcrypto" \
+ || return 1
+# SSL_DEFS="-DUSE_SSL" \
+
+ # does not respect DESTDIR
+ make install \
+ BINDIR="$pkgdir"/usr/sbin \
+ MANDIR="$pkgdir"/usr/share/man
+
+ # rename htpasswd to mini_htpasswd
+ mv "$pkgdir"/usr/sbin/htpasswd "$pkgdir"/usr/sbin/mini_htpasswd
+ mv "$pkgdir"/usr/share/man/man1/htpasswd.1 \
+ "$pkgdir"/usr/share/man/man1/mini_htpasswd.1
+
+ mkdir -p "$pkgdir"/var/www/localhost/htdocs
+ install -D -m644 ../mini_httpd.conf.sample \
+ "$pkgdir"/etc/mini_httpd.conf
+ install -D -m755 ../mini_httpd.initd "$pkgdir"/etc/init.d/mini_httpd
+ install -D -m644 ../mini_httpd.confd "$pkgdir"/etc/conf.d/mini_httpd
+}
+
+md5sums="7c68293ad265ecfe2edea917912f6f1f mini_httpd-1.19.tar.gz
+8ec70211497d79a26d33006b0ce19aa0 mini_httpd.confd
+fd62c1809f658400acf2082eacd08bb8 mini_httpd.conf.sample
+ec52d2db1ce52f1b088d474aeefe9da8 mini_httpd.initd"
diff --git a/extra/mini_httpd/mini_httpd.conf.sample b/extra/mini_httpd/mini_httpd.conf.sample
new file mode 100644
index 0000000000..f215652fe6
--- /dev/null
+++ b/extra/mini_httpd/mini_httpd.conf.sample
@@ -0,0 +1,48 @@
+## /etc/mini_httpd.conf
+##
+## do not leave empty lines in here!
+## format is: key=value
+##
+## run in debug-mode?
+#debug
+##
+## what interface to bind to?
+## (default is binding to any interface)
+#host=www.example.org
+port=80
+#port=443
+user=nobody
+##
+## CGI:
+## ? match a single char
+## * matches any string excluding "/"
+## ** matches any string including "/"
+## separate multiple patterns with "|"
+#cgipat=**.sh|**.cgi
+##
+## chroot:
+chroot
+#nochroot
+##
+logfile=/var/log/mini_httpd.log
+pidfile=/var/run/mini_httpd.pid
+##
+#charset=iso-8859-1
+##
+## control the caching: (in secs)
+#maxage 60
+##
+## useless setting (just modifies the http-header)
+## (see mini_httpd(8) and http://www.w3.org/P3P/ for more info)
+#p3p
+##
+## virtual hosting:
+#vhost
+##
+## cache-control: send this "max-age" in all HTTP-responses:
+#max-age=0
+##
+## ssl:
+#nossl
+#ssl
+#certfile=/etc/mini_httpd/mini_httpd.pem
diff --git a/extra/mini_httpd/mini_httpd.confd b/extra/mini_httpd/mini_httpd.confd
new file mode 100644
index 0000000000..b5e9a8f23e
--- /dev/null
+++ b/extra/mini_httpd/mini_httpd.confd
@@ -0,0 +1,26 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/mini_httpd/files/mini_httpd.confd-1.19,v 1.2 2007/08/26 21:20:21 bangert Exp $
+
+## Config file for /etc/init.d/mini_httpd
+
+## the startup-dir of mini_httpd is the docroot, so we specify it here
+## and the init-script does a "cd" prior to startup:
+MINI_HTTPD_DOCROOT="/var/www/localhost/htdocs"
+
+## There are 2 ways to configure mini_httpd:
+## 1) specify all params on the cmd-line
+## 2) use a config-file (and start with "-C <conf-file>")
+## Note: 1) and 2) can be mixed.
+##
+## We choose 1) here -- if you have a more complicated setup read
+## mini_httpd(8) for details on 2).
+
+# MINI_HTTPD_OPTS="-p 8080 -u nobody -r -i /var/run/mini_httpd.pid -l /var/log/mini_httpd.log -d ${MINI_HTTPD_DOCROOT}"
+
+## to add cgi-support you should switch over to a config-file, a sample can
+## be found in your DOCDESTTREE (/usr/share/doc/mini_httpd-xxxx) named
+## mini_httpd.conf.sample.gz
+## copy the sample to /etc/mini_httpd.conf and replace the MINI_HTTPD_OPTS-line
+## above by:
+MINI_HTTPD_OPTS="-C /etc/mini_httpd.conf"
diff --git a/extra/mini_httpd/mini_httpd.initd b/extra/mini_httpd/mini_httpd.initd
new file mode 100644
index 0000000000..ccaf53d31f
--- /dev/null
+++ b/extra/mini_httpd/mini_httpd.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/mini_httpd/files/mini_httpd.init,v 1.2 2007/08/26 21:20:21 bangert Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting mini_httpd"
+ if [ ! -d "$MINI_HTTPD_DOCROOT" ]; then
+ eend 1 "MINI_HTTPD_DOCROOT not set correctly in /etc/conf.d/mini_httpd"
+ exit 1
+ fi
+ start-stop-daemon --quiet --start --startas /usr/sbin/mini_httpd \
+ --pidfile /var/run/mini_httpd.pid -- ${MINI_HTTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ local rc
+
+ ebegin "Stopping mini_httpd"
+ start-stop-daemon --quiet --stop --pidfile /var/run/mini_httpd.pid
+ rc=$?
+ rm -f /var/run/mini_httpd.pid
+ eend $rc
+}