summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorMarcel Saegebarth <marc@mos6581.de>2013-10-29 21:40:57 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-10-29 20:12:30 -0500
commit4c6a6ad71cccc2976b98748c0f6fa59a0bb2e7bd (patch)
tree2e3e1c0da6250551e657987656d191c8ebb29635 /network
parent75ccbfff1e53f83101f731c5213d4763ff5f3bea (diff)
downloadslackbuilds-4c6a6ad71cccc2976b98748c0f6fa59a0bb2e7bd.tar.gz
network/mod_fcgid: Added (FastCGI interface module for Apache 2).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network')
-rw-r--r--network/mod_fcgid/README6
-rw-r--r--network/mod_fcgid/doinst.sh14
-rw-r--r--network/mod_fcgid/mod_fcgid.SlackBuild99
-rw-r--r--network/mod_fcgid/mod_fcgid.conf15
-rw-r--r--network/mod_fcgid/mod_fcgid.info10
-rw-r--r--network/mod_fcgid/slack-desc19
6 files changed, 163 insertions, 0 deletions
diff --git a/network/mod_fcgid/README b/network/mod_fcgid/README
new file mode 100644
index 0000000000..dbe2edc51c
--- /dev/null
+++ b/network/mod_fcgid/README
@@ -0,0 +1,6 @@
+mod_fcgid is a high performance alternative to mod_cgi or mod_cgid,
+which starts a sufficient number instances of the CGI program to
+handle concurrent requests, and these programs remain running to
+handle further incoming requests. It is favored by the PHP
+developers, for example, as a preferred alternative to running
+mod_php in-process, delivering very similar performance.
diff --git a/network/mod_fcgid/doinst.sh b/network/mod_fcgid/doinst.sh
new file mode 100644
index 0000000000..3ec2c63634
--- /dev/null
+++ b/network/mod_fcgid/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/httpd/mod_fcgid.conf.new
diff --git a/network/mod_fcgid/mod_fcgid.SlackBuild b/network/mod_fcgid/mod_fcgid.SlackBuild
new file mode 100644
index 0000000000..e5a832429d
--- /dev/null
+++ b/network/mod_fcgid/mod_fcgid.SlackBuild
@@ -0,0 +1,99 @@
+#!/bin/sh
+
+# SlackBuild script for "mod_fcgid".
+
+# Copyright 2009-2013 Marcel Saegebarth <marc@mos6581.de>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=mod_fcgid
+VERSION=2.3.7
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure.apxs
+make
+make install exp_manualdir=/var/www/htdocs/manual DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/etc/httpd
+sed "s%@baselibdir@%lib${LIBDIRSUFFIX}%" $CWD/mod_fcgid.conf > \
+ $PKG/etc/httpd/mod_fcgid.conf.new
+
+# remove an empty directory
+rmdir $PKG/etc/httpd/original
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ *-FCGID \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/network/mod_fcgid/mod_fcgid.conf b/network/mod_fcgid/mod_fcgid.conf
new file mode 100644
index 0000000000..0623760753
--- /dev/null
+++ b/network/mod_fcgid/mod_fcgid.conf
@@ -0,0 +1,15 @@
+#
+# mod_fcgid - FastCGI interface module for Apache 2
+#
+
+# Load the PHP module:
+LoadModule fcgid_module @baselibdir@/httpd/modules/mod_fcgid.so
+
+# Tell Apache to feed all *.php files through PHP.
+<IfModule fcgid_module>
+ <Location />
+ AddHandler fcgid-script .php
+ Options +ExecCGI
+ FcgidWrapper /usr/bin/php-cgi .php
+ </Location>
+</IfModule>
diff --git a/network/mod_fcgid/mod_fcgid.info b/network/mod_fcgid/mod_fcgid.info
new file mode 100644
index 0000000000..bd21d4f460
--- /dev/null
+++ b/network/mod_fcgid/mod_fcgid.info
@@ -0,0 +1,10 @@
+PRGNAM="mod_fcgid"
+VERSION="2.3.7"
+HOMEPAGE="https://httpd.apache.org/mod_fcgid/"
+DOWNLOAD="https://archive.apache.org/dist/httpd/mod_fcgid/mod_fcgid-2.3.7.tar.gz"
+MD5SUM="00644cbe00321e6085e1b9a751a6506e"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Marcel Saegebarth"
+EMAIL="marc@mos6581.de"
diff --git a/network/mod_fcgid/slack-desc b/network/mod_fcgid/slack-desc
new file mode 100644
index 0000000000..cbf41c0872
--- /dev/null
+++ b/network/mod_fcgid/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+mod_fcgid: mod_fcgid (FastCGI interface module for Apache 2)
+mod_fcgid:
+mod_fcgid: mod_fcgid is a high performance alternative to mod_cgi or mod_cgid,
+mod_fcgid: which starts a sufficient number instances of the CGI program to
+mod_fcgid: handle concurrent requests, and these programs remain running to
+mod_fcgid: handle further incoming requests. It is favored by the PHP
+mod_fcgid: developers, for example, as a preferred alternative to running
+mod_fcgid: mod_php in-process, delivering very similar performance.
+mod_fcgid:
+mod_fcgid: Homepage: https://httpd.apache.org/mod_fcgid/
+mod_fcgid: