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