wok view lighttpd/receipt @ rev 21368
updated littleutils (1.0.32 -> 1.0.41)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Apr 21 17:17:34 2019 +0100 (2019-04-21) |
parents | 3630f18392bd |
children | fc1aa8675fab |
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd"
4 VERSION="1.4.53"
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"
17 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
19 HOST_ARCH="i486 arm"
21 # Modules to be included in this package. Other modules are split in
22 # the lighttpd-modules package.
23 BASE_MODULES="
24 access
25 accesslog
26 alias
27 cgi
28 dirlisting
29 indexfile
30 staticfile
31 rewrite
32 status
33 userdir"
35 # Rules to configure and make the package.
36 compile_rules()
37 {
38 sed -i '/addrs_left/d' src/mod_extforward.c
40 ./configure \
41 --enable-shared \
42 --disable-ipv6 \
43 --prefix=/usr \
44 --libdir=/usr/lib/lighttpd \
45 --mandir=/usr/share/man \
46 $CONFIGURE_ARGS &&
47 make -j 1 &&
48 make DESTDIR=$DESTDIR install
49 }
51 # Rules to gen a SliTaz package suitable for Tazpkg.
52 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
53 genpkg_rules()
54 {
55 mkdir -p $fs/usr
56 #cp -a $install/usr/bin $fs/usr
57 cp -a $install/usr/sbin $fs/usr
59 # Modules.
60 mkdir -p $fs/usr/lib/lighttpd
61 for module in $BASE_MODULES; do
62 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
63 echo -n "Copying : mod_${module}.so" && status
64 done
66 # Configuration file.
67 cp -a $stuff/etc $fs
68 chown -R 0.0 $fs/etc
70 # Logs directory.
71 mkdir -p $fs/var/log/lighttpd
72 chown 80.80 $fs/var/log/lighttpd
73 }
75 # Make sure it is cross compiled properly
76 testsuite()
77 {
78 readelf -h $install/usr/sbin/$PACKAGE
79 }
81 # Pre and post install commands for Tazpkg.
82 # We stop the server by default in case of upgrade.
83 pre_install()
84 {
85 [ -z "$1" ] && for i in httpd ngnix apache cherokee $PACKAGE ; do
86 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
87 done
88 # Backup configuration file.
89 if [ -d "$1/etc/lighttpd" ]; then
90 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
91 fi
92 }
94 post_install()
95 {
96 # Restore original configuration file.
97 if [ -d "$1/etc/lighttpd.bak" ]; then
98 rm -rf "$1/etc/lighttpd"
99 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd"
100 fi
102 # Just in case.
103 chown www.www "$1/var/log/$PACKAGE"
104 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 ||
105 /etc/init.d/$PACKAGE start
106 }