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