summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Walker <ka0ttic@gentoo.org>2005-06-06 14:17:42 +0000
committerAaron Walker <ka0ttic@gentoo.org>2005-06-06 14:17:42 +0000
commitd20d181b42de6e88022a2a610fbe05e42d187cf6 (patch)
treeafa046a1f23c871a786769397f9b6589ddaecfc1
parentadd rant about CAN-2004-1051 (diff)
downloadgentoo-2-d20d181b42de6e88022a2a610fbe05e42d187cf6.tar.gz
gentoo-2-d20d181b42de6e88022a2a610fbe05e42d187cf6.tar.bz2
gentoo-2-d20d181b42de6e88022a2a610fbe05e42d187cf6.zip
Initial commit. Ebuild based on one submitted by Lukas Zapletal <lzap@seznam.cz> in bug 94154.
(Portage version: 2.0.51.22-r1)
-rw-r--r--www-servers/shttpd/ChangeLog12
-rw-r--r--www-servers/shttpd/Manifest7
-rw-r--r--www-servers/shttpd/files/digest-shttpd-1.211
-rw-r--r--www-servers/shttpd/files/shttpd.confd36
-rw-r--r--www-servers/shttpd/files/shttpd.initd35
-rw-r--r--www-servers/shttpd/files/shttpd.xinetd13
-rw-r--r--www-servers/shttpd/metadata.xml5
-rw-r--r--www-servers/shttpd/shttpd-1.21.ebuild55
8 files changed, 164 insertions, 0 deletions
diff --git a/www-servers/shttpd/ChangeLog b/www-servers/shttpd/ChangeLog
new file mode 100644
index 000000000000..e78efad2c3a6
--- /dev/null
+++ b/www-servers/shttpd/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for www-servers/shttpd
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/shttpd/ChangeLog,v 1.1 2005/06/06 14:17:42 ka0ttic Exp $
+
+*shttpd-1.21 (06 Jun 2005)
+
+ 06 Jun 2005; Aaron Walker <ka0ttic@gentoo.org> +files/shttpd.confd,
+ +files/shttpd.initd, +files/shttpd.xinetd, +metadata.xml,
+ +shttpd-1.21.ebuild:
+ Initial commit. Ebuild based on one submitted by Lukas Zapletal
+ <lzap@seznam.cz> in bug 94154.
+
diff --git a/www-servers/shttpd/Manifest b/www-servers/shttpd/Manifest
new file mode 100644
index 000000000000..ce7777358763
--- /dev/null
+++ b/www-servers/shttpd/Manifest
@@ -0,0 +1,7 @@
+MD5 159178edbd76761decf14c317bb5c524 ChangeLog 400
+MD5 4a186842848d9c384e2d12785ba426bc metadata.xml 165
+MD5 02158d46eb81d817c2bc7700e54fdc7b shttpd-1.21.ebuild 1171
+MD5 e8075e7b26f52ed5cb6750573df32559 files/digest-shttpd-1.21 57
+MD5 6f9204c5ccd79aa7756278fa6f66e6fc files/shttpd.xinetd 326
+MD5 596a305e3def89cddbca04c1f5e153c8 files/shttpd.confd 1182
+MD5 6272fd89472a4de8190c5f557663bd66 files/shttpd.initd 1131
diff --git a/www-servers/shttpd/files/digest-shttpd-1.21 b/www-servers/shttpd/files/digest-shttpd-1.21
new file mode 100644
index 000000000000..1ac27bf3569d
--- /dev/null
+++ b/www-servers/shttpd/files/digest-shttpd-1.21
@@ -0,0 +1 @@
+MD5 0dc2a4b4314799a3b17f071da7d38606 shttpd_1.21.c 84125
diff --git a/www-servers/shttpd/files/shttpd.confd b/www-servers/shttpd/files/shttpd.confd
new file mode 100644
index 000000000000..aeaeaeaeb277
--- /dev/null
+++ b/www-servers/shttpd/files/shttpd.confd
@@ -0,0 +1,36 @@
+# /etc/init.d/shttpd:
+# $Header: /var/cvsroot/gentoo-x86/www-servers/shttpd/files/shttpd.confd,v 1.1 2005/06/06 14:17:42 ka0ttic Exp $
+#
+# usage: shttpd [OPTIONS]
+# -d <directory> wwwroot (dflt: )
+# -D no directory listing
+# -p <port> listening port (dflt: 80 or 443)
+# -l <logfile> access log file (dflt: shttpd.log)
+# -I inetd mode
+# -e <errorlog> error log file
+# -i <files> index files (dflt: index.html,index.cgi)
+# -c <cgi_ext> CGI file pattern (dflt: .cgi)
+# -P <passfile> global auth file
+# -A <passfile> <domain> <user> <password> edit .htpasswd file
+# -u <login_name> switch UID to user <login_name>
+# -N <servername> server domain name (auth realm) (dflt: mydomain.com)
+# -m <mime_file> mime types file
+# -v debug mode
+# -s <pem_file> SSL certfileificate file (dflt: shttpd.pem)
+# -S use SSL
+#
+
+SHTTPD_PORT="81"
+SHTTPD_USER="shttpd"
+SHTTPD_DOCROOT="/var/www/localhost/htdocs"
+SHTTPD_LOG="/var/log/shttpd/access.log"
+SHTTPD_ERROR="/var/log/shttpd/error.log"
+
+# comma separated list of files shttpd will interpret as index files
+SHTTPD_INDECIS="index.html,index.cgi"
+SHTTPD_CGIEXT=".cgi"
+SHTTPD_DOMAIN="localhost"
+SHTTPD_MIME="/etc/mime.types"
+
+# set any extra options here.
+#SHTTPD_EXTRAOPTS=""
diff --git a/www-servers/shttpd/files/shttpd.initd b/www-servers/shttpd/files/shttpd.initd
new file mode 100644
index 000000000000..8fc1f0e00cd4
--- /dev/null
+++ b/www-servers/shttpd/files/shttpd.initd
@@ -0,0 +1,35 @@
+#!/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/shttpd/files/shttpd.initd,v 1.1 2005/06/06 14:17:42 ka0ttic Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ local opts
+ ebegin "Starting shttpd"
+
+ [[ -n "${SHTTPD_PORT}" ]] && opts="${opts} -p ${SHTTPD_PORT}"
+ [[ -n "${SHTTPD_USER}" ]] && opts="${opts} -u ${SHTTPD_USER}"
+ [[ -n "${SHTTPD_DOCROOT}" ]] && opts="${opts} -d ${SHTTPD_DOCROOT}"
+ [[ -n "${SHTTPD_LOG}" ]] && opts="${opts} -l ${SHTTPD_LOG}"
+ [[ -n "${SHTTPD_ERROR}" ]] && opts="${opts} -e ${SHTTPD_ERROR}"
+ [[ -n "${SHTTPD_INDECIS}" ]] && opts="${opts} -i ${SHTTPD_INDECIS}"
+ [[ -n "${SHTTPD_CGIEXT}" ]] && opts="${opts} -c ${SHTTPD_CGIEXT}"
+ [[ -n "${SHTTPD_DOMAIN}" ]] && opts="${opts} -N ${SHTTPD_DOMAIN}"
+ [[ -n "${SHTTPD_MIME}" ]] && opts="${opts} -m ${SHTTPD_MIME}"
+ [[ -n "${SHTTPD_EXTRAOPTS}" ]] && opts="${opts} ${SHTTPD_EXTRAOPTS}"
+
+ start-stop-daemon --background --make-pidfile --start --quiet \
+ --pidfile /var/run/shttpd.pid --startas /usr/sbin/shttpd -- \
+ ${opts}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping shttpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/shttpd.pid
+ eend $?
+}
diff --git a/www-servers/shttpd/files/shttpd.xinetd b/www-servers/shttpd/files/shttpd.xinetd
new file mode 100644
index 000000000000..5dc8cef2800d
--- /dev/null
+++ b/www-servers/shttpd/files/shttpd.xinetd
@@ -0,0 +1,13 @@
+service shttpd
+{
+ socket_type = stream
+ type = UNLISTED
+ wait = no
+ port = 81
+ server = /usr/sbin/shttpd
+# change these lines
+ server_args = -d /var/www/localhost/htdocs -I -l /var/log/shttpd_access.log -e /var/log/shttpd_error.log
+ user = root
+ group = root
+ disable = yes
+}
diff --git a/www-servers/shttpd/metadata.xml b/www-servers/shttpd/metadata.xml
new file mode 100644
index 000000000000..87c085844c38
--- /dev/null
+++ b/www-servers/shttpd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>www-servers</herd>
+</pkgmetadata>
diff --git a/www-servers/shttpd/shttpd-1.21.ebuild b/www-servers/shttpd/shttpd-1.21.ebuild
new file mode 100644
index 000000000000..520726187bbc
--- /dev/null
+++ b/www-servers/shttpd/shttpd-1.21.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/shttpd/shttpd-1.21.ebuild,v 1.1 2005/06/06 14:17:42 ka0ttic Exp $
+
+inherit eutils toolchain-funcs
+
+MY_P="${P/-/_}"
+DESCRIPTION="Small and embeddable HTTPD server with CGI support"
+HOMEPAGE="http://shttpd.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.c"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="ssl"
+
+DEPEND="ssl? ( >=dev-libs/openssl-0.9.6g )"
+
+src_unpack() {
+ mkdir ${S}
+ cp ${DISTDIR}/${MY_P}.c ${S}
+}
+
+src_compile() {
+ local opts
+ CC=$(tc-getCC)
+
+ if use ssl ; then
+ opts="-DWITH_SSL ${MY_P}.c -o ${PN} -lcrypto -lssl"
+ else
+ opts="${MY_P}.c -o ${PN}"
+ fi
+
+ echo "${CC} ${opts}"
+ ${CC} ${opts} || die "compile failure"
+}
+
+src_install() {
+ keepdir /var/log/shttpd
+ dosbin ${PN} || die
+
+ insinto /etc/xinetd.d
+ newins ${FILESDIR}/${PN}.xinetd ${PN} || die
+ newinitd ${FILESDIR}/${PN}.initd ${PN} || die
+ newconfd ${FILESDIR}/${PN}.confd ${PN} || die
+}
+
+pkg_postinst() {
+ enewgroup shttpd
+ enewuser shttpd -1 /bin/false /var/www/localhost/htdocs shttpd
+ einfo
+ einfo "You can run shttpd standalone or in xinetd mode."
+ einfo "Please read http://shttpd.sourceforge.net/ for more info!"
+ einfo
+}