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