wok-4.x annotate lighttpd-ssl/receipt @ 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
children dcc4ea6cb102
rev   line source
pascal@1787 1 # SliTaz package receipt.
pascal@1787 2
pascal@1787 3 PACKAGE="lighttpd-ssl"
pascal@1787 4 VERSION="1.4.20"
pascal@1787 5 CATEGORY="network"
pascal@1787 6 SHORT_DESC="Fast and light HTTP Web server with SSL support."
pascal@1787 7 MAINTAINER="pankso@slitaz.org"
pascal@1787 8 DEPENDS="pcre openssl"
pascal@1787 9 BUILD_DEPENDS="pcre-dev bzip2-dev openssl-dev"
pascal@1787 10 SUGGESTED="lighttpd-modules php perl python"
pascal@1787 11 SOURCE="lighttpd"
pascal@1787 12 TARBALL="$SOURCE-$VERSION.tar.gz"
pascal@1787 13 WEB_SITE="http://www.lighttpd.net/"
pascal@1787 14 #WGET_URL="http://www.lighttpd.net/download/$TARBALL"
pascal@1787 15 WGET_URL="http://mirror.slitaz.org/sources/packages/l/$TARBALL"
pascal@1787 16 CONFIG_FILES="/etc/lighttpd/lighttpd.conf /etc/lighttpd/vhosts.conf"
pascal@1787 17 PROVIDE="lighttpd"
pascal@1787 18 BASE_MODULES="
pascal@1787 19 access
pascal@1787 20 accesslog
pascal@1787 21 alias
pascal@1787 22 cgi
pascal@1787 23 dirlisting
pascal@1787 24 indexfile
pascal@1787 25 staticfile
pascal@1787 26 rewrite
pascal@1787 27 status
pascal@1787 28 userdir"
pascal@1787 29
pascal@1787 30 # Rules to configure and make the package.
pascal@1787 31 compile_rules()
pascal@1787 32 {
pascal@1787 33 cd $src
pascal@1787 34 if [ ! done.fastcgi_detach.patch ]; then
pascal@1787 35 patch -i ../stuff/fastcgi_detach.patch || exit 1
pascal@1787 36 touch done.fastcgi_detach.patch
pascal@1787 37 fi
pascal@1787 38 ./configure \
pascal@1787 39 --enable-shared \
pascal@1787 40 --disable-ipv6 \
pascal@1787 41 --with-openssl \
pascal@1787 42 --prefix=/usr \
pascal@1787 43 --libdir=/usr/lib/lighttpd \
pascal@1787 44 --mandir=/usr/share/man \
pascal@1787 45 $CONFIGURE_ARGS &&
pascal@1787 46 make &&
pascal@1787 47 make DESTDIR=$PWD/_pkg install
pascal@1787 48 }
pascal@1787 49
pascal@1787 50 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1787 51 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
pascal@1787 52 genpkg_rules()
pascal@1787 53 {
pascal@1787 54 mkdir -p $fs/usr
pascal@1787 55 cp -a $_pkg/usr/bin $fs/usr
pascal@1787 56 cp -a $_pkg/usr/sbin $fs/usr
pascal@1787 57
pascal@1787 58 # Modules.
pascal@1787 59 mkdir -p $fs/usr/lib/lighttpd
pascal@1787 60 for module in $BASE_MODULES
pascal@1787 61 do
pascal@1787 62 cp $_pkg/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
pascal@1787 63 echo -n "Copying : mod_${module}.so" && status
pascal@1787 64 done
pascal@1787 65 strip -s $fs/usr/bin/*
pascal@1787 66 strip -s $fs/usr/sbin/*
pascal@1787 67 strip -s $fs/usr/lib/lighttpd/*
pascal@1787 68
pascal@1787 69 # Server root and config file.
pascal@1787 70 cp -a stuff/var $fs
pascal@1787 71 cp -a stuff/etc $fs
pascal@1787 72 chown -R 0.0 $fs/var/www
pascal@1787 73 chown -R 0.0 $fs/etc
pascal@1787 74
pascal@1787 75 # Logs directory.
pascal@1787 76 mkdir -p $fs/var/log/lighttpd
pascal@1787 77 chown 80.80 $fs/var/log/lighttpd
pascal@1787 78 }
pascal@1787 79
pascal@1787 80 # Pre and post install commands for Tazpkg.
pascal@1787 81 # We stop the server by default in case of upgarde.
pascal@1787 82 pre_install()
pascal@1787 83 {
pascal@1787 84 echo "Processing pre-install commands..."
pascal@1787 85 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
pascal@1787 86 }
pascal@1787 87 post_install()
pascal@1787 88 {
pascal@1787 89 local root
pascal@1787 90 root=$1
pascal@1787 91 echo "Processing post-install commands..."
pascal@1787 92 # Just in case.
pascal@1787 93 chown www.www $root/var/log/$PACKAGE
pascal@1787 94 /etc/init.d/$PACKAGE start
pascal@1787 95 }