summaryrefslogtreecommitdiff
path: root/network/lighttpd/lighttpd.SlackBuild
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2016-08-12 13:02:09 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-13 07:22:46 +0700
commit1b4b316c56021aa50684103f751b88929448add8 (patch)
tree64a04ac40afce5ae8d32f4115f1c74aa194952b5 /network/lighttpd/lighttpd.SlackBuild
parent73a5930ef0e62632e556e4d9a67b66e67973e393 (diff)
downloadslackbuilds-1b4b316c56021aa50684103f751b88929448add8.tar.gz
network/lighttpd: Refactor configuration, changed maintainer.
Added the optional dependency lua. Fixed php.ini location in README.SLACKWARE and hardcoded lighttpd user (thanks to Andrzej Telszewski) Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/lighttpd/lighttpd.SlackBuild')
-rw-r--r--network/lighttpd/lighttpd.SlackBuild23
1 files changed, 18 insertions, 5 deletions
diff --git a/network/lighttpd/lighttpd.SlackBuild b/network/lighttpd/lighttpd.SlackBuild
index 5a655d7f2b..c764ad0417 100644
--- a/network/lighttpd/lighttpd.SlackBuild
+++ b/network/lighttpd/lighttpd.SlackBuild
@@ -73,6 +73,8 @@ else
LIBDIRSUFFIX=""
fi
+if pkg-config --exists lua; then with_lua="--with-lua"; else with_lua=""; fi
+
set -e
rm -rf $PKG
@@ -99,6 +101,7 @@ CXXFLAGS="$SLKCFLAGS" \
--with-pcre \
--with-attr \
--with-openssl \
+ $with_lua \
--build=$ARCH-slackware-linux
make
@@ -119,7 +122,19 @@ mkdir -p $PKG/etc/logrotate.d
sed -e "s,@USER@,$LIGHTTPD_USER," -e "s,@GROUP@,$LIGHTTPD_GROUP," \
$CWD/conf/$PRGNAM.logrotate > $PKG/etc/logrotate.d/lighttpd.new
-install -D -m 0644 $CWD/conf/$PRGNAM.conf $PKG/etc/$PRGNAM/$PRGNAM.conf.new
+mkdir -p $PKG/etc/$PRGNAM/{conf,vhosts}.d
+sed -e "s,@USER@,$LIGHTTPD_USER," -e "s,@GROUP@,$LIGHTTPD_GROUP," \
+ $CWD/conf/$PRGNAM.conf > $PKG/etc/$PRGNAM/$PRGNAM.conf.new
+cp doc/config/modules.conf $PKG/etc/$PRGNAM/modules.conf.new
+cp doc/config/vhosts.d/vhosts.template $PKG/etc/$PRGNAM/vhosts.d
+
+mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+( cd doc/config/conf.d
+ for i in *.conf; do
+ cat $i > $PKG/etc/$PRGNAM/conf.d/$i.new
+ echo "config etc/lighttpd/conf.d/$i.new" >> $PKG/install/doinst.sh
+ done )
chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/log/lighttpd/
chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/cache/lighttpd
@@ -127,15 +142,13 @@ chown -R $LIGHTTPD_USER:$LIGHTTPD_GROUP $PKG/var/cache/lighttpd
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING INSTALL NEWS README doc/* \
+cp -a AUTHORS COPYING INSTALL NEWS README \
+ doc/scripts/*.{sh,pl} doc/*.css \
$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
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}