wok-6.x annotate lighttpd-ssl/receipt @ rev 24856
updated lighttpd, lighttpd-modules and lighttpd-ssl (1.4.55 -> 1.4.64)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Mar 28 15:28:13 2022 +0100 (2022-03-28) |
parents | ede1d184d5c5 |
children |
rev | line source |
---|---|
pascal@1787 | 1 # SliTaz package receipt. |
pascal@1787 | 2 |
pascal@1787 | 3 PACKAGE="lighttpd-ssl" |
Hans-G?nter@24856 | 4 VERSION="1.4.64" |
pascal@1787 | 5 CATEGORY="network" |
pascal@1787 | 6 SHORT_DESC="Fast and light HTTP Web server with SSL support." |
pascal@1787 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15379 | 8 LICENSE="BSD" |
Hans-G?nter@21356 | 9 WEB_SITE="https://www.lighttpd.net/" |
Hans-G?nter@21356 | 10 |
pascal@1787 | 11 SOURCE="lighttpd" |
pascal@15579 | 12 TARBALL="$SOURCE-$VERSION.tar.xz" |
Hans-G?nter@21356 | 13 WGET_URL="https://download.lighttpd.net/$SOURCE/releases-${VERSION%.*}.x/$TARBALL" |
Hans-G?nter@21356 | 14 |
Hans-G?nter@21356 | 15 PROVIDE="lighttpd" |
Hans-G?nter@21356 | 16 SUGGESTED="lighttpd-modules perl php python" |
Hans-G?nter@24856 | 17 DEPENDS="openssl pcre2" |
Hans-G?nter@24856 | 18 BUILD_DEPENDS="bzip2-dev openssl-dev pcre2-dev" |
Hans-G?nter@23131 | 19 |
slaxemulator@8894 | 20 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf /etc/ssl/lighttpd" |
Hans-G?nter@21356 | 21 |
pankso@16000 | 22 HOST_ARCH="i486 arm" |
pankso@15992 | 23 |
pascal@1787 | 24 BASE_MODULES=" |
pascal@1787 | 25 access |
pascal@1787 | 26 accesslog |
pascal@1787 | 27 alias |
pascal@1787 | 28 cgi |
pascal@1787 | 29 dirlisting |
pascal@1787 | 30 indexfile |
pascal@1787 | 31 staticfile |
pascal@1787 | 32 rewrite |
pascal@1787 | 33 status |
pascal@1787 | 34 userdir" |
pascal@1787 | 35 |
pascal@24447 | 36 # What is the latest version available today? |
pascal@24447 | 37 current_version() |
pascal@24447 | 38 { |
pascal@24447 | 39 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24447 | 40 sed "/latest/d;/$SOURCE-[0-9]/!d;/tar/!d;s|.*$SOURCE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24447 | 41 } |
pascal@24447 | 42 |
pascal@1787 | 43 # Rules to configure and make the package. |
pascal@1787 | 44 compile_rules() |
pascal@1787 | 45 { |
pascal@15579 | 46 sed -i '/addrs_left/d' src/mod_extforward.c |
Hans-G?nter@21356 | 47 |
Hans-G?nter@21356 | 48 ./configure \ |
Hans-G?nter@21356 | 49 --prefix=/usr \ |
Hans-G?nter@21356 | 50 --libdir=/usr/lib/lighttpd \ |
Hans-G?nter@21356 | 51 --mandir=/usr/share/man \ |
Hans-G?nter@23131 | 52 --disable-ipv6 \ |
Hans-G?nter@23131 | 53 --with-openssl \ |
Hans-G?nter@23131 | 54 --enable-shared \ |
al@18734 | 55 $CONFIGURE_ARGS && |
Hans-G?nter@24856 | 56 make && |
pascal@15579 | 57 make DESTDIR=$DESTDIR install |
pascal@1787 | 58 } |
pascal@1787 | 59 |
pascal@1787 | 60 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1787 | 61 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pascal@1787 | 62 genpkg_rules() |
pascal@1787 | 63 { |
pascal@1787 | 64 mkdir -p $fs/usr |
pascal@15579 | 65 #cp -a $install/usr/bin $fs/usr |
pascal@15579 | 66 cp -a $install/usr/sbin $fs/usr |
pankso@4572 | 67 |
pascal@1787 | 68 # Modules. |
pascal@1787 | 69 mkdir -p $fs/usr/lib/lighttpd |
Hans-G?nter@23131 | 70 for module in $BASE_MODULES |
Hans-G?nter@23131 | 71 do |
Hans-G?nter@21356 | 72 action "Copying : mod_${module}.so" |
Hans-G?nter@23131 | 73 cp $install/usr/lib/lighttpd/mod_${module}.so \ |
Hans-G?nter@23131 | 74 $fs/usr/lib/lighttpd |
al@18734 | 75 status |
Hans-G?nter@23131 | 76 done |
pankso@4572 | 77 |
Hans-G?nter@21356 | 78 # Server root and configuration file. |
Hans-G?nter@23131 | 79 cp -a $WOK/$SOURCE/stuff/etc $fs |
Hans-G?nter@23131 | 80 chown -R 0.0 $fs/etc |
pascal@1790 | 81 mkdir -p $fs/etc/ssl/lighttpd |
pascal@1790 | 82 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT |
pascal@1789 | 83 |
pascal@1789 | 84 # Enable HTTPS support |
pascal@1789 | 85 # |
pascal@1791 | 86 \$SERVER["socket"] == ":443" { |
pascal@1789 | 87 protocol = "https://" |
pascal@1789 | 88 ssl.engine = "enable" |
pascal@17237 | 89 # Unsafe, see CVE-2014-3566 POODLE |
pascal@17237 | 90 ssl.use-sslv2 = "disable" |
pascal@17237 | 91 ssl.use-sslv3 = "disable" |
pascal@1789 | 92 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem" |
pascal@1789 | 93 } |
pascal@1789 | 94 EOT |
pankso@4572 | 95 |
pascal@1787 | 96 # Logs directory. |
pascal@1787 | 97 mkdir -p $fs/var/log/lighttpd |
Hans-G?nter@23131 | 98 chown 80.80 $fs/var/log/lighttpd |
pascal@1787 | 99 } |
pascal@1787 | 100 |
Hans-G?nter@21356 | 101 # Make sure it is cross compiled properly |
pankso@15992 | 102 testsuite() |
pankso@15992 | 103 { |
pankso@15992 | 104 readelf -h $install/usr/sbin/lighttpd |
pankso@15992 | 105 } |
pankso@15992 | 106 |
pascal@1787 | 107 # Pre and post install commands for Tazpkg. |
Hans-G?nter@21356 | 108 # We stop the server by default in case of upgrade. |
pascal@1787 | 109 pre_install() |
pascal@1787 | 110 { |
Hans-G?nter@23131 | 111 [ -z "$1" ] && |
Hans-G?nter@23131 | 112 for i in httpd lighttpd ngnix apache cherokee $PACKAGE |
Hans-G?nter@23131 | 113 do |
pascal@19147 | 114 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23131 | 115 done |
Hans-G?nter@23131 | 116 |
Hans-G?nter@21356 | 117 # Backup configuration file. |
Hans-G?nter@23131 | 118 if [ -d "$1/etc/lighttpd" ] |
Hans-G?nter@23131 | 119 then |
pascal@19147 | 120 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" |
pascal@19147 | 121 fi |
pascal@1787 | 122 } |
pascal@1906 | 123 |
pascal@1787 | 124 post_install() |
pascal@1787 | 125 { |
Hans-G?nter@23131 | 126 if [ ! -f "$1/etc/ssl/lighttpd/lighttpd.pem" ] |
Hans-G?nter@23131 | 127 then |
pascal@1789 | 128 openssl req -new -x509 \ |
pascal@18730 | 129 -keyout "$1/etc/ssl/lighttpd/lighttpd.pem" \ |
pascal@18730 | 130 -out "$1/etc/ssl/lighttpd/lighttpd.pem" \ |
pascal@1906 | 131 -days 3650 -nodes <<EOT |
pascal@18730 | 132 $(. "$1/etc/locale.conf" ; echo ${LANG#*_}) |
pascal@18730 | 133 $(cat "$1/etc/TZ") |
pascal@1789 | 134 |
pascal@18730 | 135 $(cat "$1/etc/hostname") |
pascal@1789 | 136 |
pascal@1789 | 137 |
pascal@1789 | 138 |
pascal@1789 | 139 EOT |
pascal@1789 | 140 fi |
Hans-G?nter@23131 | 141 |
pascal@1787 | 142 # Just in case. |
pascal@18730 | 143 chown www.www "$1/var/log/lighttpd" |
Hans-G?nter@23131 | 144 if [ -z "$1" ] |
Hans-G?nter@23131 | 145 then |
Hans-G?nter@23131 | 146 for i in apache |
Hans-G?nter@23131 | 147 do |
pascal@1905 | 148 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23131 | 149 done |
erjo@2620 | 150 /etc/init.d/lighttpd start |
pascal@1905 | 151 fi |
pascal@1787 | 152 } |