wok-next annotate lighttpd/receipt @ rev 119
Fixed lighttpd permissions (/etc + /var/www)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Jan 05 21:54:43 2008 +0100 (2008-01-05) |
parents | 8a16d292a7d3 |
children | 587c8b5a3803 |
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@24 | 5 CATEGORY="base-apps" |
pankso@24 | 6 SHORT_DESC="Fast and light HTTP Web server." |
pankso@24 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@24 | 8 DEPENDS="php" |
pankso@24 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@24 | 10 WEB_SITE="http://www.lighttpd.net/" |
pankso@24 | 11 WGET_URL="http://www.lighttpd.net/download/$TARBALL" |
pankso@24 | 12 BASE_MODULES=" |
pankso@24 | 13 access |
pankso@24 | 14 accesslog |
pankso@24 | 15 alias |
pankso@24 | 16 cgi |
pankso@24 | 17 fastcgi |
pankso@24 | 18 compress |
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 |
pankso@24 | 26 # Rules to configure and make the package. |
pankso@24 | 27 compile_rules() |
pankso@24 | 28 { |
pankso@24 | 29 cd $src |
pankso@24 | 30 ./configure -enable-shared --disable-ipv6 --prefix=/usr \ |
pankso@24 | 31 --libdir=/usr/lib/lighttpd --mandir=/usr/share/man \ |
pankso@24 | 32 $CONFIGURE_ARGS |
pankso@24 | 33 make |
pankso@24 | 34 make DESTDIR=$PWD/_pkg install |
pankso@24 | 35 } |
pankso@24 | 36 |
pankso@24 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 38 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 39 genpkg_rules() |
pankso@24 | 40 { |
pankso@24 | 41 mkdir -p $fs/usr |
pankso@24 | 42 cp -a $_pkg/usr/bin $fs/usr |
pankso@24 | 43 cp -a $_pkg/usr/sbin $fs/usr |
pankso@24 | 44 |
pankso@24 | 45 # Modules. |
pankso@24 | 46 mkdir -p $fs/usr/lib/lighttpd |
pankso@24 | 47 for module in $BASE_MODULES |
pankso@24 | 48 do |
pankso@24 | 49 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 50 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 51 done |
pankso@24 | 52 strip -s $fs/usr/bin/* |
pankso@24 | 53 strip -s $fs/usr/sbin/* |
pankso@24 | 54 strip -s $fs/usr/lib/lighttpd/* |
pankso@24 | 55 |
pankso@24 | 56 # Server root and config file. |
pankso@24 | 57 cp -a stuff/var $fs |
pankso@24 | 58 cp -a stuff/etc $fs |
pankso@119 | 59 chown -R 0.0 $fs/var/www |
pankso@119 | 60 chown -R 0.0 $fs/etc |
pankso@24 | 61 |
pankso@24 | 62 # Logs directory. |
pankso@24 | 63 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 64 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 65 } |
pankso@24 | 66 |
pankso@24 | 67 # Pre and post install commands for Tazpkg. |
pankso@24 | 68 # We stop the server by default in case of upgarde. |
pankso@24 | 69 pre_install() |
pankso@24 | 70 { |
pankso@24 | 71 echo "Processing pre-install commands..." |
pankso@24 | 72 /etc/init.d/$PACKAGE stop |
pankso@24 | 73 } |
pankso@24 | 74 post_install() |
pankso@24 | 75 { |
pankso@24 | 76 local root |
pankso@24 | 77 root=$1 |
pankso@24 | 78 echo "Processing post-install commands..." |
pankso@24 | 79 # Just in case. |
pankso@24 | 80 chown www.www $root/var/log/$PACKAGE |
pankso@24 | 81 /etc/init.d/$PACKAGE start |
pankso@24 | 82 } |