wok annotate lighttpd/receipt @ rev 687
tazlito, tazpkg, tazusb, tazwok: no more cpio dependancy
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Apr 25 17:12:21 2008 +0000 (2008-04-25) |
parents | c28da3ca44d2 |
children | ca4331756d20 |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
pankso@639 | 4 VERSION="1.4.19" |
pankso@211 | 5 CATEGORY="network" |
pankso@24 | 6 SHORT_DESC="Fast and light HTTP Web server." |
pankso@24 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@639 | 8 DEPENDS="pcre" |
pankso@667 | 9 BUILD_DEPENDS="pcre-dev bzip2-dev" |
pankso@639 | 10 SUGGESTED="lighttpd-modules php perl python" |
pankso@24 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@24 | 12 WEB_SITE="http://www.lighttpd.net/" |
pankso@24 | 13 WGET_URL="http://www.lighttpd.net/download/$TARBALL" |
pankso@24 | 14 BASE_MODULES=" |
pankso@24 | 15 access |
pankso@24 | 16 accesslog |
pankso@24 | 17 alias |
pankso@24 | 18 cgi |
pankso@24 | 19 dirlisting |
pankso@24 | 20 indexfile |
pankso@24 | 21 staticfile |
pankso@24 | 22 rewrite |
pankso@24 | 23 status |
pankso@24 | 24 userdir" |
pankso@24 | 25 |
pankso@24 | 26 # Rules to configure and make the package. |
pankso@24 | 27 compile_rules() |
pankso@24 | 28 { |
pankso@24 | 29 cd $src |
pankso@639 | 30 ./configure \ |
pankso@639 | 31 --enable-shared \ |
pankso@639 | 32 --disable-ipv6 \ |
pankso@639 | 33 --prefix=/usr \ |
pankso@639 | 34 --libdir=/usr/lib/lighttpd \ |
pankso@639 | 35 --mandir=/usr/share/man \ |
pankso@639 | 36 $CONFIGURE_ARGS |
pankso@24 | 37 make |
pankso@24 | 38 make DESTDIR=$PWD/_pkg install |
pankso@24 | 39 } |
pankso@24 | 40 |
pankso@24 | 41 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 42 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 43 genpkg_rules() |
pankso@24 | 44 { |
pankso@24 | 45 mkdir -p $fs/usr |
pankso@24 | 46 cp -a $_pkg/usr/bin $fs/usr |
pankso@24 | 47 cp -a $_pkg/usr/sbin $fs/usr |
pankso@24 | 48 |
pankso@24 | 49 # Modules. |
pankso@24 | 50 mkdir -p $fs/usr/lib/lighttpd |
pankso@24 | 51 for module in $BASE_MODULES |
pankso@24 | 52 do |
pankso@24 | 53 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 54 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 55 done |
pankso@24 | 56 strip -s $fs/usr/bin/* |
pankso@24 | 57 strip -s $fs/usr/sbin/* |
pankso@24 | 58 strip -s $fs/usr/lib/lighttpd/* |
pankso@24 | 59 |
pankso@24 | 60 # Server root and config file. |
pankso@24 | 61 cp -a stuff/var $fs |
pankso@24 | 62 cp -a stuff/etc $fs |
pankso@119 | 63 chown -R 0.0 $fs/var/www |
pankso@119 | 64 chown -R 0.0 $fs/etc |
pankso@24 | 65 |
pankso@24 | 66 # Logs directory. |
pankso@24 | 67 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 68 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 69 } |
pankso@24 | 70 |
pankso@24 | 71 # Pre and post install commands for Tazpkg. |
pankso@24 | 72 # We stop the server by default in case of upgarde. |
pankso@24 | 73 pre_install() |
pankso@24 | 74 { |
pankso@24 | 75 echo "Processing pre-install commands..." |
pankso@24 | 76 /etc/init.d/$PACKAGE stop |
pankso@24 | 77 } |
pankso@24 | 78 post_install() |
pankso@24 | 79 { |
pankso@127 | 80 local root |
pankso@127 | 81 root=$1 |
pankso@24 | 82 echo "Processing post-install commands..." |
pankso@24 | 83 # Just in case. |
pankso@24 | 84 chown www.www $root/var/log/$PACKAGE |
pankso@24 | 85 /etc/init.d/$PACKAGE start |
pankso@24 | 86 } |