wok annotate lighttpd-ssl/receipt @ rev 22765

updated fltk packages (1.3.4.2 -> 1.3.5)
author Hans-G?nter Theisgen
date Sat Jan 25 13:47:19 2020 +0100 (2020-01-25)
parents 3630f18392bd
children fc1aa8675fab
rev   line source
pascal@1787 1 # SliTaz package receipt.
pascal@1787 2
pascal@1787 3 PACKAGE="lighttpd-ssl"
Hans-G?nter@21356 4 VERSION="1.4.53"
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"
slaxemulator@8894 19 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf /etc/ssl/lighttpd"
Hans-G?nter@21356 20
pankso@16000 21 HOST_ARCH="i486 arm"
pankso@15992 22
pascal@1787 23 BASE_MODULES="
pascal@1787 24 access
pascal@1787 25 accesslog
pascal@1787 26 alias
pascal@1787 27 cgi
pascal@1787 28 dirlisting
pascal@1787 29 indexfile
pascal@1787 30 staticfile
pascal@1787 31 rewrite
pascal@1787 32 status
pascal@1787 33 userdir"
pascal@1787 34
pascal@1787 35 # Rules to configure and make the package.
pascal@1787 36 compile_rules()
pascal@1787 37 {
pascal@15579 38 sed -i '/addrs_left/d' src/mod_extforward.c
Hans-G?nter@21356 39
Hans-G?nter@21356 40 ./configure \
Hans-G?nter@21356 41 --enable-shared \
Hans-G?nter@21356 42 --disable-ipv6 \
Hans-G?nter@21356 43 --with-openssl \
Hans-G?nter@21356 44 --prefix=/usr \
Hans-G?nter@21356 45 --libdir=/usr/lib/lighttpd \
Hans-G?nter@21356 46 --mandir=/usr/share/man \
al@18734 47 $CONFIGURE_ARGS &&
Hans-G?nter@21356 48 make -j 1 &&
pascal@15579 49 make DESTDIR=$DESTDIR install
pascal@1787 50 }
pascal@1787 51
pascal@1787 52 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1787 53 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
pascal@1787 54 genpkg_rules()
pascal@1787 55 {
pascal@1787 56 mkdir -p $fs/usr
pascal@15579 57 #cp -a $install/usr/bin $fs/usr
pascal@15579 58 cp -a $install/usr/sbin $fs/usr
pankso@4572 59
pascal@1787 60 # Modules.
pascal@1787 61 mkdir -p $fs/usr/lib/lighttpd
al@18734 62 for module in $BASE_MODULES; do
Hans-G?nter@21356 63 action "Copying : mod_${module}.so"
pascal@15579 64 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
al@18734 65 status
pascal@1787 66 done
pankso@4572 67
Hans-G?nter@21356 68 # Server root and configuration file.
slaxemulator@8652 69 cp -a $WOK/$SOURCE/stuff/etc $fs
pascal@1787 70 chown -R 0.0 $fs/etc
pascal@1790 71 mkdir -p $fs/etc/ssl/lighttpd
pascal@1790 72 cat >> $fs/etc/lighttpd/lighttpd.conf <<EOT
pascal@1789 73
pascal@1789 74 # Enable HTTPS support
pascal@1789 75 #
pascal@1791 76 \$SERVER["socket"] == ":443" {
pascal@1789 77 protocol = "https://"
pascal@1789 78 ssl.engine = "enable"
pascal@17237 79 # Unsafe, see CVE-2014-3566 POODLE
pascal@17237 80 ssl.use-sslv2 = "disable"
pascal@17237 81 ssl.use-sslv3 = "disable"
pascal@1789 82 ssl.pemfile = "/etc/ssl/lighttpd/lighttpd.pem"
pascal@1789 83 }
pascal@1789 84 EOT
pankso@4572 85
pascal@1787 86 # Logs directory.
pascal@1787 87 mkdir -p $fs/var/log/lighttpd
pascal@1787 88 chown 80.80 $fs/var/log/lighttpd
pascal@1787 89 }
pascal@1787 90
Hans-G?nter@21356 91 # Make sure it is cross compiled properly
pankso@15992 92 testsuite()
pankso@15992 93 {
pankso@15992 94 readelf -h $install/usr/sbin/lighttpd
pankso@15992 95 }
pankso@15992 96
pascal@1787 97 # Pre and post install commands for Tazpkg.
Hans-G?nter@21356 98 # We stop the server by default in case of upgrade.
pascal@1787 99 pre_install()
pascal@1787 100 {
pascal@19147 101 [ -z "$1" ] && for i in httpd lighttpd ngnix apache cherokee $PACKAGE ; do
pascal@19147 102 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
pascal@19147 103 done
Hans-G?nter@21356 104 # Backup configuration file.
pascal@19147 105 if [ -d "$1/etc/lighttpd" ]; then
pascal@19147 106 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
pascal@19147 107 fi
pascal@1787 108 }
pascal@1906 109
pascal@1787 110 post_install()
pascal@1787 111 {
pascal@18730 112 if [ ! -f "$1/etc/ssl/lighttpd/lighttpd.pem" ]; 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
pascal@18730 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
pascal@1787 126 # Just in case.
pascal@18730 127 chown www.www "$1/var/log/lighttpd"
pascal@1905 128 if [ -z "$1" ]; then
pascal@1905 129 for i in apache ; do
pascal@1905 130 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
pascal@1905 131 done
erjo@2620 132 /etc/init.d/lighttpd start
pascal@1905 133 fi
pascal@1787 134 }