wok-current annotate lighttpd/receipt @ rev 24366

created recipe for geany-lang-1.23.1
author Hans-G?nter Theisgen
date Sat Feb 05 07:22:28 2022 +0100 (2022-02-05)
parents ea835222df2a
children ede1d184d5c5
rev   line source
pankso@24 1 # SliTaz package receipt.
pankso@24 2
pankso@24 3 PACKAGE="lighttpd"
Hans-G?nter@23131 4 VERSION="1.4.55"
pankso@211 5 CATEGORY="network"
pankso@24 6 SHORT_DESC="Fast and light HTTP Web server."
pankso@24 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@15576 11 TARBALL="$PACKAGE-$VERSION.tar.xz"
Hans-G?nter@21356 12 WGET_URL="https://download.lighttpd.net/$PACKAGE/releases-${VERSION%.*}.x/$TARBALL"
Hans-G?nter@21356 13
Hans-G?nter@21356 14 SUGGESTED="lighttpd-modules perl php python"
Hans-G?nter@21356 15 DEPENDS="pcre"
Hans-G?nter@21356 16 BUILD_DEPENDS="bzip2-dev pcre-dev"
Hans-G?nter@23131 17
slaxemulator@8894 18 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
Hans-G?nter@21356 19
pankso@16000 20 HOST_ARCH="i486 arm"
pankso@15992 21
Hans-G?nter@21356 22 # Modules to be included in this package. Other modules are split in
Hans-G?nter@21356 23 # the lighttpd-modules package.
pankso@24 24 BASE_MODULES="
pankso@24 25 access
pankso@24 26 accesslog
pankso@24 27 alias
pankso@24 28 cgi
pankso@24 29 dirlisting
pankso@24 30 indexfile
pankso@24 31 staticfile
pankso@24 32 rewrite
pankso@24 33 status
pankso@24 34 userdir"
pankso@24 35
pankso@24 36 # Rules to configure and make the package.
pankso@24 37 compile_rules()
pankso@24 38 {
pascal@15576 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 --enable-shared \
Hans-G?nter@21356 47 $CONFIGURE_ARGS &&
Hans-G?nter@21356 48 make -j 1 &&
pascal@15577 49 make DESTDIR=$DESTDIR install
pankso@24 50 }
pankso@24 51
pankso@24 52 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@24 53 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
pankso@24 54 genpkg_rules()
pankso@24 55 {
pankso@24 56 mkdir -p $fs/usr
Hans-G?nter@23131 57 #cp -a $install/usr/bin $fs/usr
Hans-G?nter@23131 58 cp -a $install/usr/sbin $fs/usr
pankso@4572 59
pankso@24 60 # Modules.
pankso@24 61 mkdir -p $fs/usr/lib/lighttpd
Hans-G?nter@23131 62 for module in $BASE_MODULES
Hans-G?nter@23131 63 do
Hans-G?nter@23131 64 cp $install/usr/lib/lighttpd/mod_${module}.so \
Hans-G?nter@23131 65 $fs/usr/lib/lighttpd
pankso@24 66 echo -n "Copying : mod_${module}.so" && status
Hans-G?nter@23131 67 done
pankso@4572 68
Hans-G?nter@21356 69 # Configuration file.
Hans-G?nter@23131 70 cp -a $stuff/etc $fs
Hans-G?nter@23131 71 chown -R 0.0 $fs/etc
pankso@4572 72
pankso@24 73 # Logs directory.
pankso@24 74 mkdir -p $fs/var/log/lighttpd
pankso@24 75 chown 80.80 $fs/var/log/lighttpd
pankso@24 76 }
pankso@24 77
Hans-G?nter@21356 78 # Make sure it is cross compiled properly
pankso@15992 79 testsuite()
pankso@15992 80 {
pankso@15992 81 readelf -h $install/usr/sbin/$PACKAGE
pankso@15992 82 }
pankso@15992 83
pankso@24 84 # Pre and post install commands for Tazpkg.
Hans-G?nter@21356 85 # We stop the server by default in case of upgrade.
pankso@24 86 pre_install()
pankso@24 87 {
Hans-G?nter@23131 88 [ -z "$1" ] &&
Hans-G?nter@23131 89 for i in httpd ngnix apache cherokee $PACKAGE
Hans-G?nter@23131 90 do
pascal@19147 91 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
Hans-G?nter@23131 92 done
Hans-G?nter@23131 93
Hans-G?nter@21356 94 # Backup configuration file.
Hans-G?nter@23131 95 if [ -d "$1/etc/lighttpd" ]
Hans-G?nter@23131 96 then
pascal@18730 97 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
pankso@2306 98 fi
pankso@24 99 }
al@18741 100
pankso@24 101 post_install()
pankso@24 102 {
Hans-G?nter@21356 103 # Restore original configuration file.
Hans-G?nter@23131 104 if [ -d "$1/etc/lighttpd.bak" ]
Hans-G?nter@23131 105 then
pascal@18730 106 rm -rf "$1/etc/lighttpd"
pascal@18730 107 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd"
pankso@2306 108 fi
al@18741 109
pankso@24 110 # Just in case.
pascal@18730 111 chown www.www "$1/var/log/$PACKAGE"
pascal@18715 112 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 ||
pascal@18715 113 /etc/init.d/$PACKAGE start
pankso@24 114 }