wok view lighttpd-ssl/receipt @ rev 25626
opendkim: add opendkim.conf
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Nov 09 09:26:20 2023 +0000 (12 months ago) |
parents | ede1d184d5c5 |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd-ssl"
4 VERSION="1.4.64"
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 pcre2"
18 BUILD_DEPENDS="bzip2-dev openssl-dev pcre2-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 # What is the latest version available today?
37 current_version()
38 {
39 wget -O - $WEB_SITE 2>/dev/null | \
40 sed "/latest/d;/$SOURCE-[0-9]/!d;/tar/!d;s|.*$SOURCE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
41 }
43 # Rules to configure and make the package.
44 compile_rules()
45 {
46 sed -i '/addrs_left/d' src/mod_extforward.c
48 ./configure \
49 --prefix=/usr \
50 --libdir=/usr/lib/lighttpd \
51 --mandir=/usr/share/man \
52 --disable-ipv6 \
53 --with-openssl \
54 --enable-shared \
55 $CONFIGURE_ARGS &&
56 make &&
57 make DESTDIR=$DESTDIR install
58 }
60 # Rules to gen a SliTaz package suitable for Tazpkg.
61 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
62 genpkg_rules()
63 {
64 mkdir -p $fs/usr
65 #cp -a $install/usr/bin $fs/usr
66 cp -a $install/usr/sbin $fs/usr
68 # Modules.
69 mkdir -p $fs/usr/lib/lighttpd
70 for module in $BASE_MODULES
71 do
72 action "Copying : mod_${module}.so"
73 cp $install/usr/lib/lighttpd/mod_${module}.so \
74 $fs/usr/lib/lighttpd
75 status
76 done
78 # Server root and configuration file.
79 cp -a $WOK/$SOURCE/stuff/etc $fs
80 chown -R 0.0 $fs/etc
81 mkdir -p $fs/etc/ssl/lighttpd
82 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT
84 # Enable HTTPS support
85 #
86 \$SERVER["socket"] == ":443" {
87 protocol = "https://"
88 ssl.engine = "enable"
89 # Unsafe, see CVE-2014-3566 POODLE
90 ssl.use-sslv2 = "disable"
91 ssl.use-sslv3 = "disable"
92 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem"
93 }
94 EOT
96 # Logs directory.
97 mkdir -p $fs/var/log/lighttpd
98 chown 80.80 $fs/var/log/lighttpd
99 }
101 # Make sure it is cross compiled properly
102 testsuite()
103 {
104 readelf -h $install/usr/sbin/lighttpd
105 }
107 # Pre and post install commands for Tazpkg.
108 # We stop the server by default in case of upgrade.
109 pre_install()
110 {
111 [ -z "$1" ] &&
112 for i in httpd lighttpd ngnix apache cherokee $PACKAGE
113 do
114 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
115 done
117 # Backup configuration file.
118 if [ -d "$1/etc/lighttpd" ]
119 then
120 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
121 fi
122 }
124 post_install()
125 {
126 if [ ! -f "$1/etc/ssl/lighttpd/lighttpd.pem" ]
127 then
128 openssl req -new -x509 \
129 -keyout "$1/etc/ssl/lighttpd/lighttpd.pem" \
130 -out "$1/etc/ssl/lighttpd/lighttpd.pem" \
131 -days 3650 -nodes <<EOT
132 $(. "$1/etc/locale.conf" ; echo ${LANG#*_})
133 $(cat "$1/etc/TZ")
135 $(cat "$1/etc/hostname")
139 EOT
140 fi
142 # Just in case.
143 chown www.www "$1/var/log/lighttpd"
144 if [ -z "$1" ]
145 then
146 for i in apache
147 do
148 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
149 done
150 /etc/init.d/lighttpd start
151 fi
152 }