wok diff lighttpd/receipt @ rev 93

Corrected zlib-dev receipt (...)
author Christophe Lincoln <pankso@slitaz.org>
date Fri Jan 04 14:07:53 2008 +0100 (2008-01-04)
parents
children 8489aa10a666
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lighttpd/receipt	Fri Jan 04 14:07:53 2008 +0100
     1.3 @@ -0,0 +1,80 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="lighttpd"
     1.7 +VERSION="1.4.18"
     1.8 +CATEGORY="base-apps"
     1.9 +SHORT_DESC="Fast and light HTTP Web server."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +DEPENDS="php"
    1.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.13 +WEB_SITE="http://www.lighttpd.net/"
    1.14 +WGET_URL="http://www.lighttpd.net/download/$TARBALL"
    1.15 +BASE_MODULES="
    1.16 +access
    1.17 +accesslog
    1.18 +alias
    1.19 +cgi
    1.20 +fastcgi
    1.21 +compress
    1.22 +dirlisting
    1.23 +indexfile
    1.24 +staticfile
    1.25 +rewrite
    1.26 +status
    1.27 +userdir"
    1.28 +
    1.29 +# Rules to configure and make the package.
    1.30 +compile_rules()
    1.31 +{
    1.32 +	cd $src
    1.33 +	./configure -enable-shared --disable-ipv6 --prefix=/usr \
    1.34 +    --libdir=/usr/lib/lighttpd --mandir=/usr/share/man \
    1.35 +    $CONFIGURE_ARGS
    1.36 +	make
    1.37 +	make DESTDIR=$PWD/_pkg install
    1.38 +}
    1.39 +
    1.40 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.41 +# On SliTaz Lighttpd runs as user/group : www/www or 80/80.
    1.42 +genpkg_rules()
    1.43 +{
    1.44 +	mkdir -p $fs/usr
    1.45 +	cp -a $_pkg/usr/bin $fs/usr
    1.46 +	cp -a $_pkg/usr/sbin $fs/usr
    1.47 +	
    1.48 +	# Modules.
    1.49 +	mkdir -p $fs/usr/lib/lighttpd
    1.50 +	for module in $BASE_MODULES
    1.51 +	do
    1.52 +		cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
    1.53 +		echo -n "Copying : mod_${module}.so" && status
    1.54 +	done
    1.55 +	strip -s $fs/usr/bin/*
    1.56 +	strip -s $fs/usr/sbin/*
    1.57 +	strip -s $fs/usr/lib/lighttpd/*
    1.58 +	
    1.59 +	# Server root and config file.
    1.60 +	cp -a stuff/var $fs
    1.61 +	cp -a stuff/etc $fs
    1.62 +	
    1.63 +	# Logs directory.
    1.64 +	mkdir -p $fs/var/log/lighttpd
    1.65 +	chown 80.80 $fs/var/log/lighttpd
    1.66 +}
    1.67 +
    1.68 +# Pre and post install commands for Tazpkg.
    1.69 +# We stop the server by default in case of upgarde.
    1.70 +pre_install()
    1.71 +{
    1.72 +	echo "Processing pre-install commands..."
    1.73 +	/etc/init.d/$PACKAGE stop
    1.74 +}
    1.75 +post_install()
    1.76 +{
    1.77 +        local root
    1.78 +        root=$1
    1.79 +	echo "Processing post-install commands..."
    1.80 +	# Just in case.
    1.81 +	chown www.www $root/var/log/$PACKAGE
    1.82 +	/etc/init.d/$PACKAGE start
    1.83 +}