wok annotate lighttpd/receipt @ rev 16000

lighttpd: fic typo in HOST_ARCH
author Christophe Lincoln <pankso@slitaz.org>
date Sun Mar 02 19:09:41 2014 +0100 (2014-03-02)
parents ade0043b3fac
children 2b6001f6ed50
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@16000 14 HOST_ARCH="i486 arm"
pankso@15992 15
pankso@15992 16 DEPENDS="pcre"
pankso@15992 17 BUILD_DEPENDS="pcre-dev bzip2-dev"
pankso@15992 18
pankso@15992 19 # Modules include in this package. Other modules are splited in
pankso@15992 20 # the lighttpd-modules packages.
pankso@24 21 BASE_MODULES="
pankso@24 22 access
pankso@24 23 accesslog
pankso@24 24 alias
pankso@24 25 cgi
pankso@24 26 dirlisting
pankso@24 27 indexfile
pankso@24 28 staticfile
pankso@24 29 rewrite
pankso@24 30 status
pankso@24 31 userdir"
pankso@24 32
pankso@24 33 # Rules to configure and make the package.
pankso@24 34 compile_rules()
pankso@24 35 {
pankso@24 36 cd $src
pascal@15576 37 sed -i '/addrs_left/d' src/mod_extforward.c
pankso@639 38 ./configure \
pankso@639 39 --enable-shared \
pankso@639 40 --disable-ipv6 \
pankso@639 41 --prefix=/usr \
pascal@15577 42 --libdir=/usr/lib/lighttpd \
pascal@15577 43 --mandir=/usr/share/man \
pascal@15577 44 $CONFIGURE_ARGS &&
pascal@1516 45 make &&
pascal@15577 46 make DESTDIR=$DESTDIR install
pankso@24 47 }
pankso@24 48
pankso@24 49 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@24 50 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
pankso@24 51 genpkg_rules()
pankso@24 52 {
pankso@24 53 mkdir -p $fs/usr
pascal@15577 54 #cp -a $install/usr/bin $fs/usr
pascal@15577 55 cp -a $install/usr/sbin $fs/usr
pankso@4572 56
pankso@24 57 # Modules.
pankso@24 58 mkdir -p $fs/usr/lib/lighttpd
pankso@24 59 for module in $BASE_MODULES
pankso@24 60 do
pascal@15577 61 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
pankso@24 62 echo -n "Copying : mod_${module}.so" && status
pankso@24 63 done
pankso@4572 64
pankso@24 65 # Server root and config file.
pankso@9665 66 cp -a $stuff/var $fs
pankso@9665 67 cp -a $stuff/etc $fs
pankso@119 68 chown -R 0.0 $fs/var/www
pankso@119 69 chown -R 0.0 $fs/etc
pankso@4572 70
pankso@24 71 # Logs directory.
pankso@24 72 mkdir -p $fs/var/log/lighttpd
pankso@24 73 chown 80.80 $fs/var/log/lighttpd
pankso@24 74 }
pankso@24 75
pankso@15992 76 # Make sur it as cross compile properly
pankso@15992 77 testsuite()
pankso@15992 78 {
pankso@15992 79 readelf -h $install/usr/sbin/$PACKAGE
pankso@15992 80 }
pankso@15992 81
pankso@24 82 # Pre and post install commands for Tazpkg.
pankso@24 83 # We stop the server by default in case of upgarde.
pankso@24 84 pre_install()
pankso@24 85 {
pankso@24 86 echo "Processing pre-install commands..."
pascal@1204 87 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
pankso@2306 88 # Backup config file.
pascal@15575 89 if [ -d $1/etc/lighttpd ]; then
pascal@15575 90 cp -a $1/etc/lighttpd $1/etc/lighttpd.bak
pankso@2306 91 fi
pankso@24 92 }
pankso@24 93 post_install()
pankso@24 94 {
pankso@24 95 echo "Processing post-install commands..."
pankso@2306 96 # Restore original config.
pascal@15575 97 if [ -d $1/etc/lighttpd.bak ]; then
pascal@15575 98 rm -rf $1/etc/lighttpd
pascal@15575 99 mv $1/etc/lighttpd.bak $1/etc/lighttpd
pankso@2306 100 fi
pankso@24 101 # Just in case.
pascal@1905 102 chown www.www $1/var/log/$PACKAGE
pascal@1905 103 if [ -z "$1" ]; then
pankso@10811 104 for i in apache httpd; do
pascal@1905 105 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
pascal@1905 106 done
pascal@1905 107 /etc/init.d/$PACKAGE start
pascal@1905 108 fi
pankso@24 109 }