wok view lighttpd/receipt @ rev 18796
Up make-slitaz-icons(160108): add stock icons needed by GTK+3 application Transmission
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Jan 08 22:31:54 2016 +0200 (2016-01-08) |
parents | 9e01bc6321ea |
children | 3630f18392bd |
line source
1 # SliTaz package receipt.
3 PACKAGE="lighttpd"
4 VERSION="1.4.35"
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-${VERSION%.*}.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 sed -i '/addrs_left/d' src/mod_extforward.c
37 ./configure \
38 --enable-shared \
39 --disable-ipv6 \
40 --prefix=/usr \
41 --libdir=/usr/lib/lighttpd \
42 --mandir=/usr/share/man \
43 $CONFIGURE_ARGS &&
44 make &&
45 make DESTDIR=$DESTDIR install
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr
53 #cp -a $install/usr/bin $fs/usr
54 cp -a $install/usr/sbin $fs/usr
56 # Modules.
57 mkdir -p $fs/usr/lib/lighttpd
58 for module in $BASE_MODULES; do
59 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
60 echo -n "Copying : mod_${module}.so" && status
61 done
63 # Config file.
64 cp -a $stuff/etc $fs
65 chown -R 0.0 $fs/etc
67 # Logs directory.
68 mkdir -p $fs/var/log/lighttpd
69 chown 80.80 $fs/var/log/lighttpd
70 }
72 # Make sur it as cross compile properly
73 testsuite()
74 {
75 readelf -h $install/usr/sbin/$PACKAGE
76 }
78 # Pre and post install commands for Tazpkg.
79 # We stop the server by default in case of upgarde.
80 pre_install()
81 {
82 [ -f /etc/init.d/$PACKAGE ] && /etc/init.d/$PACKAGE stop
83 # Backup config file.
84 if [ -d "$1/etc/lighttpd" ]; then
85 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
86 fi
87 }
89 post_install()
90 {
91 # Restore original config.
92 if [ -d "$1/etc/lighttpd.bak" ]; then
93 rm -rf "$1/etc/lighttpd"
94 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd"
95 fi
97 # Just in case.
98 chown www.www "$1/var/log/$PACKAGE"
99 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 ||
100 /etc/init.d/$PACKAGE start
101 }