wok-next annotate lighttpd/receipt @ rev 2300
Up: bash (4.0)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Feb 23 13:44:27 2009 +0100 (2009-02-23) |
parents | b42847caa337 |
children | 30f6e2ccf326 |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
pankso@2298 | 4 VERSION="1.4.21" |
pankso@211 | 5 CATEGORY="network" |
pankso@24 | 6 SHORT_DESC="Fast and light HTTP Web server." |
pankso@24 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@639 | 8 DEPENDS="pcre" |
pankso@667 | 9 BUILD_DEPENDS="pcre-dev bzip2-dev" |
pankso@639 | 10 SUGGESTED="lighttpd-modules php perl python" |
pankso@24 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@24 | 12 WEB_SITE="http://www.lighttpd.net/" |
pankso@1095 | 13 #WGET_URL="http://www.lighttpd.net/download/$TARBALL" |
pankso@1095 | 14 WGET_URL="http://mirror.slitaz.org/sources/packages/l/$TARBALL" |
pascal@1906 | 15 CONFIG_FILES="/etc/lighttpd" |
pankso@24 | 16 BASE_MODULES=" |
pankso@24 | 17 access |
pankso@24 | 18 accesslog |
pankso@24 | 19 alias |
pankso@24 | 20 cgi |
pankso@24 | 21 dirlisting |
pankso@24 | 22 indexfile |
pankso@24 | 23 staticfile |
pankso@24 | 24 rewrite |
pankso@24 | 25 status |
pankso@24 | 26 userdir" |
pankso@24 | 27 |
pankso@24 | 28 # Rules to configure and make the package. |
pankso@24 | 29 compile_rules() |
pankso@24 | 30 { |
pankso@24 | 31 cd $src |
pascal@1516 | 32 if [ ! done.fastcgi_detach.patch ]; then |
pascal@1516 | 33 patch -i ../stuff/fastcgi_detach.patch || exit 1 |
pascal@1516 | 34 touch done.fastcgi_detach.patch |
pascal@1516 | 35 fi |
pankso@639 | 36 ./configure \ |
pankso@639 | 37 --enable-shared \ |
pankso@639 | 38 --disable-ipv6 \ |
pankso@639 | 39 --prefix=/usr \ |
pankso@639 | 40 --libdir=/usr/lib/lighttpd \ |
pankso@639 | 41 --mandir=/usr/share/man \ |
pascal@1516 | 42 $CONFIGURE_ARGS && |
pascal@1516 | 43 make && |
pankso@24 | 44 make DESTDIR=$PWD/_pkg install |
pankso@24 | 45 } |
pankso@24 | 46 |
pankso@24 | 47 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 48 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 49 genpkg_rules() |
pankso@24 | 50 { |
pankso@24 | 51 mkdir -p $fs/usr |
pankso@24 | 52 cp -a $_pkg/usr/bin $fs/usr |
pankso@24 | 53 cp -a $_pkg/usr/sbin $fs/usr |
pankso@24 | 54 |
pankso@24 | 55 # Modules. |
pankso@24 | 56 mkdir -p $fs/usr/lib/lighttpd |
pankso@24 | 57 for module in $BASE_MODULES |
pankso@24 | 58 do |
pankso@24 | 59 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 60 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 61 done |
pankso@24 | 62 strip -s $fs/usr/bin/* |
pankso@24 | 63 strip -s $fs/usr/sbin/* |
pankso@24 | 64 strip -s $fs/usr/lib/lighttpd/* |
pankso@24 | 65 |
pankso@24 | 66 # Server root and config file. |
pankso@24 | 67 cp -a stuff/var $fs |
pankso@24 | 68 cp -a stuff/etc $fs |
pankso@119 | 69 chown -R 0.0 $fs/var/www |
pankso@119 | 70 chown -R 0.0 $fs/etc |
pankso@24 | 71 |
pankso@24 | 72 # Logs directory. |
pankso@24 | 73 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 74 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 75 } |
pankso@24 | 76 |
pankso@24 | 77 # Pre and post install commands for Tazpkg. |
pankso@24 | 78 # We stop the server by default in case of upgarde. |
pankso@24 | 79 pre_install() |
pankso@24 | 80 { |
pankso@24 | 81 echo "Processing pre-install commands..." |
pascal@1204 | 82 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop |
pankso@24 | 83 } |
pankso@24 | 84 post_install() |
pankso@24 | 85 { |
pankso@24 | 86 echo "Processing post-install commands..." |
pankso@24 | 87 # Just in case. |
pascal@1905 | 88 chown www.www $1/var/log/$PACKAGE |
pascal@1905 | 89 if [ -z "$1" ]; then |
pascal@1905 | 90 for i in apache ; do |
pascal@1905 | 91 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
pascal@1905 | 92 done |
pascal@1905 | 93 /etc/init.d/$PACKAGE start |
pascal@1905 | 94 fi |
pankso@24 | 95 } |