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