wok view lighttpd-ssl/receipt @ rev 23131

updated lighttpd, lighttpd-modules and lighttpd-ssl (1.4.53 -> 1.4.55)
author Hans-G?nter Theisgen
date Sat Mar 14 13:38:52 2020 +0100 (2020-03-14)
parents ea835222df2a
children ede1d184d5c5
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd-ssl"
4 VERSION="1.4.55"
5 CATEGORY="network"
6 SHORT_DESC="Fast and light HTTP Web server with SSL support."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://www.lighttpd.net/"
11 SOURCE="lighttpd"
12 TARBALL="$SOURCE-$VERSION.tar.xz"
13 WGET_URL="https://download.lighttpd.net/$SOURCE/releases-${VERSION%.*}.x/$TARBALL"
15 PROVIDE="lighttpd"
16 SUGGESTED="lighttpd-modules perl php python"
17 DEPENDS="openssl pcre"
18 BUILD_DEPENDS="bzip2-dev openssl-dev pcre-dev"
20 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf /etc/ssl/lighttpd"
22 HOST_ARCH="i486 arm"
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 --with-openssl \
47 --enable-shared \
48 $CONFIGURE_ARGS &&
49 make -j 1 &&
50 make DESTDIR=$DESTDIR install
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
55 genpkg_rules()
56 {
57 mkdir -p $fs/usr
58 #cp -a $install/usr/bin $fs/usr
59 cp -a $install/usr/sbin $fs/usr
61 # Modules.
62 mkdir -p $fs/usr/lib/lighttpd
63 for module in $BASE_MODULES
64 do
65 action "Copying : mod_${module}.so"
66 cp $install/usr/lib/lighttpd/mod_${module}.so \
67 $fs/usr/lib/lighttpd
68 status
69 done
71 # Server root and configuration file.
72 cp -a $WOK/$SOURCE/stuff/etc $fs
73 chown -R 0.0 $fs/etc
74 mkdir -p $fs/etc/ssl/lighttpd
75 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT
77 # Enable HTTPS support
78 #
79 \$SERVER["socket"] == ":443" {
80 protocol = "https://"
81 ssl.engine = "enable"
82 # Unsafe, see CVE-2014-3566 POODLE
83 ssl.use-sslv2 = "disable"
84 ssl.use-sslv3 = "disable"
85 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem"
86 }
87 EOT
89 # Logs directory.
90 mkdir -p $fs/var/log/lighttpd
91 chown 80.80 $fs/var/log/lighttpd
92 }
94 # Make sure it is cross compiled properly
95 testsuite()
96 {
97 readelf -h $install/usr/sbin/lighttpd
98 }
100 # Pre and post install commands for Tazpkg.
101 # We stop the server by default in case of upgrade.
102 pre_install()
103 {
104 [ -z "$1" ] &&
105 for i in httpd lighttpd ngnix apache cherokee $PACKAGE
106 do
107 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
108 done
110 # Backup configuration file.
111 if [ -d "$1/etc/lighttpd" ]
112 then
113 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
114 fi
115 }
117 post_install()
118 {
119 if [ ! -f "$1/etc/ssl/lighttpd/lighttpd.pem" ]
120 then
121 openssl req -new -x509 \
122 -keyout "$1/etc/ssl/lighttpd/lighttpd.pem" \
123 -out "$1/etc/ssl/lighttpd/lighttpd.pem" \
124 -days 3650 -nodes <<EOT
125 $(. "$1/etc/locale.conf" ; echo ${LANG#*_})
126 $(cat "$1/etc/TZ")
128 $(cat "$1/etc/hostname")
132 EOT
133 fi
135 # Just in case.
136 chown www.www "$1/var/log/lighttpd"
137 if [ -z "$1" ]
138 then
139 for i in apache
140 do
141 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
142 done
143 /etc/init.d/lighttpd start
144 fi
145 }