wok annotate lighttpd/receipt @ rev 17730
dahdi-linux: use linux-module-headers & xz
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 06 08:37:28 2015 +0100 (2015-03-06) |
parents | e6759743694c |
children | d3eb5f4b53ea |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
pascal@15575 | 4 VERSION="1.4.33" |
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@4575 | 12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-1.4.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 { |
pankso@24 | 36 cd $src |
pascal@15576 | 37 sed -i '/addrs_left/d' src/mod_extforward.c |
pankso@639 | 38 ./configure \ |
pankso@639 | 39 --enable-shared \ |
pankso@639 | 40 --disable-ipv6 \ |
pankso@639 | 41 --prefix=/usr \ |
pascal@15577 | 42 --libdir=/usr/lib/lighttpd \ |
pascal@15577 | 43 --mandir=/usr/share/man \ |
pascal@15577 | 44 $CONFIGURE_ARGS && |
pascal@1516 | 45 make && |
pascal@15577 | 46 make DESTDIR=$DESTDIR install |
pankso@24 | 47 } |
pankso@24 | 48 |
pankso@24 | 49 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 50 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 51 genpkg_rules() |
pankso@24 | 52 { |
pankso@24 | 53 mkdir -p $fs/usr |
pascal@15577 | 54 #cp -a $install/usr/bin $fs/usr |
pascal@15577 | 55 cp -a $install/usr/sbin $fs/usr |
pankso@4572 | 56 |
pankso@24 | 57 # Modules. |
pankso@24 | 58 mkdir -p $fs/usr/lib/lighttpd |
pankso@24 | 59 for module in $BASE_MODULES |
pankso@24 | 60 do |
pascal@15577 | 61 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 62 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 63 done |
pankso@4572 | 64 |
pankso@16333 | 65 # Config file. |
pankso@9665 | 66 cp -a $stuff/etc $fs |
pankso@119 | 67 chown -R 0.0 $fs/etc |
pankso@4572 | 68 |
pankso@24 | 69 # Logs directory. |
pankso@24 | 70 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 71 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 72 } |
pankso@24 | 73 |
pankso@15992 | 74 # Make sur it as cross compile properly |
pankso@15992 | 75 testsuite() |
pankso@15992 | 76 { |
pankso@15992 | 77 readelf -h $install/usr/sbin/$PACKAGE |
pankso@15992 | 78 } |
pankso@15992 | 79 |
pankso@24 | 80 # Pre and post install commands for Tazpkg. |
pankso@24 | 81 # We stop the server by default in case of upgarde. |
pankso@24 | 82 pre_install() |
pankso@24 | 83 { |
pankso@24 | 84 echo "Processing pre-install commands..." |
pascal@1204 | 85 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop |
pankso@2306 | 86 # Backup config file. |
pascal@15575 | 87 if [ -d $1/etc/lighttpd ]; then |
pascal@15575 | 88 cp -a $1/etc/lighttpd $1/etc/lighttpd.bak |
pankso@2306 | 89 fi |
pankso@24 | 90 } |
pankso@24 | 91 post_install() |
pankso@24 | 92 { |
pankso@24 | 93 echo "Processing post-install commands..." |
pankso@2306 | 94 # Restore original config. |
pascal@15575 | 95 if [ -d $1/etc/lighttpd.bak ]; then |
pascal@15575 | 96 rm -rf $1/etc/lighttpd |
pascal@15575 | 97 mv $1/etc/lighttpd.bak $1/etc/lighttpd |
pankso@2306 | 98 fi |
pankso@24 | 99 # Just in case. |
pascal@1905 | 100 chown www.www $1/var/log/$PACKAGE |
pascal@1905 | 101 if [ -z "$1" ]; then |
pankso@10811 | 102 for i in apache httpd; do |
pascal@1905 | 103 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
pascal@1905 | 104 done |
pascal@1905 | 105 /etc/init.d/$PACKAGE start |
pascal@1905 | 106 fi |
pankso@24 | 107 } |