wok annotate lighttpd/receipt @ rev 21712
get-LibreOffice: fix menu entries
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jun 09 10:58:25 2019 +0200 (2019-06-09) |
parents | 3630f18392bd |
children | fc1aa8675fab |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
Hans-G?nter@21356 | 4 VERSION="1.4.53" |
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" |
slaxemulator@8894 | 17 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf" |
Hans-G?nter@21356 | 18 |
pankso@16000 | 19 HOST_ARCH="i486 arm" |
pankso@15992 | 20 |
Hans-G?nter@21356 | 21 # Modules to be included in this package. Other modules are split in |
Hans-G?nter@21356 | 22 # the lighttpd-modules package. |
pankso@24 | 23 BASE_MODULES=" |
pankso@24 | 24 access |
pankso@24 | 25 accesslog |
pankso@24 | 26 alias |
pankso@24 | 27 cgi |
pankso@24 | 28 dirlisting |
pankso@24 | 29 indexfile |
pankso@24 | 30 staticfile |
pankso@24 | 31 rewrite |
pankso@24 | 32 status |
pankso@24 | 33 userdir" |
pankso@24 | 34 |
pankso@24 | 35 # Rules to configure and make the package. |
pankso@24 | 36 compile_rules() |
pankso@24 | 37 { |
pascal@15576 | 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 --prefix=/usr \ |
Hans-G?nter@21356 | 44 --libdir=/usr/lib/lighttpd \ |
Hans-G?nter@21356 | 45 --mandir=/usr/share/man \ |
Hans-G?nter@21356 | 46 $CONFIGURE_ARGS && |
Hans-G?nter@21356 | 47 make -j 1 && |
pascal@15577 | 48 make DESTDIR=$DESTDIR install |
pankso@24 | 49 } |
pankso@24 | 50 |
pankso@24 | 51 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 52 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 53 genpkg_rules() |
pankso@24 | 54 { |
pankso@24 | 55 mkdir -p $fs/usr |
pascal@15577 | 56 #cp -a $install/usr/bin $fs/usr |
pascal@15577 | 57 cp -a $install/usr/sbin $fs/usr |
pankso@4572 | 58 |
pankso@24 | 59 # Modules. |
pankso@24 | 60 mkdir -p $fs/usr/lib/lighttpd |
al@18741 | 61 for module in $BASE_MODULES; do |
pascal@15577 | 62 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 63 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 64 done |
pankso@4572 | 65 |
Hans-G?nter@21356 | 66 # Configuration file. |
pankso@9665 | 67 cp -a $stuff/etc $fs |
pankso@119 | 68 chown -R 0.0 $fs/etc |
pankso@4572 | 69 |
pankso@24 | 70 # Logs directory. |
pankso@24 | 71 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 72 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 73 } |
pankso@24 | 74 |
Hans-G?nter@21356 | 75 # Make sure it is cross compiled properly |
pankso@15992 | 76 testsuite() |
pankso@15992 | 77 { |
pankso@15992 | 78 readelf -h $install/usr/sbin/$PACKAGE |
pankso@15992 | 79 } |
pankso@15992 | 80 |
pankso@24 | 81 # Pre and post install commands for Tazpkg. |
Hans-G?nter@21356 | 82 # We stop the server by default in case of upgrade. |
pankso@24 | 83 pre_install() |
pankso@24 | 84 { |
pascal@19147 | 85 [ -z "$1" ] && for i in httpd ngnix apache cherokee $PACKAGE ; do |
pascal@19147 | 86 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
pascal@19147 | 87 done |
Hans-G?nter@21356 | 88 # Backup configuration file. |
pascal@18730 | 89 if [ -d "$1/etc/lighttpd" ]; then |
pascal@18730 | 90 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" |
pankso@2306 | 91 fi |
pankso@24 | 92 } |
al@18741 | 93 |
pankso@24 | 94 post_install() |
pankso@24 | 95 { |
Hans-G?nter@21356 | 96 # Restore original configuration file. |
pascal@18730 | 97 if [ -d "$1/etc/lighttpd.bak" ]; then |
pascal@18730 | 98 rm -rf "$1/etc/lighttpd" |
pascal@18730 | 99 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd" |
pankso@2306 | 100 fi |
al@18741 | 101 |
pankso@24 | 102 # Just in case. |
pascal@18730 | 103 chown www.www "$1/var/log/$PACKAGE" |
pascal@18715 | 104 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 || |
pascal@18715 | 105 /etc/init.d/$PACKAGE start |
pankso@24 | 106 } |