diff options
author | vanilla <vanilla@FreeBSD.org> | 2009-04-13 15:15:00 +0800 |
---|---|---|
committer | vanilla <vanilla@FreeBSD.org> | 2009-04-13 15:15:00 +0800 |
commit | fee8bcaae5354b8ed2a201cd40e61c47330c2bf3 (patch) | |
tree | f8a7fb8a864b571c39cd63f03e0e92d75fb848e1 /www/spawn-fcgi | |
parent | 80fd1cc66f97f4777e644f5eea4a7a3008891e91 (diff) | |
download | freebsd-ports-gnome-fee8bcaae5354b8ed2a201cd40e61c47330c2bf3.tar.gz freebsd-ports-gnome-fee8bcaae5354b8ed2a201cd40e61c47330c2bf3.tar.zst freebsd-ports-gnome-fee8bcaae5354b8ed2a201cd40e61c47330c2bf3.zip |
Add spawn-fcgi 1.6.0, spawn-fcgi is used to spawn fastcgi applications.
PR: ports/133665
Submitted by: genserg at hotmail.com
Diffstat (limited to 'www/spawn-fcgi')
-rw-r--r-- | www/spawn-fcgi/Makefile | 32 | ||||
-rw-r--r-- | www/spawn-fcgi/distinfo | 3 | ||||
-rw-r--r-- | www/spawn-fcgi/files/spawn-fcgi.sh.in | 71 | ||||
-rw-r--r-- | www/spawn-fcgi/pkg-descr | 1 |
4 files changed, 107 insertions, 0 deletions
diff --git a/www/spawn-fcgi/Makefile b/www/spawn-fcgi/Makefile new file mode 100644 index 000000000000..91abaaa05d5b --- /dev/null +++ b/www/spawn-fcgi/Makefile @@ -0,0 +1,32 @@ +# New ports collection makefile for: spawn-fcgi +# Date created: 17 Mar 2009 +# Whom: genserg@hotmail.com +# +# $FreeBSD$ +# + +PORTNAME= spawn-fcgi +PORTVERSION= 1.6.0 +CATEGORIES= www +MASTER_SITES= http://www.lighttpd.net/download/ \ + http://mirrors.cat.pdx.edu/lighttpd/ + +MAINTAINER= genserg@hotmail.com +COMMENT= spawn-fcgi is used to spawn fastcgi applications + +USE_BZIP2= yes +GNU_CONFIGURE= yes +USE_RC_SUBR= spawn-fcgi.sh + +CFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +MAN1= spawn-fcgi.1 + +PLIST_FILES= bin/spawn-fcgi + +.include <bsd.port.pre.mk> + +SUB_LIST+= REQUIRE="DAEMON" + +.include <bsd.port.post.mk> diff --git a/www/spawn-fcgi/distinfo b/www/spawn-fcgi/distinfo new file mode 100644 index 000000000000..c17e148903b3 --- /dev/null +++ b/www/spawn-fcgi/distinfo @@ -0,0 +1,3 @@ +MD5 (spawn-fcgi-1.6.0.tar.bz2) = 06fcafdb87aeb5dc9b8f0f91632ae748 +SHA256 (spawn-fcgi-1.6.0.tar.bz2) = 8321de784b3c4d3108d49795029aae2acdc6b2eee8fce7c2837989762f9e04f3 +SIZE (spawn-fcgi-1.6.0.tar.bz2) = 69691 diff --git a/www/spawn-fcgi/files/spawn-fcgi.sh.in b/www/spawn-fcgi/files/spawn-fcgi.sh.in new file mode 100644 index 000000000000..c866331c810f --- /dev/null +++ b/www/spawn-fcgi/files/spawn-fcgi.sh.in @@ -0,0 +1,71 @@ +#!/bin/sh +# + +# PROVIDE: spawn_fcgi +# REQUIRE: %%REQUIRE%% +# BEFORE: LOGIN +# KEYWORD: shutdown + +. %%RC_SUBR%% + +name="spawn_fcgi" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${spawn_fcgi_enable="NO"} +: ${spawn_fcgi_app=""} +: ${spawn_fcgi_pidfile="/var/run/spawn-fcgi.pid"} +: ${spawn_fcgi_user="www"} +: ${spawn_fcgi_group="www"} +: ${spawn_fcgi_bindaddr="127.0.0.1"} +: ${spawn_fcgi_bindport="9000"} +: ${spawn_fcgi_children="5"} +: ${spawn_fcgi_max_requests="1000"} +: ${spawn_fcgi_allowed_env=""} + + +command="/usr/local/bin/spawn-fcgi" +command_args="-u ${spawn_fcgi_user} -g ${spawn_fcgi_group} -a ${spawn_fcgi_bindaddr} -p ${spawn_fcgi_bindport} -P ${spawn_fcgi_pidfile} -- ${spawn_fcgi_app}" +pidfile=${spawn_fcgi_pidfile} + +_allowed_env="PATH USER PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS FCGI_WEB_SERVER_ADDRS" +_allowed_env="${_allowed_env} ${spawn_fcgi_allowed_env}" + +start_precmd="${name}_start_precmd" +stop_cmd="${name}_stop_cmd" +stop_postcmd="${name}_stop_postcmd" + +spawn_fcgi_start_precmd() +{ + touch ${pidfile} + chown ${spawn_fcgi_user}:${spawn_fcgi_group} ${pidfile} + export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin + export PHP_FCGI_CHILDREN=${spawn_fcgi_children} + export PHP_FCGI_MAX_REQUESTS=${spawn_fastcgi_max_requests} + export USER=${spawn_fcgi_user} + E= + for i in ${_allowed_env}; do + eval _val="\$$i" + if [ "${_val}_x" != "_x" ]; then + eval _add="$i=$_val" + E="${E} ${_add}" + fi + done + command="env - ${E} ${command}" +} + +spawn_fcgi_stop_cmd() +{ + read rc_pid < ${pidfile} + kill ${sig_stop} ${rc_pid} +} + +spawn_fcgi_stop_postcmd() +{ + rm -f ${pidfile} +} + +load_rc_config $name + +run_rc_command "$1" diff --git a/www/spawn-fcgi/pkg-descr b/www/spawn-fcgi/pkg-descr new file mode 100644 index 000000000000..ef4aad7982ec --- /dev/null +++ b/www/spawn-fcgi/pkg-descr @@ -0,0 +1 @@ +WWW: http://www.lighttpd.net/ |