network/lighttpd: Updated for version 1.4.18

This commit is contained in:
Daniel de Kok 2010-05-11 19:45:54 +02:00 committed by Robby Workman
parent 636c1c2483
commit 2e4da0964a
5 changed files with 19 additions and 24 deletions

View File

@ -33,4 +33,3 @@ to stop lighttpd on system shutdown.
if [ -x /etc/rc.d/rc.lighttpd ]; then
/etc/rc.d/rc.lighttpd stop
fi

View File

@ -1,9 +1,5 @@
#!/bin/sh
LIGHTTPD_USER=lighttpd
LIGHTTPD_GROUP=lighttpd
LIGHTTPD_HOME=/var/www
config() {
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"

View File

@ -28,18 +28,17 @@
set -e
PRGNAM=lighttpd
VERSION=1.4.15
VERSION=1.4.18
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=`pwd`
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
## lighttpd user & group. *MUST* exist before package creation
# See http://slackbuilds.org/uid_gid.txt for current recomendations.
# If you change this, please update httpd.conf.diff in patches directory.
LIGHTTPD_USER=lighttpd
LIGHTTPD_GROUP=lighttpd
@ -55,9 +54,6 @@ if ! grep ^$LIGHTTPD_USER: /etc/passwd > /dev/null 2>&1; then
exit 1
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
@ -80,6 +76,7 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib/$PRGNAM \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--with-pcre \
--with-attr \
--with-openssl
@ -91,8 +88,6 @@ mkdir -p $PKG/var/{cache,log}/$PRGNAM
chmod 0700 $PKG/var/cache/lighttpd
mkdir -p $PKG/var/www/htdocs-lighttpd
touch $PKG/var/log/lighttpd/{access,error}.log
mv $PKG/usr/share/man $PKG/usr/
rmdir $PKG/usr/share
install -D -m 0755 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
install -D -m 0644 $CWD/$PRGNAM.conf $PKG/etc/$PRGNAM/$PRGNAM.conf.new
@ -100,7 +95,7 @@ install -D -m 0644 $CWD/$PRGNAM.logrotate $PKG/etc/logrotate.d/lighttpd.new
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in `find . -type l` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View File

@ -1,8 +1,8 @@
PRGNAM="lighttpd"
VERSION="1.4.15"
VERSION="1.4.18"
HOMEPAGE="http://www.lighttpd.net/"
DOWNLOAD="http://www.lighttpd.net/download/lighttpd-1.4.15.tar.gz"
MD5SUM="d2ceaaf242b2b3593ff4d8222d543649"
DOWNLOAD="http://www.lighttpd.net/download/lighttpd-1.4.18.tar.gz"
MD5SUM="26f98dddf9d8c0775221b800986003ee"
MAINTAINER="Daniel de Kok"
EMAIL="danieldk@pobox.com"
APPROVED="BP{k}"
APPROVED="rworkman"

View File

@ -1,6 +1,5 @@
#!/bin/sh
# Copyright (c) 2007, Daniel de Kok <moc.mikciat@leinad>
# Modified by Martin Lefebvre <dadexter@sekurity.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -25,11 +24,15 @@ LIGHTTPD=/usr/sbin/lighttpd
PIDFILE=/var/run/lighttpd.pid
LIGHTTPD_OPTIONS="-f /etc/lighttpd/lighttpd.conf"
is_pidof() {
local STATE=$(ps -p $1 -o cmd= | grep "$2" > /dev/null ; echo $?)
return $STATE
}
lighttpd_start() {
echo "Starting lighttpd: $LIGHTTPD"
if [ -r $PIDFILE ]; then
echo "Already running or stale PID file"
echo "If it's not running, remove $PIDFILE"
if [ -r $PIDFILE ] && is_pidof $(cat $PIDFILE) lighttpd ; then
echo "Already running!"
return
fi
$LIGHTTPD $LIGHTTPD_OPTIONS
@ -37,9 +40,11 @@ lighttpd_start() {
lighttpd_stop() {
echo "Stopping lighttpd: $LIGHTTPD"
if [ -r $PIDFILE ]; then
kill -3 `cat $PIDFILE`
if [ -r $PIDFILE ] && is_pidof $(cat $PIDFILE) lighttpd ; then
kill $(cat $PIDFILE)
rm -f $PIDFILE
else
echo "Not running!"
fi
}