wok view lighttpd/receipt @ rev 15793

Up fail2ban (0.8.11)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jan 18 17:34:47 2014 +0000 (2014-01-18)
parents 02e59bb0cae1
children ade0043b3fac
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd"
4 VERSION="1.4.33"
5 CATEGORY="network"
6 SHORT_DESC="Fast and light HTTP Web server."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD"
9 SUGGESTED="lighttpd-modules php perl python"
10 TARBALL="$PACKAGE-$VERSION.tar.xz"
11 WEB_SITE="http://www.lighttpd.net/"
12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-1.4.x/$TARBALL"
13 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
14 BASE_MODULES="
15 access
16 accesslog
17 alias
18 cgi
19 dirlisting
20 indexfile
21 staticfile
22 rewrite
23 status
24 userdir"
26 DEPENDS="pcre"
27 BUILD_DEPENDS="pcre-dev bzip2-dev"
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 cd $src
33 sed -i '/addrs_left/d' src/mod_extforward.c
34 ./configure \
35 --enable-shared \
36 --disable-ipv6 \
37 --prefix=/usr \
38 --libdir=/usr/lib/lighttpd \
39 --mandir=/usr/share/man \
40 $CONFIGURE_ARGS &&
41 make &&
42 make DESTDIR=$DESTDIR install
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
47 genpkg_rules()
48 {
49 mkdir -p $fs/usr
50 #cp -a $install/usr/bin $fs/usr
51 cp -a $install/usr/sbin $fs/usr
53 # Modules.
54 mkdir -p $fs/usr/lib/lighttpd
55 for module in $BASE_MODULES
56 do
57 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
58 echo -n "Copying : mod_${module}.so" && status
59 done
61 # Server root and config file.
62 cp -a $stuff/var $fs
63 cp -a $stuff/etc $fs
64 chown -R 0.0 $fs/var/www
65 chown -R 0.0 $fs/etc
67 # Logs directory.
68 mkdir -p $fs/var/log/lighttpd
69 chown 80.80 $fs/var/log/lighttpd
70 }
72 # Pre and post install commands for Tazpkg.
73 # We stop the server by default in case of upgarde.
74 pre_install()
75 {
76 echo "Processing pre-install commands..."
77 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
78 # Backup config file.
79 if [ -d $1/etc/lighttpd ]; then
80 cp -a $1/etc/lighttpd $1/etc/lighttpd.bak
81 fi
82 }
83 post_install()
84 {
85 echo "Processing post-install commands..."
86 # Restore original config.
87 if [ -d $1/etc/lighttpd.bak ]; then
88 rm -rf $1/etc/lighttpd
89 mv $1/etc/lighttpd.bak $1/etc/lighttpd
90 fi
91 # Just in case.
92 chown www.www $1/var/log/$PACKAGE
93 if [ -z "$1" ]; then
94 for i in apache httpd; do
95 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
96 done
97 /etc/init.d/$PACKAGE start
98 fi
99 }