wok-next view lighttpd/receipt @ rev 20748
Update (b)deps
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed May 30 20:13:48 2018 +0300 (2018-05-30) |
parents | c4e53a39395a |
children | 342b30daff76 |
line source
1 # SliTaz package receipt v2.
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 WEB_SITE="http://www.lighttpd.net/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="http://download.lighttpd.net/lighttpd/releases-${VERSION%.*}.x/$TARBALL"
14 BUILD_DEPENDS="pcre-dev bzip2-dev zlib-dev"
15 SPLIT="lighttpd lighttpd-modules"
17 compile_rules() {
18 sed -i '/addrs_left/d' src/mod_extforward.c
20 ./configure \
21 --enable-shared \
22 --disable-ipv6 \
23 --libdir=/usr/lib/lighttpd \
24 $CONFIGURE_ARGS &&
25 fix libtool &&
26 make &&
27 make DESTDIR=$DESTDIR install
28 }
30 # On SliTaz Lighttpd runs as user/group : www/www or 80/80.
31 genpkg_rules() {
32 case $PACKAGE in
33 lighttpd)
34 CONFIG_FILES="/etc/lighttpd/vhosts.conf /etc/lighttpd/lighttpd.conf"
35 SUGGESTED="lighttpd-modules php perl python"
36 DEPENDS="pcre"
37 # Modules include in this package. Other modules are splited in
38 # the lighttpd-modules packages.
39 BASE_MODULES="
40 access
41 accesslog
42 alias
43 cgi
44 dirlisting
45 indexfile
46 staticfile
47 rewrite
48 status
49 userdir"
50 mkdir -p $fs/usr
51 #cp -a $install/usr/bin $fs/usr
52 cp -a $install/usr/sbin $fs/usr
54 # Modules.
55 mkdir -p $fs/usr/lib/lighttpd
56 for module in $BASE_MODULES; do
57 cp $install/usr/lib/lighttpd/mod_${module}.so $fs/usr/lib/lighttpd
58 echo -n "Copying : mod_${module}.so" && status
59 done
61 # Config file.
62 cp -a $stuff/etc $fs
63 chown -R 0.0 $fs/etc
65 # Logs directory.
66 mkdir -p $fs/var/log/lighttpd
67 chown 80.80 $fs/var/log/lighttpd
68 ;;
69 lighttpd-modules)
70 CAT="network|Complementary modules for LightTPD Web server."
71 DEPENDS="lighttpd bzip2 zlib"
72 BASE_MODULES="
73 access
74 accesslog
75 alias
76 cgi
77 dirlisting
78 indexfile
79 staticfile
80 rewrite
81 status
82 userdir"
83 # Modules.
84 mkdir -p $fs/usr/
85 cp -a $install/usr/lib $fs/usr
86 for module in $BASE_MODULES
87 do
88 rm -f $fs/usr/lib/lighttpd/mod_${module}.so
89 done
90 rm -f $fs/usr/lib/lighttpd/*.la
91 ;;
92 esac
93 }
95 # Make sure it as cross compile properly
96 testsuite() {
97 readelf -h $install/usr/sbin/$PACKAGE
98 }
100 # We stop the server by default in case of upgarde.
101 pre_install_lighttpd() {
102 [ -z "$1" ] && for i in httpd ngnix apache cherokee $PACKAGE ; do
103 [ -f /etc/init.d/$i ] && /etc/init.d/$i stop
104 done
105 # Backup config file.
106 if [ -d "$1/etc/lighttpd" ]; then
107 cp -a "$1/etc/lighttpd" "$1/etc/lighttpd.bak"
108 fi
109 }
111 post_install_lighttpd() {
112 # Restore original config.
113 if [ -d "$1/etc/lighttpd.bak" ]; then
114 rm -rf "$1/etc/lighttpd"
115 mv "$1/etc/lighttpd.bak" "$1/etc/lighttpd"
116 fi
118 # Just in case.
119 chown www.www "$1/var/log/$PACKAGE"
120 [ "$1" ] || netstat -ltn 2> /dev/null | grep -q :80 ||
121 /etc/init.d/$PACKAGE start
122 }