#!/bin/bash # # fcgi.SlackBuild is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or any later version. # # fcgi.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # # default settings PACKAGE="fcgi" PACKAGE_EXT="gz" VERSION=${VERSION:=2.4.0} BUILD=${BUILD:=2} if [ -f ~/.slackbuildrc ]; then . ~/.slackbuildrc elif [ -f ../../runtime/slackbuildrc ]; then . ../../runtime/slackbuildrc fi check_required SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="http://www.fastcgi.com/dist/$SRC" get_source $SRC $URL unpack_source $SRC $PACKAGE-$VERSION # Fix compilation by recent gcc (thanks to Debian) cat $CWD/fcgi-2.4.0-gcc44-fix-include.patch | patch -p1 # Fix type of socket ClientData (thanks to Gentoo) cat $CWD/fcgi-2.4.0-clientdata-pointer.patch | patch -p1 # Fix image paths in html docs (thanks to Gentoo) cat $CWD/fcgi-2.4.0-html-updates.patch | patch -p1 export AUTOMAKE="automake --foreign" libtoolize --copy --force # Create some empty files to make autoreconf happy touch INSTALL NEWS AUTHORS ChangeLog COPYING autoreconf -vi CFLAGS=$SLKCFLAGS \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ --disable-static \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --build=$ARCH-slackware-linux || exit 1 make || exit 2 make DESTDIR=$PKG install mkdir -p $PKG/usr/man/man{1,3} cp -a doc/*.1 $PKG/usr/man/man1/ cp -a doc/*.3 $PKG/usr/man/man3/ # DOCS mkdir -p $DOCS cp -a LICENSE.TERMS README doc/*.html doc/*.htm images/ \ doc/fastcgi-prog-guide/ doc/fastcgi-whitepaper/ \ $DOCS chmod 644 $DOCS/LICENSE.TERMS $DOCS/README $DOCS/fastcgi-prog-guide/* fixup_package $PKG # Clean up the extra stuff: set +u if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$PACKAGE-$VERSION rm -rf $PKG fi