wok annotate lighttpd/receipt @ rev 20752
updated bmon (3.6 -> 4.0)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Feb 12 13:58:21 2019 +0100 (2019-02-12) |
parents | 6fab3264ba87 |
children | ea835222df2a |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
pascal@18101 | 4 VERSION="1.4.35" |
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" |
pankso@639 | 9 SUGGESTED="lighttpd-modules php perl python" |
pascal@15576 | 10 TARBALL="$PACKAGE-$VERSION.tar.xz" |
pankso@24 | 11 WEB_SITE="http://www.lighttpd.net/" |
pascal@17869 | 12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-${VERSION%.*}.x/$TARBALL" |
slaxemulator@8894 | 13 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf" |
pankso@16000 | 14 HOST_ARCH="i486 arm" |
pankso@15992 | 15 |
pankso@15992 | 16 DEPENDS="pcre" |
pankso@15992 | 17 BUILD_DEPENDS="pcre-dev bzip2-dev" |
pankso@15992 | 18 |
pankso@15992 | 19 # Modules include in this package. Other modules are splited in |
pankso@15992 | 20 # the lighttpd-modules packages. |
pankso@24 | 21 BASE_MODULES=" |
pankso@24 | 22 access |
pankso@24 | 23 accesslog |
pankso@24 | 24 alias |
pankso@24 | 25 cgi |
pankso@24 | 26 dirlisting |
pankso@24 | 27 indexfile |
pankso@24 | 28 staticfile |
pankso@24 | 29 rewrite |
pankso@24 | 30 status |
pankso@24 | 31 userdir" |
pankso@24 | 32 |
pankso@24 | 33 # Rules to configure and make the package. |
pankso@24 | 34 compile_rules() |
pankso@24 | 35 { |
pascal@15576 | 36 sed -i '/addrs_left/d' src/mod_extforward.c |
pankso@639 | 37 ./configure \ |
pankso@639 | 38 --enable-shared \ |
pankso@639 | 39 --disable-ipv6 \ |
pankso@639 | 40 --prefix=/usr \ |
pascal@15577 | 41 --libdir=/usr/lib/lighttpd \ |
pascal@15577 | 42 --mandir=/usr/share/man \ |
pascal@15577 | 43 $CONFIGURE_ARGS && |
pascal@1516 | 44 make && |
pascal@15577 | 45 make DESTDIR=$DESTDIR install |
pankso@24 | 46 } |
pankso@24 | 47 |
pankso@24 | 48 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 49 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 50 genpkg_rules() |
pankso@24 | 51 { |
pankso@24 | 52 mkdir -p $fs/usr |
pascal@15577 | 53 #cp -a $install/usr/bin $fs/usr |
pascal@15577 | 54 cp -a $install/usr/sbin $fs/usr |
pankso@4572 | 55 |
pankso@24 | 56 # Modules. |
pankso@24 | 57 mkdir -p $fs/usr/lib/lighttpd |
al@18741 | 58 for module in $BASE_MODULES; do |
pascal@15577 | 59 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 60 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 61 done |
pankso@4572 | 62 |
pankso@16333 | 63 # Config file. |
pankso@9665 | 64 cp -a $stuff/etc $fs |
pankso@119 | 65 chown -R 0.0 $fs/etc |
pankso@4572 | 66 |
pankso@24 | 67 # Logs directory. |
pankso@24 | 68 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 69 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 70 } |
pankso@24 | 71 |
pankso@15992 | 72 # Make sur it as cross compile properly |
pankso@15992 | 73 testsuite() |
pankso@15992 | 74 { |
pankso@15992 | 75 readelf -h $install/usr/sbin/$PACKAGE |
pankso@15992 | 76 } |
pankso@15992 | 77 |
pankso@24 | 78 # Pre and post install commands for Tazpkg. |
pankso@24 | 79 # We stop the server by default in case of upgarde. |
pankso@24 | 80 pre_install() |
pankso@24 | 81 { |
pascal@19147 | 82 [ -z "$1" ] && for i in httpd ngnix apache cherokee $PACKAGE ; do |
pascal@19147 | 83 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
pascal@19147 | 84 done |
pankso@2306 | 85 # Backup config file. |
pascal@18730 | 86 if [ -d "$1/etc/lighttpd" ]; then |
pascal@18730 | 87 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" |
pankso@2306 | 88 fi |
pankso@24 | 89 } |
al@18741 | 90 |
pankso@24 | 91 post_install() |
pankso@24 | 92 { |
pankso@2306 | 93 # Restore original config. |
pascal@18730 | 94 if [ -d "$1/etc/lighttpd.bak" ]; then |
pascal@18730 | 95 rm -rf "$1/etc/lighttpd" |
pascal@18730 | 96 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd" |
pankso@2306 | 97 fi |
al@18741 | 98 |
pankso@24 | 99 # Just in case. |
pascal@18730 | 100 chown www.www "$1/var/log/$PACKAGE" |
pascal@18715 | 101 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 || |
pascal@18715 | 102 /etc/init.d/$PACKAGE start |
pankso@24 | 103 } |