wok-next annotate lighttpd/receipt @ rev 15880

Add rtmpdump
author Christophe Lincoln <pankso@slitaz.org>
date Thu Feb 06 22:05:44 2014 +0100 (2014-02-06)
parents 02e59bb0cae1
children ade0043b3fac
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"
pascal@15576 10 TARBALL="$PACKAGE-$VERSION.tar.xz"
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@15576 33 sed -i '/addrs_left/d' src/mod_extforward.c
pankso@639 34 ./configure \
pankso@639 35 --enable-shared \
pankso@639 36 --disable-ipv6 \
pankso@639 37 --prefix=/usr \
pascal@15577 38 --libdir=/usr/lib/lighttpd \
pascal@15577 39 --mandir=/usr/share/man \
pascal@15577 40 $CONFIGURE_ARGS &&
pascal@1516 41 make &&
pascal@15577 42 make DESTDIR=$DESTDIR install
pankso@24 43 }
pankso@24 44
pankso@24 45 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@24 46 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
pankso@24 47 genpkg_rules()
pankso@24 48 {
pankso@24 49 mkdir -p $fs/usr
pascal@15577 50 #cp -a $install/usr/bin $fs/usr
pascal@15577 51 cp -a $install/usr/sbin $fs/usr
pankso@4572 52
pankso@24 53 # Modules.
pankso@24 54 mkdir -p $fs/usr/lib/lighttpd
pankso@24 55 for module in $BASE_MODULES
pankso@24 56 do
pascal@15577 57 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
pankso@24 58 echo -n "Copying : mod_${module}.so" && status
pankso@24 59 done
pankso@4572 60
pankso@24 61 # Server root and config file.
pankso@9665 62 cp -a $stuff/var $fs
pankso@9665 63 cp -a $stuff/etc $fs
pankso@119 64 chown -R 0.0 $fs/var/www
pankso@119 65 chown -R 0.0 $fs/etc
pankso@4572 66
pankso@24 67 # Logs directory.
pankso@24 68 mkdir -p $fs/var/log/lighttpd
pankso@24 69 chown 80.80 $fs/var/log/lighttpd
pankso@24 70 }
pankso@24 71
pankso@24 72 # Pre and post install commands for Tazpkg.
pankso@24 73 # We stop the server by default in case of upgarde.
pankso@24 74 pre_install()
pankso@24 75 {
pankso@24 76 echo "Processing pre-install commands..."
pascal@1204 77 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
pankso@2306 78 # Backup config file.
pascal@15575 79 if [ -d $1/etc/lighttpd ]; then
pascal@15575 80 cp -a $1/etc/lighttpd $1/etc/lighttpd.bak
pankso@2306 81 fi
pankso@24 82 }
pankso@24 83 post_install()
pankso@24 84 {
pankso@24 85 echo "Processing post-install commands..."
pankso@2306 86 # Restore original config.
pascal@15575 87 if [ -d $1/etc/lighttpd.bak ]; then
pascal@15575 88 rm -rf $1/etc/lighttpd
pascal@15575 89 mv $1/etc/lighttpd.bak $1/etc/lighttpd
pankso@2306 90 fi
pankso@24 91 # Just in case.
pascal@1905 92 chown www.www $1/var/log/$PACKAGE
pascal@1905 93 if [ -z "$1" ]; then
pankso@10811 94 for i in apache httpd; do
pascal@1905 95 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
pascal@1905 96 done
pascal@1905 97 /etc/init.d/$PACKAGE start
pascal@1905 98 fi
pankso@24 99 }