wok annotate lighttpd-ssl/receipt @ rev 23401
updated perl-test-pod-coverage (1.08 -> 1.10)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 31 17:42:48 2020 +0100 (2020-03-31) |
parents | ea835222df2a |
children | ede1d184d5c5 |
rev | line source |
---|---|
pascal@1787 | 1 # SliTaz package receipt. |
pascal@1787 | 2 |
pascal@1787 | 3 PACKAGE="lighttpd-ssl" |
Hans-G?nter@23131 | 4 VERSION="1.4.55" |
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@21356 | 17 DEPENDS="openssl pcre" |
Hans-G?nter@21356 | 18 BUILD_DEPENDS="bzip2-dev openssl-dev pcre-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@1787 | 36 # Rules to configure and make the package. |
pascal@1787 | 37 compile_rules() |
pascal@1787 | 38 { |
pascal@15579 | 39 sed -i '/addrs_left/d' src/mod_extforward.c |
Hans-G?nter@21356 | 40 |
Hans-G?nter@21356 | 41 ./configure \ |
Hans-G?nter@21356 | 42 --prefix=/usr \ |
Hans-G?nter@21356 | 43 --libdir=/usr/lib/lighttpd \ |
Hans-G?nter@21356 | 44 --mandir=/usr/share/man \ |
Hans-G?nter@23131 | 45 --disable-ipv6 \ |
Hans-G?nter@23131 | 46 --with-openssl \ |
Hans-G?nter@23131 | 47 --enable-shared \ |
al@18734 | 48 $CONFIGURE_ARGS && |
Hans-G?nter@21356 | 49 make -j 1 && |
pascal@15579 | 50 make DESTDIR=$DESTDIR install |
pascal@1787 | 51 } |
pascal@1787 | 52 |
pascal@1787 | 53 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1787 | 54 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pascal@1787 | 55 genpkg_rules() |
pascal@1787 | 56 { |
pascal@1787 | 57 mkdir -p $fs/usr |
pascal@15579 | 58 #cp -a $install/usr/bin $fs/usr |
pascal@15579 | 59 cp -a $install/usr/sbin $fs/usr |
pankso@4572 | 60 |
pascal@1787 | 61 # Modules. |
pascal@1787 | 62 mkdir -p $fs/usr/lib/lighttpd |
Hans-G?nter@23131 | 63 for module in $BASE_MODULES |
Hans-G?nter@23131 | 64 do |
Hans-G?nter@21356 | 65 action "Copying : mod_${module}.so" |
Hans-G?nter@23131 | 66 cp $install/usr/lib/lighttpd/mod_${module}.so \ |
Hans-G?nter@23131 | 67 $fs/usr/lib/lighttpd |
al@18734 | 68 status |
Hans-G?nter@23131 | 69 done |
pankso@4572 | 70 |
Hans-G?nter@21356 | 71 # Server root and configuration file. |
Hans-G?nter@23131 | 72 cp -a $WOK/$SOURCE/stuff/etc $fs |
Hans-G?nter@23131 | 73 chown -R 0.0 $fs/etc |
pascal@1790 | 74 mkdir -p $fs/etc/ssl/lighttpd |
pascal@1790 | 75 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT |
pascal@1789 | 76 |
pascal@1789 | 77 # Enable HTTPS support |
pascal@1789 | 78 # |
pascal@1791 | 79 \$SERVER["socket"] == ":443" { |
pascal@1789 | 80 protocol = "https://" |
pascal@1789 | 81 ssl.engine = "enable" |
pascal@17237 | 82 # Unsafe, see CVE-2014-3566 POODLE |
pascal@17237 | 83 ssl.use-sslv2 = "disable" |
pascal@17237 | 84 ssl.use-sslv3 = "disable" |
pascal@1789 | 85 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem" |
pascal@1789 | 86 } |
pascal@1789 | 87 EOT |
pankso@4572 | 88 |
pascal@1787 | 89 # Logs directory. |
pascal@1787 | 90 mkdir -p $fs/var/log/lighttpd |
Hans-G?nter@23131 | 91 chown 80.80 $fs/var/log/lighttpd |
pascal@1787 | 92 } |
pascal@1787 | 93 |
Hans-G?nter@21356 | 94 # Make sure it is cross compiled properly |
pankso@15992 | 95 testsuite() |
pankso@15992 | 96 { |
pankso@15992 | 97 readelf -h $install/usr/sbin/lighttpd |
pankso@15992 | 98 } |
pankso@15992 | 99 |
pascal@1787 | 100 # Pre and post install commands for Tazpkg. |
Hans-G?nter@21356 | 101 # We stop the server by default in case of upgrade. |
pascal@1787 | 102 pre_install() |
pascal@1787 | 103 { |
Hans-G?nter@23131 | 104 [ -z "$1" ] && |
Hans-G?nter@23131 | 105 for i in httpd lighttpd ngnix apache cherokee $PACKAGE |
Hans-G?nter@23131 | 106 do |
pascal@19147 | 107 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23131 | 108 done |
Hans-G?nter@23131 | 109 |
Hans-G?nter@21356 | 110 # Backup configuration file. |
Hans-G?nter@23131 | 111 if [ -d "$1/etc/lighttpd" ] |
Hans-G?nter@23131 | 112 then |
pascal@19147 | 113 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" |
pascal@19147 | 114 fi |
pascal@1787 | 115 } |
pascal@1906 | 116 |
pascal@1787 | 117 post_install() |
pascal@1787 | 118 { |
Hans-G?nter@23131 | 119 if [ ! -f "$1/etc/ssl/lighttpd/lighttpd.pem" ] |
Hans-G?nter@23131 | 120 then |
pascal@1789 | 121 openssl req -new -x509 \ |
pascal@18730 | 122 -keyout "$1/etc/ssl/lighttpd/lighttpd.pem" \ |
pascal@18730 | 123 -out "$1/etc/ssl/lighttpd/lighttpd.pem" \ |
pascal@1906 | 124 -days 3650 -nodes <<EOT |
pascal@18730 | 125 $(. "$1/etc/locale.conf" ; echo ${LANG#*_}) |
pascal@18730 | 126 $(cat "$1/etc/TZ") |
pascal@1789 | 127 |
pascal@18730 | 128 $(cat "$1/etc/hostname") |
pascal@1789 | 129 |
pascal@1789 | 130 |
pascal@1789 | 131 |
pascal@1789 | 132 EOT |
pascal@1789 | 133 fi |
Hans-G?nter@23131 | 134 |
pascal@1787 | 135 # Just in case. |
pascal@18730 | 136 chown www.www "$1/var/log/lighttpd" |
Hans-G?nter@23131 | 137 if [ -z "$1" ] |
Hans-G?nter@23131 | 138 then |
Hans-G?nter@23131 | 139 for i in apache |
Hans-G?nter@23131 | 140 do |
pascal@1905 | 141 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23131 | 142 done |
erjo@2620 | 143 /etc/init.d/lighttpd start |
pascal@1905 | 144 fi |
pascal@1787 | 145 } |