wok-6.x annotate lighttpd/receipt @ rev 18741
Finish to remove redundant messages 'Processing * commands...'; KISS get-msttcorefonts; add get-msttcorefonts2
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 25 15:23:46 2015 +0200 (2015-12-25) |
parents | 9e01bc6321ea |
children | 3630f18392bd |
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@1204 | 82 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop |
pankso@2306 | 83 # Backup config file. |
pascal@18730 | 84 if [ -d "$1/etc/lighttpd" ]; then |
pascal@18730 | 85 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak" |
pankso@2306 | 86 fi |
pankso@24 | 87 } |
al@18741 | 88 |
pankso@24 | 89 post_install() |
pankso@24 | 90 { |
pankso@2306 | 91 # Restore original config. |
pascal@18730 | 92 if [ -d "$1/etc/lighttpd.bak" ]; then |
pascal@18730 | 93 rm -rf "$1/etc/lighttpd" |
pascal@18730 | 94 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd" |
pankso@2306 | 95 fi |
al@18741 | 96 |
pankso@24 | 97 # Just in case. |
pascal@18730 | 98 chown www.www "$1/var/log/$PACKAGE" |
pascal@18715 | 99 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 || |
pascal@18715 | 100 /etc/init.d/$PACKAGE start |
pankso@24 | 101 } |