wok annotate lighttpd/receipt @ rev 25591
enet: update wget_url
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jun 22 11:01:59 2023 +0000 (14 months ago) |
parents | ede1d184d5c5 |
children |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
Hans-G?nter@24856 | 4 VERSION="1.4.64" |
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@24856 | 15 DEPENDS="pcre2" |
Hans-G?nter@24856 | 16 BUILD_DEPENDS="bzip2-dev pcre2-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 |
pascal@24447 | 36 # What is the latest version available today? |
pascal@24447 | 37 current_version() |
pascal@24447 | 38 { |
pascal@24447 | 39 wget -O - $WEB_SITE 2>/dev/null | \ |
pascal@24447 | 40 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24447 | 41 } |
pascal@24447 | 42 |
pankso@24 | 43 # Rules to configure and make the package. |
pankso@24 | 44 compile_rules() |
pankso@24 | 45 { |
pascal@15576 | 46 sed -i '/addrs_left/d' src/mod_extforward.c |
Hans-G?nter@21356 | 47 |
Hans-G?nter@21356 | 48 ./configure \ |
Hans-G?nter@21356 | 49 --prefix=/usr \ |
Hans-G?nter@21356 | 50 --libdir=/usr/lib/lighttpd \ |
Hans-G?nter@21356 | 51 --mandir=/usr/share/man \ |
Hans-G?nter@23131 | 52 --disable-ipv6 \ |
Hans-G?nter@23131 | 53 --enable-shared \ |
Hans-G?nter@21356 | 54 $CONFIGURE_ARGS && |
Hans-G?nter@24856 | 55 make && |
Hans-G?nter@24856 | 56 make install DESTDIR=$DESTDIR |
pankso@24 | 57 } |
pankso@24 | 58 |
pankso@24 | 59 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 60 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 61 genpkg_rules() |
pankso@24 | 62 { |
pankso@24 | 63 mkdir -p $fs/usr |
Hans-G?nter@23131 | 64 #cp -a $install/usr/bin $fs/usr |
Hans-G?nter@23131 | 65 cp -a $install/usr/sbin $fs/usr |
pankso@4572 | 66 |
pankso@24 | 67 # Modules. |
pankso@24 | 68 mkdir -p $fs/usr/lib/lighttpd |
Hans-G?nter@23131 | 69 for module in $BASE_MODULES |
Hans-G?nter@23131 | 70 do |
Hans-G?nter@23131 | 71 cp $install/usr/lib/lighttpd/mod_${module}.so \ |
Hans-G?nter@23131 | 72 $fs/usr/lib/lighttpd |
pankso@24 | 73 echo -n "Copying : mod_${module}.so" && status |
Hans-G?nter@23131 | 74 done |
pankso@4572 | 75 |
Hans-G?nter@21356 | 76 # Configuration file. |
Hans-G?nter@23131 | 77 cp -a $stuff/etc $fs |
Hans-G?nter@23131 | 78 chown -R 0.0 $fs/etc |
pankso@4572 | 79 |
pankso@24 | 80 # Logs directory. |
Hans-G?nter@24856 | 81 mkdir -p $fs/var/log/lighttpd |
Hans-G?nter@24856 | 82 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 83 } |
pankso@24 | 84 |
Hans-G?nter@21356 | 85 # Make sure it is cross compiled properly |
pankso@15992 | 86 testsuite() |
pankso@15992 | 87 { |
pankso@15992 | 88 readelf -h $install/usr/sbin/$PACKAGE |
pankso@15992 | 89 } |
pankso@15992 | 90 |
pankso@24 | 91 # Pre and post install commands for Tazpkg. |
Hans-G?nter@21356 | 92 # We stop the server by default in case of upgrade. |
pankso@24 | 93 pre_install() |
pankso@24 | 94 { |
Hans-G?nter@23131 | 95 [ -z "$1" ] && |
Hans-G?nter@23131 | 96 for i in httpd ngnix apache cherokee $PACKAGE |
Hans-G?nter@23131 | 97 do |
pascal@19147 | 98 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
Hans-G?nter@23131 | 99 done |
Hans-G?nter@23131 | 100 |
Hans-G?nter@21356 | 101 # Backup configuration file. |
Hans-G?nter@23131 | 102 if [ -d "$1/etc/lighttpd" ] |
Hans-G?nter@23131 | 103 then |
pascal@18730 | 104 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" |
pankso@2306 | 105 fi |
pankso@24 | 106 } |
al@18741 | 107 |
pankso@24 | 108 post_install() |
pankso@24 | 109 { |
Hans-G?nter@21356 | 110 # Restore original configuration file. |
Hans-G?nter@23131 | 111 if [ -d "$1/etc/lighttpd.bak" ] |
Hans-G?nter@23131 | 112 then |
pascal@18730 | 113 rm -rf "$1/etc/lighttpd" |
pascal@18730 | 114 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd" |
pankso@2306 | 115 fi |
al@18741 | 116 |
pankso@24 | 117 # Just in case. |
pascal@18730 | 118 chown www.www "$1/var/log/$PACKAGE" |
pascal@18715 | 119 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 || |
pascal@18715 | 120 /etc/init.d/$PACKAGE start |
pankso@24 | 121 } |