wok view lighttpd-ssl/receipt @ rev 20257

Add giflossy
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 13 23:27:32 2018 +0100 (2018-03-13)
parents d6ca18366f41
children ea835222df2a
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd-ssl"
4 VERSION="1.4.35"
5 CATEGORY="network"
6 SHORT_DESC="Fast and light HTTP Web server with SSL support."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD"
9 SUGGESTED="lighttpd-modules php perl python"
10 SOURCE="lighttpd"
11 TARBALL="$SOURCE-$VERSION.tar.xz"
12 WEB_SITE="http://www.lighttpd.net/"
13 WGET_URL="http://download.lighttpd.net/lighttpd/releases-${VERSION%.*}.x/$TARBALL"
14 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf /etc/ssl/lighttpd"
15 PROVIDE="lighttpd"
16 HOST_ARCH="i486 arm"
18 DEPENDS="pcre openssl"
19 BUILD_DEPENDS="pcre-dev bzip2-dev openssl-dev"
21 BASE_MODULES="
22 access
23 accesslog
24 alias
25 cgi
26 dirlisting
27 indexfile
28 staticfile
29 rewrite
30 status
31 userdir"
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 sed -i '/addrs_left/d' src/mod_extforward.c
37 ./configure \
38 --enable-shared \
39 --disable-ipv6 \
40 --with-openssl \
41 --prefix=/usr \
42 --libdir=/usr/lib/lighttpd \
43 --mandir=/usr/share/man \
44 $CONFIGURE_ARGS &&
45 make &&
46 make DESTDIR=$DESTDIR install
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
51 genpkg_rules()
52 {
53 mkdir -p $fs/usr
54 #cp -a $install/usr/bin $fs/usr
55 cp -a $install/usr/sbin $fs/usr
57 # Modules.
58 mkdir -p $fs/usr/lib/lighttpd
59 for module in $BASE_MODULES; do
60 action 'Copying : mod_${module}.so'
61 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
62 status
63 done
65 # Server root and config file.
66 cp -a $WOK/$SOURCE/stuff/etc $fs
67 chown -R 0.0 $fs/etc
68 mkdir -p $fs/etc/ssl/lighttpd
69 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT
71 # Enable HTTPS support
72 #
73 \$SERVER["socket"] == ":443" {
74 protocol = "https://"
75 ssl.engine = "enable"
76 # Unsafe, see CVE-2014-3566 POODLE
77 ssl.use-sslv2 = "disable"
78 ssl.use-sslv3 = "disable"
79 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem"
80 }
81 EOT
83 # Logs directory.
84 mkdir -p $fs/var/log/lighttpd
85 chown 80.80 $fs/var/log/lighttpd
86 }
88 # Make sur it as cross compile properly
89 testsuite()
90 {
91 readelf -h $install/usr/sbin/lighttpd
92 }
94 # Pre and post install commands for Tazpkg.
95 # We stop the server by default in case of upgarde.
96 pre_install()
97 {
98 [ -z "$1" ] && for i in httpd lighttpd ngnix apache cherokee $PACKAGE ; do
99 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
100 done
101 # Backup config file.
102 if [ -d "$1/etc/lighttpd" ]; then
103 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
104 fi
105 }
107 post_install()
108 {
109 if [ ! -f "$1/etc/ssl/lighttpd/lighttpd.pem" ]; then
110 openssl req -new -x509 \
111 -keyout "$1/etc/ssl/lighttpd/lighttpd.pem" \
112 -out "$1/etc/ssl/lighttpd/lighttpd.pem" \
113 -days 3650 -nodes <<EOT
114 $(. "$1/etc/locale.conf" ; echo ${LANG#*_})
115 $(cat "$1/etc/TZ")
117 $(cat "$1/etc/hostname")
121 EOT
122 fi
123 # Just in case.
124 chown www.www "$1/var/log/lighttpd"
125 if [ -z "$1" ]; then
126 for i in apache ; do
127 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
128 done
129 /etc/init.d/lighttpd start
130 fi
131 }