wok-next view lighttpd/receipt @ rev 20806
I. node update: security -> https://nodejs.org/en/blog/vulnerability/june-2018-security-releases/ 9.5.0 -> 9.11.2 II. add checksum
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Wed Jun 13 08:26:54 2018 +0000 (2018-06-13) |
parents | 5841522533ec |
children | d5aab818505e |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="lighttpd"
4 VERSION="1.4.35"
5 CATEGORY="network"
6 SHORT_DESC="Fast and light HTTP Web server"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="http://www.lighttpd.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-${VERSION%.*}.x/$TARBALL"
14 BUILD_DEPENDS="pcre-dev bzip2-dev zlib-dev"
15 SPLIT="lighttpd lighttpd-modules"
17 compile_rules() {
18 sed -i '/addrs_left/d' src/mod_extforward.c
20 ./configure \
21 --enable-shared \
22 --disable-ipv6 \
23 --libdir=/usr/lib/lighttpd \
24 $CONFIGURE_ARGS &&
25 fix libtool &&
26 make &&
27 make DESTDIR=$DESTDIR install
28 }
30 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
31 genpkg_rules() {
32 case $PACKAGE in
33 lighttpd)
34 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
35 SUGGESTED="lighttpd-modules php perl python"
36 DEPENDS="libpcre"
37 # Modules include in this package. Other modules are splited in
38 # the lighttpd-modules packages.
39 BASE_MODULES="
40 access
41 accesslog
42 alias
43 cgi
44 dirlisting
45 indexfile
46 staticfile
47 rewrite
48 status
49 userdir"
50 mkdir -p $fs/usr
51 #cp -a $install/usr/bin $fs/usr
52 cp -a $install/usr/sbin $fs/usr
54 # Modules.
55 mkdir -p $fs/usr/lib/lighttpd
56 for module in $BASE_MODULES; 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 # Config file.
62 cp -a $stuff/etc $fs
63 chown -R 0.0 $fs/etc
65 # Logs directory.
66 mkdir -p $fs/var/log/lighttpd
67 chown 80.80 $fs/var/log/lighttpd
68 ;;
69 lighttpd-modules)
70 CAT="network|complementary modules"
71 DEPENDS="bzlib libpcre zlib lighttpd"
72 BASE_MODULES="
73 access
74 accesslog
75 alias
76 cgi
77 dirlisting
78 indexfile
79 staticfile
80 rewrite
81 status
82 userdir"
83 # Modules.
84 mkdir -p $fs/usr/
85 cp -a $install/usr/lib $fs/usr
86 for module in $BASE_MODULES; do
87 rm -f $fs/usr/lib/lighttpd/mod_${module}.so
88 done
89 rm -f $fs/usr/lib/lighttpd/*.la
90 ;;
91 esac
92 }
94 # Make sure it as cross compile properly
95 testsuite() {
96 readelf -h $install/usr/sbin/$PACKAGE
97 }
99 # We stop the server by default in case of upgarde.
100 pre_install_lighttpd() {
101 [ -z "$1" ] && for i in httpd ngnix apache cherokee $PACKAGE ; do
102 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
103 done
104 # Backup config file.
105 if [ -d "$1/etc/lighttpd" ]; then
106 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
107 fi
108 }
110 post_install_lighttpd() {
111 # Restore original config.
112 if [ -d "$1/etc/lighttpd.bak" ]; then
113 rm -rf "$1/etc/lighttpd"
114 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd"
115 fi
117 # Just in case.
118 chown www.www "$1/var/log/$PACKAGE"
119 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 ||
120 /etc/init.d/$PACKAGE start
121 }