wok view lighttpd/receipt @ rev 16257

ARM: add gmp and up nettle
author Christophe Lincoln <pankso@slitaz.org>
date Sat Apr 05 03:24:21 2014 +0200 (2014-04-05)
parents ade0043b3fac
children 2b6001f6ed50
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd"
4 VERSION="1.4.33"
5 CATEGORY="network"
6 SHORT_DESC="Fast and light HTTP Web server."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="BSD"
9 SUGGESTED="lighttpd-modules php perl python"
10 TARBALL="$PACKAGE-$VERSION.tar.xz"
11 WEB_SITE="http://www.lighttpd.net/"
12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-1.4.x/$TARBALL"
13 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
14 HOST_ARCH="i486 arm"
16 DEPENDS="pcre"
17 BUILD_DEPENDS="pcre-dev bzip2-dev"
19 # Modules include in this package. Other modules are splited in
20 # the lighttpd-modules packages.
21 BASE_MODULES="
22 access
23 accesslog
24 alias
25 cgi
26 dirlisting
27 indexfile
28 staticfile
29 rewrite
30 status
31 userdir"
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 cd $src
37 sed -i '/addrs_left/d' src/mod_extforward.c
38 ./configure \
39 --enable-shared \
40 --disable-ipv6 \
41 --prefix=/usr \
42 --libdir=/usr/lib/lighttpd \
43 --mandir=/usr/share/man \
44 $CONFIGURE_ARGS &&
45 make &&
46 make DESTDIR=$DESTDIR install
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
51 genpkg_rules()
52 {
53 mkdir -p $fs/usr
54 #cp -a $install/usr/bin $fs/usr
55 cp -a $install/usr/sbin $fs/usr
57 # Modules.
58 mkdir -p $fs/usr/lib/lighttpd
59 for module in $BASE_MODULES
60 do
61 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
62 echo -n "Copying : mod_${module}.so" && status
63 done
65 # Server root and config file.
66 cp -a $stuff/var $fs
67 cp -a $stuff/etc $fs
68 chown -R 0.0 $fs/var/www
69 chown -R 0.0 $fs/etc
71 # Logs directory.
72 mkdir -p $fs/var/log/lighttpd
73 chown 80.80 $fs/var/log/lighttpd
74 }
76 # Make sur it as cross compile properly
77 testsuite()
78 {
79 readelf -h $install/usr/sbin/$PACKAGE
80 }
82 # Pre and post install commands for Tazpkg.
83 # We stop the server by default in case of upgarde.
84 pre_install()
85 {
86 echo "Processing pre-install commands..."
87 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
88 # Backup config file.
89 if [ -d $1/etc/lighttpd ]; then
90 cp -a $1/etc/lighttpd $1/etc/lighttpd.bak
91 fi
92 }
93 post_install()
94 {
95 echo "Processing post-install commands..."
96 # Restore original config.
97 if [ -d $1/etc/lighttpd.bak ]; then
98 rm -rf $1/etc/lighttpd
99 mv $1/etc/lighttpd.bak $1/etc/lighttpd
100 fi
101 # Just in case.
102 chown www.www $1/var/log/$PACKAGE
103 if [ -z "$1" ]; then
104 for i in apache httpd; do
105 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
106 done
107 /etc/init.d/$PACKAGE start
108 fi
109 }