wok-current annotate lighttpd/receipt @ rev 1272

lighttpd: declare config files
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Aug 18 11:52:51 2008 +0000 (2008-08-18)
parents abf5a1cc455a
children 3f898e9b90bd
rev   line source
pankso@24 1 # SliTaz package receipt.
pankso@24 2
pankso@24 3 PACKAGE="lighttpd"
pankso@1095 4 VERSION="1.4.19-1"
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@1095 13 #WGET_URL="http://www.lighttpd.net/download/$TARBALL"
pankso@1095 14 WGET_URL="http://mirror.slitaz.org/sources/packages/l/$TARBALL"
pascal@1272 15 CONFIG_FILES="/etc/lighttpd/lighttpd.conf /etc/lighttpd/vhosts.conf"
pankso@24 16 BASE_MODULES="
pankso@24 17 access
pankso@24 18 accesslog
pankso@24 19 alias
pankso@24 20 cgi
pankso@24 21 dirlisting
pankso@24 22 indexfile
pankso@24 23 staticfile
pankso@24 24 rewrite
pankso@24 25 status
pankso@24 26 userdir"
pankso@24 27
pankso@24 28 # Rules to configure and make the package.
pankso@24 29 compile_rules()
pankso@24 30 {
pankso@24 31 cd $src
pankso@1095 32 patch -i ../stuff/fastcgi_detach.patch || exit 1
pankso@639 33 ./configure \
pankso@639 34 --enable-shared \
pankso@639 35 --disable-ipv6 \
pankso@639 36 --prefix=/usr \
pankso@639 37 --libdir=/usr/lib/lighttpd \
pankso@639 38 --mandir=/usr/share/man \
pankso@639 39 $CONFIGURE_ARGS
pankso@24 40 make
pankso@24 41 make DESTDIR=$PWD/_pkg install
pankso@24 42 }
pankso@24 43
pankso@24 44 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@24 45 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
pankso@24 46 genpkg_rules()
pankso@24 47 {
pankso@24 48 mkdir -p $fs/usr
pankso@24 49 cp -a $_pkg/usr/bin $fs/usr
pankso@24 50 cp -a $_pkg/usr/sbin $fs/usr
pankso@24 51
pankso@24 52 # Modules.
pankso@24 53 mkdir -p $fs/usr/lib/lighttpd
pankso@24 54 for module in $BASE_MODULES
pankso@24 55 do
pankso@24 56 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
pankso@24 57 echo -n "Copying : mod_${module}.so" && status
pankso@24 58 done
pankso@24 59 strip -s $fs/usr/bin/*
pankso@24 60 strip -s $fs/usr/sbin/*
pankso@24 61 strip -s $fs/usr/lib/lighttpd/*
pankso@24 62
pankso@24 63 # Server root and config file.
pankso@24 64 cp -a stuff/var $fs
pankso@24 65 cp -a stuff/etc $fs
pankso@119 66 chown -R 0.0 $fs/var/www
pankso@119 67 chown -R 0.0 $fs/etc
pankso@24 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@24 74 # Pre and post install commands for Tazpkg.
pankso@24 75 # We stop the server by default in case of upgarde.
pankso@24 76 pre_install()
pankso@24 77 {
pankso@24 78 echo "Processing pre-install commands..."
pascal@1204 79 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
pankso@24 80 }
pankso@24 81 post_install()
pankso@24 82 {
pankso@127 83 local root
pankso@127 84 root=$1
pankso@24 85 echo "Processing post-install commands..."
pankso@24 86 # Just in case.
pankso@24 87 chown www.www $root/var/log/$PACKAGE
pankso@24 88 /etc/init.d/$PACKAGE start
pankso@24 89 }