aboutsummaryrefslogtreecommitdiff
path: root/network/lighttpd/lighttpd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/lighttpd/lighttpd.SlackBuild')
-rw-r--r--network/lighttpd/lighttpd.SlackBuild36
1 files changed, 23 insertions, 13 deletions
diff --git a/network/lighttpd/lighttpd.SlackBuild b/network/lighttpd/lighttpd.SlackBuild
index 2d88a0d794a0b..cf491dea72482 100644
--- a/network/lighttpd/lighttpd.SlackBuild
+++ b/network/lighttpd/lighttpd.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=lighttpd
-VERSION=1.4.20
+VERSION=1.4.22
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -38,15 +38,15 @@ OUTPUT=${OUTPUT:-/tmp}
LIGHTTPD_USER=${LIGHTTPD_USER:-lighttpd}
LIGHTTPD_GROUP=${LIGHTTPD_GROUP:-lighttpd}
-if ! grep ^$LIGHTTPD_GROUP: /etc/group > /dev/null 2>&1; then
- echo "$0: Error: LIGHTTP group ($LIGHTTPD_GROUP) doesn't exist."
- echo "$0: Try creating one with: groupadd -g 208 $LIGHTTPD_GROUP"
+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
-if ! grep ^$LIGHTTPD_USER: /etc/passwd > /dev/null 2>&1; then
- echo "$0: Error: LIGHTTP user ($LIGHTTPD_USER) doesn't exist."
- echo "$0: Try creating one with: useradd -u 208 -g $LIGHTTPD_GROUP -d /var/www $LIGHTTPD_USER"
+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
fi
@@ -64,7 +64,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -79,7 +79,8 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--with-pcre \
--with-attr \
- --with-openssl
+ --with-openssl \
+ --build=$ARCH-slackware-linux
make
make install-strip DESTDIR=$PKG
@@ -87,12 +88,23 @@ make install-strip DESTDIR=$PKG
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
+touch $PKG/var/log/lighttpd/{access,error}.log.new
+
+# We'll create this, even though it will be empty by default, because
+# our suggested fastcgi path will use this as the socket directory
+# instead of /tmp (to avoid symlink attacks and such)
+# This is also the default directory used for the pid file now
+# (configurable in lighttpd.conf)
+mkdir -p $PKG/var/run/lighttpd
+chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/run/lighttpd
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
install -D -m 0644 $CWD/$PRGNAM.logrotate $PKG/etc/logrotate.d/lighttpd.new
+chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/log/lighttpd/
+chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/cache/lighttpd
+
( 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
@@ -102,14 +114,12 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog 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
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
-chown $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/log/lighttpd/{access,error}.log
-chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/cache/lighttpd
-
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz