wok view lighttpd-ssl/receipt @ rev 22232

updated xorg-libXxf86dga and xorg-libXxf86dga-dev (1.1.4 -> 1.1.5)
author Hans-G?nter Theisgen
date Tue Nov 12 08:30:43 2019 +0100 (2019-11-12)
parents 3630f18392bd
children fc1aa8675fab
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd-ssl"
4 VERSION="1.4.53"
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"
19 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf /etc/ssl/lighttpd"
21 HOST_ARCH="i486 arm"
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 --with-openssl \
44 --prefix=/usr \
45 --libdir=/usr/lib/lighttpd \
46 --mandir=/usr/share/man \
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; do
63 action "Copying : mod_${module}.so"
64 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
65 status
66 done
68 # Server root and configuration file.
69 cp -a $WOK/$SOURCE/stuff/etc $fs
70 chown -R 0.0 $fs/etc
71 mkdir -p $fs/etc/ssl/lighttpd
72 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT
74 # Enable HTTPS support
75 #
76 \$SERVER["socket"] == ":443" {
77 protocol = "https://"
78 ssl.engine = "enable"
79 # Unsafe, see CVE-2014-3566 POODLE
80 ssl.use-sslv2 = "disable"
81 ssl.use-sslv3 = "disable"
82 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem"
83 }
84 EOT
86 # Logs directory.
87 mkdir -p $fs/var/log/lighttpd
88 chown 80.80 $fs/var/log/lighttpd
89 }
91 # Make sure it is cross compiled properly
92 testsuite()
93 {
94 readelf -h $install/usr/sbin/lighttpd
95 }
97 # Pre and post install commands for Tazpkg.
98 # We stop the server by default in case of upgrade.
99 pre_install()
100 {
101 [ -z "$1" ] && for i in httpd lighttpd ngnix apache cherokee $PACKAGE ; do
102 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
103 done
104 # Backup configuration file.
105 if [ -d "$1/etc/lighttpd" ]; then
106 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
107 fi
108 }
110 post_install()
111 {
112 if [ ! -f "$1/etc/ssl/lighttpd/lighttpd.pem" ]; then
113 openssl req -new -x509 \
114 -keyout "$1/etc/ssl/lighttpd/lighttpd.pem" \
115 -out "$1/etc/ssl/lighttpd/lighttpd.pem" \
116 -days 3650 -nodes <<EOT
117 $(. "$1/etc/locale.conf" ; echo ${LANG#*_})
118 $(cat "$1/etc/TZ")
120 $(cat "$1/etc/hostname")
124 EOT
125 fi
126 # Just in case.
127 chown www.www "$1/var/log/lighttpd"
128 if [ -z "$1" ]; then
129 for i in apache ; do
130 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
131 done
132 /etc/init.d/lighttpd start
133 fi
134 }