wok-6.x rev 1787
Add lighttpd-ssl
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Nov 30 15:28:35 2008 +0000 (2008-11-30) |
parents | d699aa373d79 |
children | dcc4ea6cb102 |
files | lighttpd-ssl/receipt lighttpd-ssl/stuff |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lighttpd-ssl/receipt Sun Nov 30 15:28:35 2008 +0000 1.3 @@ -0,0 +1,95 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="lighttpd-ssl" 1.7 +VERSION="1.4.20" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Fast and light HTTP Web server with SSL support." 1.10 +MAINTAINER="pankso@slitaz.org" 1.11 +DEPENDS="pcre openssl" 1.12 +BUILD_DEPENDS="pcre-dev bzip2-dev openssl-dev" 1.13 +SUGGESTED="lighttpd-modules php perl python" 1.14 +SOURCE="lighttpd" 1.15 +TARBALL="$SOURCE-$VERSION.tar.gz" 1.16 +WEB_SITE="http://www.lighttpd.net/" 1.17 +#WGET_URL="http://www.lighttpd.net/download/$TARBALL" 1.18 +WGET_URL="http://mirror.slitaz.org/sources/packages/l/$TARBALL" 1.19 +CONFIG_FILES="/etc/lighttpd/lighttpd.conf /etc/lighttpd/vhosts.conf" 1.20 +PROVIDE="lighttpd" 1.21 +BASE_MODULES=" 1.22 +access 1.23 +accesslog 1.24 +alias 1.25 +cgi 1.26 +dirlisting 1.27 +indexfile 1.28 +staticfile 1.29 +rewrite 1.30 +status 1.31 +userdir" 1.32 + 1.33 +# Rules to configure and make the package. 1.34 +compile_rules() 1.35 +{ 1.36 + cd $src 1.37 + if [ ! done.fastcgi_detach.patch ]; then 1.38 + patch -i ../stuff/fastcgi_detach.patch || exit 1 1.39 + touch done.fastcgi_detach.patch 1.40 + fi 1.41 + ./configure \ 1.42 + --enable-shared \ 1.43 + --disable-ipv6 \ 1.44 + --with-openssl \ 1.45 + --prefix=/usr \ 1.46 + --libdir=/usr/lib/lighttpd \ 1.47 + --mandir=/usr/share/man \ 1.48 + $CONFIGURE_ARGS && 1.49 + make && 1.50 + make DESTDIR=$PWD/_pkg install 1.51 +} 1.52 + 1.53 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.54 +# On SliTaz Lighttpd runs as user/group : www/www or 80/80. 1.55 +genpkg_rules() 1.56 +{ 1.57 + mkdir -p $fs/usr 1.58 + cp -a $_pkg/usr/bin $fs/usr 1.59 + cp -a $_pkg/usr/sbin $fs/usr 1.60 + 1.61 + # Modules. 1.62 + mkdir -p $fs/usr/lib/lighttpd 1.63 + for module in $BASE_MODULES 1.64 + do 1.65 + cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd 1.66 + echo -n "Copying : mod_${module}.so" && status 1.67 + done 1.68 + strip -s $fs/usr/bin/* 1.69 + strip -s $fs/usr/sbin/* 1.70 + strip -s $fs/usr/lib/lighttpd/* 1.71 + 1.72 + # Server root and config file. 1.73 + cp -a stuff/var $fs 1.74 + cp -a stuff/etc $fs 1.75 + chown -R 0.0 $fs/var/www 1.76 + chown -R 0.0 $fs/etc 1.77 + 1.78 + # Logs directory. 1.79 + mkdir -p $fs/var/log/lighttpd 1.80 + chown 80.80 $fs/var/log/lighttpd 1.81 +} 1.82 + 1.83 +# Pre and post install commands for Tazpkg. 1.84 +# We stop the server by default in case of upgarde. 1.85 +pre_install() 1.86 +{ 1.87 + echo "Processing pre-install commands..." 1.88 + [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop 1.89 +} 1.90 +post_install() 1.91 +{ 1.92 + local root 1.93 + root=$1 1.94 + echo "Processing post-install commands..." 1.95 + # Just in case. 1.96 + chown www.www $root/var/log/$PACKAGE 1.97 + /etc/init.d/$PACKAGE start 1.98 +}