summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-03-04 06:51:41 +0000
committerMike Frysinger <vapier@gentoo.org>2003-03-04 06:51:41 +0000
commitbacf01b1169f535027b9ad30224b966d74beb69f (patch)
tree789532cc5cc2a134720f3756b3e85ec09deb3686 /net-www/mini_httpd
parentMoved from net-www to net-zope. (diff)
downloadgentoo-2-bacf01b1169f535027b9ad30224b966d74beb69f.tar.gz
gentoo-2-bacf01b1169f535027b9ad30224b966d74beb69f.tar.bz2
gentoo-2-bacf01b1169f535027b9ad30224b966d74beb69f.zip
initial ebuild #9749
Diffstat (limited to 'net-www/mini_httpd')
-rw-r--r--net-www/mini_httpd/ChangeLog8
-rw-r--r--net-www/mini_httpd/files/digest-mini_httpd-1.17_beta11
-rw-r--r--net-www/mini_httpd/files/mini_httpd.conf.sample47
-rw-r--r--net-www/mini_httpd/files/mini_httpd.confd22
-rw-r--r--net-www/mini_httpd/files/mini_httpd.init33
-rw-r--r--net-www/mini_httpd/mini_httpd-1.17_beta1.ebuild65
6 files changed, 176 insertions, 0 deletions
diff --git a/net-www/mini_httpd/ChangeLog b/net-www/mini_httpd/ChangeLog
new file mode 100644
index 000000000000..8167cd76dd8d
--- /dev/null
+++ b/net-www/mini_httpd/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for net-www/mini_httpd
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/mini_httpd/ChangeLog,v 1.1 2003/03/04 06:51:41 vapier Exp $
+
+*mini_httpd-1.17_beta1 (03 Mar 2003)
+
+ 03 Mar 2003; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by Thomas Eckert <eckert.thomas@gmx.net> #9749.
diff --git a/net-www/mini_httpd/files/digest-mini_httpd-1.17_beta1 b/net-www/mini_httpd/files/digest-mini_httpd-1.17_beta1
new file mode 100644
index 000000000000..39afe2eb18b6
--- /dev/null
+++ b/net-www/mini_httpd/files/digest-mini_httpd-1.17_beta1
@@ -0,0 +1 @@
+MD5 ec4374b4c91b6e787f8ba2fed615e60f mini_httpd-1.17beta1.tar.gz 40172
diff --git a/net-www/mini_httpd/files/mini_httpd.conf.sample b/net-www/mini_httpd/files/mini_httpd.conf.sample
new file mode 100644
index 000000000000..092f7a546b48
--- /dev/null
+++ b/net-www/mini_httpd/files/mini_httpd.conf.sample
@@ -0,0 +1,47 @@
+## /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=8080
+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=/tmp/mini_httpd.pem
diff --git a/net-www/mini_httpd/files/mini_httpd.confd b/net-www/mini_httpd/files/mini_httpd.confd
new file mode 100644
index 000000000000..17de6fa896df
--- /dev/null
+++ b/net-www/mini_httpd/files/mini_httpd.confd
@@ -0,0 +1,22 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-www/mini_httpd/files/mini_httpd.confd,v 1.1 2003/03/04 06:51:41 vapier 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="/home/httpd/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"
+
+## to add cgi-support:
+#MINI_HTTPD_OPTS="$MINI_HTTPD_OPTS -c **.cgi"
diff --git a/net-www/mini_httpd/files/mini_httpd.init b/net-www/mini_httpd/files/mini_httpd.init
new file mode 100644
index 000000000000..d6a3c35623aa
--- /dev/null
+++ b/net-www/mini_httpd/files/mini_httpd.init
@@ -0,0 +1,33 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-www/mini_httpd/files/mini_httpd.init,v 1.1 2003/03/04 06:51:41 vapier 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
+ cd $MINI_HTTPD_DOCROOT
+ if [ $? -ne 0 ]; then
+ eend $? "ERROR: cannot change to docroot \"$MINI_HTTPD_DOCROOT\""
+ 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
+}
diff --git a/net-www/mini_httpd/mini_httpd-1.17_beta1.ebuild b/net-www/mini_httpd/mini_httpd-1.17_beta1.ebuild
new file mode 100644
index 000000000000..93d66fdafd5a
--- /dev/null
+++ b/net-www/mini_httpd/mini_httpd-1.17_beta1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/mini_httpd/mini_httpd-1.17_beta1.ebuild,v 1.1 2003/03/04 06:51:41 vapier Exp $
+
+MY_P=${P/_beta/beta}
+DESCRIPTION="Small forking webserver with optional ssl and ipv6 support"
+HOMEPAGE="http://www.acme.com/software/mini_httpd/"
+SRC_URI="http://www.acme.com/software/mini_httpd/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="x86"
+IUSE="ssl ipv6"
+
+DEPEND="virtual/glibc
+ ssl? ( dev-libs/openssl )"
+
+S=${WORKDIR}/${MY_P}
+
+src_compile() {
+ ## we need to hack a bit to have the correct install-dir -- no autoconf :(
+ mv Makefile Makefile.org
+ cat Makefile.org | sed -e "s@/usr/local/sbin@${D}/usr/sbin@; \
+ s@/usr/local/man@${D}/usr/share/man@; \
+ s@-mkdir -p \${BINDIR}@& \${MANDIR}/man8 \${MANDIR}/man1@" > \
+ Makefile || die "error rewriting Makefile"
+ rm -f Makefile.org
+
+ ## for ssl-support we need another Makefile-patch:
+ if [ "$(use ssl)" ]; then
+ mv Makefile Makefile.org
+ cat Makefile.org | sed -e "s@^#\(SSL_TREE.*=\)\(.*$\)@\1 /usr@; \
+ s@^#\(SSL_DEFS.*$\)@\1@; \
+ s@^#\(SSL_INC.*$\)@\1@; \
+ s@^#\(SSL_LIBS.*$\)@\1@" > \
+ Makefile || die "error rewriting Makefile"
+ rm -f Makefile.org
+ fi
+
+ ## ipv6-support: normally this is auto-detected at compile time ... so we
+ ## need to force a bit ;)
+ if [ ! "$(use ipv6)" ]; then
+ mv mini_httpd.c mini_httpd.c.org
+ cat mini_httpd.c.org | sed -e 's@#define USE_IPV6@#undef USE_IPV6@' > \
+ mini_httpd.c || die "error rewriting mini_httpd.c"
+ rm -f mini_httpd.c.org
+ fi
+ emake || die
+}
+
+src_install() {
+ make install || die
+ mv ${D}/usr/sbin/{,mini_}htpasswd
+ mv ${D}/usr/share/man/man1/{,mini_}htpasswd.1
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/mini_httpd.init mini_httpd
+ insinto /etc/conf.d
+ newins ${FILESDIR}/mini_httpd.confd mini_httpd
+ dodoc README ${FILESDIR}/mini_httpd.conf.sample
+}
+
+pkg_postinst() {
+ ewarn "Adjust MINI_HTTPD_DOCROOT in /etc/conf.d/mini_httpd !"
+}