wok-next annotate lighttpd/receipt @ rev 21540

updated cantarell-fonts (0.111 -> 0.201)
author Hans-G?nter Theisgen
date Sun Jun 21 16:26:44 2020 +0100 (2020-06-21)
parents d5aab818505e
children
rev   line source
pascal@19986 1 # SliTaz package receipt v2.
pankso@24 2
pankso@24 3 PACKAGE="lighttpd"
pascal@18101 4 VERSION="1.4.35"
pankso@211 5 CATEGORY="network"
al@20595 6 SHORT_DESC="Fast and light HTTP Web server"
al@21020 7 MAINTAINER="devel@slitaz.org"
pascal@15379 8 LICENSE="BSD"
al@20595 9 WEB_SITE="http://www.lighttpd.net/"
al@20595 10
pascal@15576 11 TARBALL="$PACKAGE-$VERSION.tar.xz"
pascal@17869 12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-${VERSION%.*}.x/$TARBALL"
pankso@15992 13
pascal@19986 14 BUILD_DEPENDS="pcre-dev bzip2-dev zlib-dev"
al@21020 15 SPLIT="$PACKAGE-modules"
pankso@24 16
al@20595 17 compile_rules() {
pascal@15576 18 sed -i '/addrs_left/d' src/mod_extforward.c
al@20595 19
pankso@639 20 ./configure \
pankso@639 21 --enable-shared \
pankso@639 22 --disable-ipv6 \
pascal@15577 23 --libdir=/usr/lib/lighttpd \
al@20595 24 $CONFIGURE_ARGS &&
al@20595 25 fix libtool &&
pascal@1516 26 make &&
al@21020 27 make DESTDIR=$install install
pankso@24 28 }
pankso@24 29
pankso@24 30 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
al@20595 31 genpkg_rules() {
pascal@19986 32 case $PACKAGE in
al@20749 33 lighttpd)
al@20749 34 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
al@20749 35 SUGGESTED="lighttpd-modules php perl python"
al@20749 36 DEPENDS="libpcre"
al@20749 37 # Modules include in this package. Other modules are splited in
al@20749 38 # the lighttpd-modules packages.
al@20749 39 BASE_MODULES="
pascal@19986 40 access
pascal@19986 41 accesslog
pascal@19986 42 alias
pascal@19986 43 cgi
pascal@19986 44 dirlisting
pascal@19986 45 indexfile
pascal@19986 46 staticfile
pascal@19986 47 rewrite
pascal@19986 48 status
pascal@19986 49 userdir"
al@20749 50 mkdir -p $fs/usr
al@20749 51 #cp -a $install/usr/bin $fs/usr
al@20749 52 cp -a $install/usr/sbin $fs/usr
pankso@4572 53
al@20749 54 # Modules.
al@20749 55 mkdir -p $fs/usr/lib/lighttpd
al@20749 56 for module in $BASE_MODULES; do
al@21020 57 action "Copying: mod_$module.so"
al@21020 58 cp $install/usr/lib/lighttpd/mod_$module.so $fs/usr/lib/lighttpd
al@21020 59 status
al@20749 60 done
pankso@4572 61
al@20749 62 # Config file.
al@20749 63 cp -a $stuff/etc $fs
al@20749 64 chown -R 0.0 $fs/etc
pankso@4572 65
al@20749 66 # Logs directory.
al@20749 67 mkdir -p $fs/var/log/lighttpd
al@20749 68 chown 80.80 $fs/var/log/lighttpd
al@20749 69 ;;
al@20749 70 lighttpd-modules)
al@20749 71 CAT="network|complementary modules"
al@21105 72 DEPENDS="libbzip2 libpcre zlib lighttpd"
al@20749 73 BASE_MODULES="
pascal@19986 74 access
pascal@19986 75 accesslog
pascal@19986 76 alias
pascal@19986 77 cgi
pascal@19986 78 dirlisting
pascal@19986 79 indexfile
pascal@19986 80 staticfile
pascal@19986 81 rewrite
pascal@19986 82 status
pascal@19986 83 userdir"
al@20749 84 # Modules.
al@20749 85 mkdir -p $fs/usr/
al@20749 86 cp -a $install/usr/lib $fs/usr
al@20749 87 for module in $BASE_MODULES; do
al@21020 88 rm -f $fs/usr/lib/lighttpd/mod_$module.so
al@20749 89 done
al@20749 90 rm -f $fs/usr/lib/lighttpd/*.la
al@20749 91 ;;
pascal@19986 92 esac
pankso@24 93 }
pankso@24 94
al@20595 95 # Make sure it as cross compile properly
al@20595 96 testsuite() {
pankso@15992 97 readelf -h $install/usr/sbin/$PACKAGE
pankso@15992 98 }
pankso@15992 99
pankso@24 100 # We stop the server by default in case of upgarde.
al@20595 101 pre_install_lighttpd() {
al@21020 102 [ -z "$1" ] &&
al@21020 103 for i in httpd ngnix apache cherokee lighttpd; do
pascal@19147 104 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
pascal@19147 105 done
pankso@2306 106 # Backup config file.
pascal@18730 107 if [ -d "$1/etc/lighttpd" ]; then
pascal@18730 108 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
pankso@2306 109 fi
pankso@24 110 }
al@18741 111
al@20595 112 post_install_lighttpd() {
pankso@2306 113 # Restore original config.
pascal@18730 114 if [ -d "$1/etc/lighttpd.bak" ]; then
pascal@18730 115 rm -rf "$1/etc/lighttpd"
pascal@18730 116 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd"
pankso@2306 117 fi
al@18741 118
pankso@24 119 # Just in case.
pascal@18730 120 chown www.www "$1/var/log/$PACKAGE"
al@21020 121 [ -n "$1" ] ||
al@21020 122 netstat -ltn 2>/dev/null | grep -q :80 ||
al@21020 123 /etc/init.d/$PACKAGE start
pankso@24 124 }