From 2b34d3414d879e661f79b3b0202a03dc1aaaf6db Mon Sep 17 00:00:00 2001 From: Paul Wisehart Date: Thu, 13 May 2010 00:37:03 +0200 Subject: network/lighttpd: Updated for version 1.4.25 --- network/lighttpd/lighttpd.SlackBuild | 38 +++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'network/lighttpd/lighttpd.SlackBuild') diff --git a/network/lighttpd/lighttpd.SlackBuild b/network/lighttpd/lighttpd.SlackBuild index cf491dea72..7cd2044b60 100644 --- a/network/lighttpd/lighttpd.SlackBuild +++ b/network/lighttpd/lighttpd.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # -# Slackware build script for lighttpd +# Slackware build script for lighttpd # # Copyright (c) 2007 Daniel de Kok # All rights reserved. @@ -23,12 +23,12 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=lighttpd -VERSION=1.4.22 +VERSION=1.4.25 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -CWD=$(pwd) +CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -38,24 +38,30 @@ OUTPUT=${OUTPUT:-/tmp} LIGHTTPD_USER=${LIGHTTPD_USER:-lighttpd} LIGHTTPD_GROUP=${LIGHTTPD_GROUP:-lighttpd} -if ! grep -q ^$LIGHTTPD_GROUP: /etc/group 2>/dev/null ; then - echo " Error: LIGHTTPD group ($LIGHTTPD_GROUP) doesn't exist." - echo " Try creating one with: groupadd -g 208 $LIGHTTPD_GROUP" - exit 1 -fi +bailout() { + printf " The $LIGHTTPD_GROUP group and/or $LIGHTTPD_USER user account + does not exist. You should create it/them with the following: + groupadd -g 208 $LIGHTTPD_GROUP + useradd -u 208 -g $LIGHTTPD_GROUP -d /var/www $LIGHTTPD_USER\n" +} -if ! grep -q ^$LIGHTTPD_USER: /etc/passwd 2>/dev/null ; then - echo " Error: LIGHTTPD user ($LIGHTTPD_USER) doesn't exist." - echo " Try creating one with: useradd -u 208 -g $LIGHTTPD_GROUP -d /var/www $LIGHTTPD_USER" - exit 1 +if ! grep -q ^$LIGHTTPD_GROUP: /etc/group 2>/dev/null ; then + bailout + exit 1 +elif ! grep -q ^$LIGHTTPD_USER: /etc/passwd 2>/dev/null ; then + bailout + exit 1 fi 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" fi set -e # Exit on most errors @@ -64,7 +70,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -73,7 +79,7 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ - --libdir=/usr/lib/$PRGNAM \ + --libdir=/usr/lib${LIBDIRSUFFIX}/$PRGNAM \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ @@ -111,7 +117,7 @@ chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/cache/lighttpd ) mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README doc/* \ +cp -a AUTHORS COPYING INSTALL NEWS README doc/* \ $PKG/usr/doc/$PRGNAM-$VERSION rm -f $PKG/usr/doc/$PRGNAM-$VERSION/Makefile* cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE @@ -122,4 +128,4 @@ 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.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} -- cgit v1.2.3