From 4c6a6ad71cccc2976b98748c0f6fa59a0bb2e7bd Mon Sep 17 00:00:00 2001 From: Marcel Saegebarth Date: Tue, 29 Oct 2013 21:40:57 +0100 Subject: network/mod_fcgid: Added (FastCGI interface module for Apache 2). Signed-off-by: Matteo Bernardini --- network/mod_fcgid/README | 6 +++ network/mod_fcgid/doinst.sh | 14 +++++ network/mod_fcgid/mod_fcgid.SlackBuild | 99 ++++++++++++++++++++++++++++++++++ network/mod_fcgid/mod_fcgid.conf | 15 ++++++ network/mod_fcgid/mod_fcgid.info | 10 ++++ network/mod_fcgid/slack-desc | 19 +++++++ 6 files changed, 163 insertions(+) create mode 100644 network/mod_fcgid/README create mode 100644 network/mod_fcgid/doinst.sh create mode 100644 network/mod_fcgid/mod_fcgid.SlackBuild create mode 100644 network/mod_fcgid/mod_fcgid.conf create mode 100644 network/mod_fcgid/mod_fcgid.info create mode 100644 network/mod_fcgid/slack-desc (limited to 'network') 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 +# 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. + + + AddHandler fcgid-script .php + Options +ExecCGI + FcgidWrapper /usr/bin/php-cgi .php + + 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: -- cgit v1.2.3