wok-current annotate lighttpd/receipt @ rev 15575

Up lighttpd (1.4.33)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 29 08:43:20 2013 +0000 (2013-11-29)
parents 2a5cc8208d36
children 02e59bb0cae1
rev   line source
pankso@24 1 # SliTaz package receipt.
pankso@24 2
pankso@24 3 PACKAGE="lighttpd"
pascal@15575 4 VERSION="1.4.33"
pankso@211 5 CATEGORY="network"
pankso@24 6 SHORT_DESC="Fast and light HTTP Web server."
pankso@24 7 MAINTAINER="pankso@slitaz.org"
pascal@15379 8 LICENSE="BSD"
pankso@639 9 SUGGESTED="lighttpd-modules php perl python"
pankso@24 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@24 11 WEB_SITE="http://www.lighttpd.net/"
pascal@4575 12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-1.4.x/$TARBALL"
slaxemulator@8894 13 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
pankso@24 14 BASE_MODULES="
pankso@24 15 access
pankso@24 16 accesslog
pankso@24 17 alias
pankso@24 18 cgi
pankso@24 19 dirlisting
pankso@24 20 indexfile
pankso@24 21 staticfile
pankso@24 22 rewrite
pankso@24 23 status
pankso@24 24 userdir"
pankso@24 25
pascal@15379 26 DEPENDS="pcre"
pascal@15379 27 BUILD_DEPENDS="pcre-dev bzip2-dev"
pascal@15379 28
pankso@24 29 # Rules to configure and make the package.
pankso@24 30 compile_rules()
pankso@24 31 {
pankso@24 32 cd $src
pascal@1516 33 if [ ! done.fastcgi_detach.patch ]; then
slaxemulator@9700 34 patch -i $stuff/fastcgi_detach.patch || return 1
pascal@1516 35 touch done.fastcgi_detach.patch
pascal@1516 36 fi
pankso@639 37 ./configure \
pankso@639 38 --enable-shared \
pankso@639 39 --disable-ipv6 \
pankso@639 40 --prefix=/usr \
pankso@639 41 --libdir=/usr/lib/lighttpd \
pankso@639 42 --mandir=/usr/share/man \
pascal@1516 43 $CONFIGURE_ARGS &&
pascal@1516 44 make &&
pankso@24 45 make DESTDIR=$PWD/_pkg install
pankso@24 46 }
pankso@24 47
pankso@24 48 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@24 49 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
pankso@24 50 genpkg_rules()
pankso@24 51 {
pankso@24 52 mkdir -p $fs/usr
pankso@4572 53 #cp -a $_pkg/usr/bin $fs/usr
pankso@24 54 cp -a $_pkg/usr/sbin $fs/usr
pankso@4572 55
pankso@24 56 # Modules.
pankso@24 57 mkdir -p $fs/usr/lib/lighttpd
pankso@24 58 for module in $BASE_MODULES
pankso@24 59 do
pankso@24 60 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
pankso@24 61 echo -n "Copying : mod_${module}.so" && status
pankso@24 62 done
pankso@4572 63
pankso@24 64 # Server root and config file.
pankso@9665 65 cp -a $stuff/var $fs
pankso@9665 66 cp -a $stuff/etc $fs
pankso@119 67 chown -R 0.0 $fs/var/www
pankso@119 68 chown -R 0.0 $fs/etc
pankso@4572 69
pankso@24 70 # Logs directory.
pankso@24 71 mkdir -p $fs/var/log/lighttpd
pankso@24 72 chown 80.80 $fs/var/log/lighttpd
pankso@24 73 }
pankso@24 74
pankso@24 75 # Pre and post install commands for Tazpkg.
pankso@24 76 # We stop the server by default in case of upgarde.
pankso@24 77 pre_install()
pankso@24 78 {
pankso@24 79 echo "Processing pre-install commands..."
pascal@1204 80 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
pankso@2306 81 # Backup config file.
pascal@15575 82 if [ -d $1/etc/lighttpd ]; then
pascal@15575 83 cp -a $1/etc/lighttpd $1/etc/lighttpd.bak
pankso@2306 84 fi
pankso@24 85 }
pankso@24 86 post_install()
pankso@24 87 {
pankso@24 88 echo "Processing post-install commands..."
pankso@2306 89 # Restore original config.
pascal@15575 90 if [ -d $1/etc/lighttpd.bak ]; then
pascal@15575 91 rm -rf $1/etc/lighttpd
pascal@15575 92 mv $1/etc/lighttpd.bak $1/etc/lighttpd
pankso@2306 93 fi
pankso@24 94 # Just in case.
pascal@1905 95 chown www.www $1/var/log/$PACKAGE
pascal@1905 96 if [ -z "$1" ]; then
pankso@10811 97 for i in apache httpd; do
pascal@1905 98 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
pascal@1905 99 done
pascal@1905 100 /etc/init.d/$PACKAGE start
pascal@1905 101 fi
pankso@24 102 }