summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Herbert <stuart@gentoo.org>2004-06-26 23:56:56 +0000
committerStuart Herbert <stuart@gentoo.org>2004-06-26 23:56:56 +0000
commit67732d368fe828a6c7204f1af7d08c1d5b50a2dd (patch)
treecb7ae91fcb5d9432bcd1dae26a4c2f76a6540c7d /net-www/spawn-fcgi
parentremove legacy ruby-1.6 DEPENDs, no vim version in the tree has problems with 1.8 (diff)
downloadhistorical-67732d368fe828a6c7204f1af7d08c1d5b50a2dd.tar.gz
historical-67732d368fe828a6c7204f1af7d08c1d5b50a2dd.tar.bz2
historical-67732d368fe828a6c7204f1af7d08c1d5b50a2dd.zip
Initial import
Diffstat (limited to 'net-www/spawn-fcgi')
-rw-r--r--net-www/spawn-fcgi/ChangeLog12
-rw-r--r--net-www/spawn-fcgi/Manifest6
-rw-r--r--net-www/spawn-fcgi/files/digest-spawn-fcgi-1.1.01
-rw-r--r--net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.conf35
-rw-r--r--net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.initd53
-rw-r--r--net-www/spawn-fcgi/metadata.xml8
-rw-r--r--net-www/spawn-fcgi/spawn-fcgi-1.1.0.ebuild35
7 files changed, 150 insertions, 0 deletions
diff --git a/net-www/spawn-fcgi/ChangeLog b/net-www/spawn-fcgi/ChangeLog
new file mode 100644
index 000000000000..9223c52e4419
--- /dev/null
+++ b/net-www/spawn-fcgi/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-www/spawn-fcgi
+# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/spawn-fcgi/ChangeLog,v 1.1 2004/06/26 23:56:56 stuart Exp $
+
+*spawn-fcgi-1.1.0 (27 Jun 2004)
+
+ 27 Jun 2004; Stuart Herbert <stuart@gentoo.org> +metadata.xml,
+ +files/spawn-fcgi-1.1.0.conf, +files/spawn-fcgi-1.1.0.initd,
+ +spawn-fcgi-1.1.0.ebuild:
+ Initial import; based on lighttpd ebuild by Boris Wachtmeister
+ <sirro@nurfuerspam.de>; see bug #55049
+
diff --git a/net-www/spawn-fcgi/Manifest b/net-www/spawn-fcgi/Manifest
new file mode 100644
index 000000000000..6ede50960319
--- /dev/null
+++ b/net-www/spawn-fcgi/Manifest
@@ -0,0 +1,6 @@
+MD5 8faf929e5f3df160dbe22f62a1aaf992 spawn-fcgi-1.1.0.ebuild 957
+MD5 ca3e7ca5f44387f69735c2b62e66f28a ChangeLog 505
+MD5 3d182d43f7f0341a9a42f96694f04e72 metadata.xml 224
+MD5 177bc4801d074bf86a89089bf4447fc0 files/digest-spawn-fcgi-1.1.0 67
+MD5 8223b103a8f66ecdd0f287c6538c7c9a files/spawn-fcgi-1.1.0.conf 1086
+MD5 e6cd43c3510de885db92846dca1ed2bd files/spawn-fcgi-1.1.0.initd 1243
diff --git a/net-www/spawn-fcgi/files/digest-spawn-fcgi-1.1.0 b/net-www/spawn-fcgi/files/digest-spawn-fcgi-1.1.0
new file mode 100644
index 000000000000..1ba82f23abab
--- /dev/null
+++ b/net-www/spawn-fcgi/files/digest-spawn-fcgi-1.1.0
@@ -0,0 +1 @@
+MD5 c0c298132db154008ea138f3a0329bb2 spawn-fcgi-1.1.0.tar.gz 78878
diff --git a/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.conf b/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.conf
new file mode 100644
index 000000000000..71a6bc49e268
--- /dev/null
+++ b/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.conf
@@ -0,0 +1,35 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.conf,v 1.1 2004/06/26 23:56:56 stuart Exp $
+
+# Configuration file for the FCGI-Part of /etc/init.d/lighttpd
+
+## Set this to "yes" to enable SPAWNFCGI
+ENABLE_SPAWNFCGI="yes"
+
+## ABSOLUTE path to the spawn-fcgi binary
+SPAWNFCGI="/usr/sbin/spawn-fcgi"
+
+## ABSOLUTE path to the PHP binary
+FCGIPROGRAM="/usr/bin/php-cgi"
+
+## bind to tcp-port on localhost
+FCGIPORT="1026"
+
+## number of PHP childs to spawn
+PHP_FCGI_CHILDREN=5
+
+## number of request server by a single php-process until is will be restarted
+PHP_FCGI_MAX_REQUESTS=1000
+
+## IP adresses where PHP should access server connections from
+FCGI_WEB_SERVER_ADDRS="127.0.0.1"
+
+# allowed environment variables sperated by spaces
+ALLOWED_ENV="PATH USER"
+# do NOT change line below
+ALLOWED_ENV="$ALLOWED_ENV PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS"
+
+## if this script is run as root switch to the following user
+USERID=lighttpd
+GROUPID=nogroup
diff --git a/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.initd b/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.initd
new file mode 100644
index 000000000000..6fd8d8c5da8c
--- /dev/null
+++ b/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/spawn-fcgi/files/spawn-fcgi-1.1.0.initd,v 1.1 2004/06/26 23:56:56 stuart Exp $
+
+SPAWNFCGI_PID="/var/run/spawn-fcgi.pid"
+SPAWNFCGI_CONF="/etc/conf.d/spawn-fcgi.conf"
+
+if [ -r ${SPAWNFCGI_CONF} ]; then
+ . ${SPAWNFCGI_CONF}
+fi
+
+depend() {
+ need net
+}
+
+start() {
+ local my_end
+
+ ebegin "Starting spawn-fcgi"
+ export PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS
+
+ EX="${SPAWNFCGI} -p ${FCGIPORT} -f ${FCGIPROGRAM} -u ${USERID} \
+ -g ${GROUPID} -C ${PHP_FCGI_CHILDREN}"
+
+ # copy the allowed environment variables
+ unset E
+ for i in ${ALLOWED_ENV}; do
+ E="${E} ${i}=${!i}"
+ done
+
+ # clean environment and set up a new one
+ env - ${E} ${EX} 2>${SPAWNFCGI_PID}
+ my_end=$?
+ if [ "$my_end" != "0" ]; then
+ [ -f ${SPAWNFCGI_PID} ] && rm -f ${SPAWNFCGI_PID}
+ eend $my_end
+ fi
+
+ #extract parent-process-id and write it back to the file
+ FCGI_PPID=`cat ${SPAWNFCGI_PID} | cut -d':' -f4`
+ echo ${FCGI_PPID} > ${SPAWNFCGI_PID}
+ eend 0
+}
+
+stop() {
+ ebegin "Stopping spawn-fcgi"
+ kill `cat ${SPAWNFCGI_PID}`
+ if [ -w ${SPAWNFCGI_PID} ]; then
+ rm ${SPAWNFCGI_PID};
+ fi
+ eend 0
+}
diff --git a/net-www/spawn-fcgi/metadata.xml b/net-www/spawn-fcgi/metadata.xml
new file mode 100644
index 000000000000..0d59c319c3eb
--- /dev/null
+++ b/net-www/spawn-fcgi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>webapps</herd>
+<maintainer>
+ <email>web-apps@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-www/spawn-fcgi/spawn-fcgi-1.1.0.ebuild b/net-www/spawn-fcgi/spawn-fcgi-1.1.0.ebuild
new file mode 100644
index 000000000000..bbabbdf3ea2d
--- /dev/null
+++ b/net-www/spawn-fcgi/spawn-fcgi-1.1.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-www/spawn-fcgi/spawn-fcgi-1.1.0.ebuild,v 1.1 2004/06/26 23:56:56 stuart Exp $
+
+inherit eutils
+
+URI_ROOT="http://jan.kneschke.de/projects/lighttpd/download/"
+DESCRIPTION="fast-cgi server for php and lighttpd"
+HOMEPAGE="http://jan.kneschke.de/projects/lighttpd/"
+SRC_URI="$URI_ROOT/${P}.tar.gz"
+LICENSE="QPL-1.0"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+DEPEND="virtual/glibc
+ >=dev-libs/libpcre-3.1
+ >=sys-libs/zlib-1.1"
+RDEPEND=">=sys-libs/zlib-1.1
+ >=sys-devel/libtool-1.4
+ >=dev-php/php-cgi-4.3.0"
+S=${WORKDIR}/${P}
+
+src_compile() {
+ econf || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ insinto /etc/conf.d
+ newins ${FILESDIR}/${PN}-${PV}.conf ${PN}.conf
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/${PN}-${PV}.initd ${PN}
+ dodoc README doc/handbook.txt
+}