wok annotate lighttpd/receipt @ rev 13900
Add libjreen (1.1.1)
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Sat Jan 19 15:31:49 2013 +0000 (2013-01-19) |
parents | 28ff11e24643 |
children | 2a5cc8208d36 |
rev | line source |
---|---|
pankso@24 | 1 # SliTaz package receipt. |
pankso@24 | 2 |
pankso@24 | 3 PACKAGE="lighttpd" |
pankso@11813 | 4 VERSION="1.4.30" |
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/" |
pascal@4575 | 13 WGET_URL="http://download.lighttpd.net/lighttpd/releases-1.4.x/$TARBALL" |
slaxemulator@8894 | 14 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf" |
pankso@24 | 15 BASE_MODULES=" |
pankso@24 | 16 access |
pankso@24 | 17 accesslog |
pankso@24 | 18 alias |
pankso@24 | 19 cgi |
pankso@24 | 20 dirlisting |
pankso@24 | 21 indexfile |
pankso@24 | 22 staticfile |
pankso@24 | 23 rewrite |
pankso@24 | 24 status |
pankso@24 | 25 userdir" |
pankso@24 | 26 |
pankso@24 | 27 # Rules to configure and make the package. |
pankso@24 | 28 compile_rules() |
pankso@24 | 29 { |
pankso@24 | 30 cd $src |
pascal@1516 | 31 if [ ! done.fastcgi_detach.patch ]; then |
slaxemulator@9700 | 32 patch -i $stuff/fastcgi_detach.patch || return 1 |
pascal@1516 | 33 touch done.fastcgi_detach.patch |
pascal@1516 | 34 fi |
pankso@639 | 35 ./configure \ |
pankso@639 | 36 --enable-shared \ |
pankso@639 | 37 --disable-ipv6 \ |
pankso@639 | 38 --prefix=/usr \ |
pankso@639 | 39 --libdir=/usr/lib/lighttpd \ |
pankso@639 | 40 --mandir=/usr/share/man \ |
pascal@1516 | 41 $CONFIGURE_ARGS && |
pascal@1516 | 42 make && |
pankso@24 | 43 make DESTDIR=$PWD/_pkg install |
pankso@24 | 44 } |
pankso@24 | 45 |
pankso@24 | 46 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@24 | 47 # On SliTaz Lighttpd runs as user/group : www/www or 80/80. |
pankso@24 | 48 genpkg_rules() |
pankso@24 | 49 { |
pankso@24 | 50 mkdir -p $fs/usr |
pankso@4572 | 51 #cp -a $_pkg/usr/bin $fs/usr |
pankso@24 | 52 cp -a $_pkg/usr/sbin $fs/usr |
pankso@4572 | 53 |
pankso@24 | 54 # Modules. |
pankso@24 | 55 mkdir -p $fs/usr/lib/lighttpd |
pankso@24 | 56 for module in $BASE_MODULES |
pankso@24 | 57 do |
pankso@24 | 58 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd |
pankso@24 | 59 echo -n "Copying : mod_${module}.so" && status |
pankso@24 | 60 done |
pankso@4572 | 61 |
pankso@24 | 62 # Server root and config file. |
pankso@9665 | 63 cp -a $stuff/var $fs |
pankso@9665 | 64 cp -a $stuff/etc $fs |
pankso@119 | 65 chown -R 0.0 $fs/var/www |
pankso@119 | 66 chown -R 0.0 $fs/etc |
pankso@4572 | 67 |
pankso@24 | 68 # Logs directory. |
pankso@24 | 69 mkdir -p $fs/var/log/lighttpd |
pankso@24 | 70 chown 80.80 $fs/var/log/lighttpd |
pankso@24 | 71 } |
pankso@24 | 72 |
pankso@24 | 73 # Pre and post install commands for Tazpkg. |
pankso@24 | 74 # We stop the server by default in case of upgarde. |
pankso@24 | 75 pre_install() |
pankso@24 | 76 { |
pankso@24 | 77 echo "Processing pre-install commands..." |
pascal@1204 | 78 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop |
pankso@2306 | 79 # Backup config file. |
pankso@2306 | 80 if [ -d $1/$CONFIG_FILES ]; then |
pankso@2306 | 81 cp -a $1/$CONFIG_FILES $1/$CONFIG_FILES.bak |
pankso@2306 | 82 fi |
pankso@24 | 83 } |
pankso@24 | 84 post_install() |
pankso@24 | 85 { |
pankso@24 | 86 echo "Processing post-install commands..." |
pankso@2306 | 87 # Restore original config. |
pankso@2306 | 88 if [ -d $1/$CONFIG_FILES.bak ]; then |
pankso@2306 | 89 rm -rf $1/$CONFIG_FILES |
pankso@2306 | 90 mv $1/$CONFIG_FILES.bak $1/$CONFIG_FILES |
pankso@2306 | 91 fi |
pankso@24 | 92 # Just in case. |
pascal@1905 | 93 chown www.www $1/var/log/$PACKAGE |
pascal@1905 | 94 if [ -z "$1" ]; then |
pankso@10811 | 95 for i in apache httpd; do |
pascal@1905 | 96 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop |
pascal@1905 | 97 done |
pascal@1905 | 98 /etc/init.d/$PACKAGE start |
pascal@1905 | 99 fi |
pankso@24 | 100 } |