Commit 9fc1b28e authored by Natanael Copa's avatar Natanael Copa

extra/mini_httpd: new aport

parent d41b368a
# 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"
## /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
# 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"
#!/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
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment