network/mod_fcgid: Added (FastCGI interface module for Apache 2).

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Marcel Saegebarth 2013-10-29 21:40:57 +01:00 committed by Robby Workman
parent 75ccbfff1e
commit 4c6a6ad71c
6 changed files with 163 additions and 0 deletions

6
network/mod_fcgid/README Normal file
View file

@ -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.

View file

@ -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

View file

@ -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}

View file

@ -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>

View file

@ -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"

View file

@ -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: