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