wok annotate lighttpd/receipt @ rev 241
Shfs: install shfsumount too
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 18 14:32:36 2008 +0100 (2008-02-18) |
parents | cdac43c3f44f |
children | eb4e6a1af180 |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
pankso@24 | 4 VERSION="1.4.18" |
pankso@211 | 5 CATEGORY="network" |
pankso@24 | 6 SHORT_DESC="Fast and light HTTP Web server." |
pankso@24 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@24 | 8 DEPENDS="php" |
pankso@127 | 9 BUILD_DEPENDS="pcre-dev" |
pankso@24 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@24 | 11 WEB_SITE="http://www.lighttpd.net/" |
pankso@24 | 12 WGET_URL="http://www.lighttpd.net/download/$TARBALL" |
pankso@24 | 13 BASE_MODULES=" |
pankso@24 | 14 access |
pankso@24 | 15 accesslog |
pankso@24 | 16 alias |
pankso@24 | 17 cgi |
pankso@24 | 18 fastcgi |
pankso@24 | 19 compress |
pankso@24 | 20 dirlisting |
pankso@24 | 21 indexfile |
pankso@24 | 22 staticfile |
pankso@24 | 23 rewrite |
pankso@24 | 24 status |
pankso@24 | 25 userdir" |
pascal@153 | 26 JWM_MENU='System tools:<Program icon="text-html.png" label="LightTPD status">firefox http://localhost/server-status</Program>' |
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 |
pankso@24 | 32 ./configure -enable-shared --disable-ipv6 --prefix=/usr \ |
pankso@24 | 33 --libdir=/usr/lib/lighttpd --mandir=/usr/share/man \ |
pankso@24 | 34 $CONFIGURE_ARGS |
pankso@24 | 35 make |
pankso@24 | 36 make DESTDIR=$PWD/_pkg install |
pankso@24 | 37 } |
pankso@24 | 38 |
pankso@24 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 40 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 41 genpkg_rules() |
pankso@24 | 42 { |
pankso@24 | 43 mkdir -p $fs/usr |
pankso@24 | 44 cp -a $_pkg/usr/bin $fs/usr |
pankso@24 | 45 cp -a $_pkg/usr/sbin $fs/usr |
pankso@24 | 46 |
pankso@24 | 47 # Modules. |
pankso@24 | 48 mkdir -p $fs/usr/lib/lighttpd |
pankso@24 | 49 for module in $BASE_MODULES |
pankso@24 | 50 do |
pankso@24 | 51 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 52 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 53 done |
pankso@24 | 54 strip -s $fs/usr/bin/* |
pankso@24 | 55 strip -s $fs/usr/sbin/* |
pankso@24 | 56 strip -s $fs/usr/lib/lighttpd/* |
pankso@24 | 57 |
pankso@24 | 58 # Server root and config file. |
pankso@24 | 59 cp -a stuff/var $fs |
pankso@24 | 60 cp -a stuff/etc $fs |
pankso@119 | 61 chown -R 0.0 $fs/var/www |
pankso@119 | 62 chown -R 0.0 $fs/etc |
pankso@24 | 63 |
pankso@24 | 64 # Logs directory. |
pankso@24 | 65 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 66 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 67 } |
pankso@24 | 68 |
pankso@24 | 69 # Pre and post install commands for Tazpkg. |
pankso@24 | 70 # We stop the server by default in case of upgarde. |
pankso@24 | 71 pre_install() |
pankso@24 | 72 { |
pankso@24 | 73 echo "Processing pre-install commands..." |
pankso@24 | 74 /etc/init.d/$PACKAGE stop |
pankso@24 | 75 } |
pankso@24 | 76 post_install() |
pankso@24 | 77 { |
pankso@127 | 78 local root |
pankso@127 | 79 root=$1 |
pankso@24 | 80 echo "Processing post-install commands..." |
pankso@24 | 81 # Just in case. |
pankso@24 | 82 chown www.www $root/var/log/$PACKAGE |
pankso@24 | 83 /etc/init.d/$PACKAGE start |
pankso@24 | 84 } |