wok-current view lighttpd/receipt @ rev 16512

Add wiringpi-piglow (small utility writtrn in C to handle PiGlow leds)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Apr 24 21:18:26 2014 +0200 (2014-04-24)
parents e6759743694c
children d3eb5f4b53ea
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 # Config file.
66 cp -a $stuff/etc $fs
67 chown -R 0.0 $fs/etc
69 # Logs directory.
70 mkdir -p $fs/var/log/lighttpd
71 chown 80.80 $fs/var/log/lighttpd
72 }
74 # Make sur it as cross compile properly
75 testsuite()
76 {
77 readelf -h $install/usr/sbin/$PACKAGE
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/$PACKAGE ] && /etc/init.d/$PACKAGE stop
86 # Backup config file.
87 if [ -d $1/etc/lighttpd ]; then
88 cp -a $1/etc/lighttpd $1/etc/lighttpd.bak
89 fi
90 }
91 post_install()
92 {
93 echo "Processing post-install commands..."
94 # Restore original config.
95 if [ -d $1/etc/lighttpd.bak ]; then
96 rm -rf $1/etc/lighttpd
97 mv $1/etc/lighttpd.bak $1/etc/lighttpd
98 fi
99 # Just in case.
100 chown www.www $1/var/log/$PACKAGE
101 if [ -z "$1" ]; then
102 for i in apache httpd; do
103 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
104 done
105 /etc/init.d/$PACKAGE start
106 fi
107 }