Import ports/www/fcgi-cgi, tweaks/ok landry@

fcgi-cgi is a wrapper around CGI applications to support running them under
FastCGI for use with webservers such as nginx and lighttpd 2.x which do not
support running cgi scripts/binaries directly.
This commit is contained in:
sthen 2012-03-27 14:21:26 +00:00
parent 63206f3891
commit b674061244
6 changed files with 76 additions and 0 deletions

40
www/fcgi-cgi/Makefile Normal file
View File

@ -0,0 +1,40 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $
COMMENT= wrapper to run CGI applications via FastCGI
DISTNAME= fcgi-cgi-0.1.8
CATEGORIES= www
HOMEPAGE= http://nginx.localdomain.pl/wiki/FcgiWrap
# MIT
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += c ev glib-2.0
MASTER_SITES= http://cgit.lighttpd.net/fcgi-cgi.git/snapshot/ \
http://spacehopper.org/mirrors/
SEPARATE_BUILD= simple
RUN_DEPENDS= www/spawn-fcgi
LIB_DEPENDS= devel/libev \
devel/glib2
MODULES= devel/gettext
CONFIGURE_STYLE= autoconf automake
AUTOCONF_VERSION= 2.68
AUTOMAKE_VERSION= 1.11
post-patch:
cd ${WRKSRC}; AUTOCONF_VERSION=${AUTOCONF_VERSION} \
AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh
CONFIGURE_ARGS= CPPFLAGS="-I${LOCALBASE}/include ${CPPFLAGS}" \
LDFLAGS="-lm -L${LOCALBASE}/lib ${LDFLAGS}"
.include <bsd.port.mk>

5
www/fcgi-cgi/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (fcgi-cgi-0.1.8.tar.gz) = G4fqh/ZatLbdmPkkotqkGA==
RMD160 (fcgi-cgi-0.1.8.tar.gz) = 5Ezt4CrNHBjdcJKn3x0xA2wciqk=
SHA1 (fcgi-cgi-0.1.8.tar.gz) = I6dcEzvnB1yh/6YLFhDB8eXOWYk=
SHA256 (fcgi-cgi-0.1.8.tar.gz) = aOpA/9NpQEUUVRt3DLUrTpC8RWy59Hx+Ddm06q+21Nc=
SIZE (fcgi-cgi-0.1.8.tar.gz) = 14041

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-fastcgi_c,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $
--- fastcgi.c.orig Mon Feb 6 13:28:38 2012
+++ fastcgi.c Mon Feb 6 13:28:45 2012
@@ -5,6 +5,7 @@
#include "fastcgi.h"
+#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <sys/socket.h>

3
www/fcgi-cgi/pkg/DESCR Normal file
View File

@ -0,0 +1,3 @@
fcgi-cgi is a wrapper around CGI applications to support running them under
FastCGI for use with webservers such as nginx and lighttpd 2.x which do not
support running cgi scripts/binaries directly.

4
www/fcgi-cgi/pkg/PLIST Normal file
View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $
@bin bin/fcgi-cgi
@man man/man1/fcgi-cgi.1
@rcscript ${RCDIR}/fcgi_cgi

13
www/fcgi-cgi/pkg/fcgi_cgi.rc Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
#
# $OpenBSD: fcgi_cgi.rc,v 1.1.1.1 2012/03/27 14:21:26 sthen Exp $
daemon="${TRUEPREFIX}/bin/spawn-fcgi"
daemon_flags="-a 127.0.0.1 -p 9001 -u www -U www -c /var/www -- ${TRUEPREFIX}/bin/fcgi-cgi"
pexp="${TRUEPREFIX}/bin/fcgi-cgi"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_cmd $1