wok-6.x view lighttpd/receipt @ rev 24192
updated perl-date-manip (6.81 -> 6.86)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Dec 31 14:44:57 2021 +0100 (2021-12-31) |
parents | ea835222df2a |
children | ede1d184d5c5 |
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd"
4 VERSION="1.4.55"
5 CATEGORY="network"
6 SHORT_DESC="Fast and light HTTP Web server."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://www.lighttpd.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://download.lighttpd.net/$PACKAGE/releases-${VERSION%.*}.x/$TARBALL"
14 SUGGESTED="lighttpd-modules perl php python"
15 DEPENDS="pcre"
16 BUILD_DEPENDS="bzip2-dev pcre-dev"
18 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
20 HOST_ARCH="i486 arm"
22 # Modules to be included in this package. Other modules are split in
23 # the lighttpd-modules package.
24 BASE_MODULES="
25 access
26 accesslog
27 alias
28 cgi
29 dirlisting
30 indexfile
31 staticfile
32 rewrite
33 status
34 userdir"
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 sed -i '/addrs_left/d' src/mod_extforward.c
41 ./configure \
42 --prefix=/usr \
43 --libdir=/usr/lib/lighttpd \
44 --mandir=/usr/share/man \
45 --disable-ipv6 \
46 --enable-shared \
47 $CONFIGURE_ARGS &&
48 make -j 1 &&
49 make DESTDIR=$DESTDIR install
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
54 genpkg_rules()
55 {
56 mkdir -p $fs/usr
57 #cp -a $install/usr/bin $fs/usr
58 cp -a $install/usr/sbin $fs/usr
60 # Modules.
61 mkdir -p $fs/usr/lib/lighttpd
62 for module in $BASE_MODULES
63 do
64 cp $install/usr/lib/lighttpd/mod_${module}.so \
65 $fs/usr/lib/lighttpd
66 echo -n "Copying : mod_${module}.so" && status
67 done
69 # Configuration file.
70 cp -a $stuff/etc $fs
71 chown -R 0.0 $fs/etc
73 # Logs directory.
74 mkdir -p $fs/var/log/lighttpd
75 chown 80.80 $fs/var/log/lighttpd
76 }
78 # Make sure it is cross compiled properly
79 testsuite()
80 {
81 readelf -h $install/usr/sbin/$PACKAGE
82 }
84 # Pre and post install commands for Tazpkg.
85 # We stop the server by default in case of upgrade.
86 pre_install()
87 {
88 [ -z "$1" ] &&
89 for i in httpd ngnix apache cherokee $PACKAGE
90 do
91 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
92 done
94 # Backup configuration file.
95 if [ -d "$1/etc/lighttpd" ]
96 then
97 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
98 fi
99 }
101 post_install()
102 {
103 # Restore original configuration file.
104 if [ -d "$1/etc/lighttpd.bak" ]
105 then
106 rm -rf "$1/etc/lighttpd"
107 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd"
108 fi
110 # Just in case.
111 chown www.www "$1/var/log/$PACKAGE"
112 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 ||
113 /etc/init.d/$PACKAGE start
114 }