wok-current view ajaxterm/receipt @ rev 7714
Up: lmms to 0.4.9.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Dec 19 11:26:52 2010 +0000 (2010-12-19) |
parents | 94863a7d1610 |
children | a1644dbcf632 |
line source
1 # SliTaz package receipt.
3 PACKAGE="ajaxterm"
4 VERSION="0.10"
5 CATEGORY="network"
6 SHORT_DESC="Login terminal for the web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="Ajaxterm"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://antony.lesuisse.org/software/$PACKAGE/"
11 WGET_URL="${WEB_SITE}files/$TARBALL"
12 DEPENDS="python"
13 SUGGESTED="apache lighttpd-ssl lighttpd-modules"
14 TAGS="web application"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/usr/share/ajaxterm
20 cp -a $src/*.py $src/*.js $src/*.css $src/*.html $fs/usr/share/ajaxterm
21 cp -a stuff/* $fs/
22 }
24 post_install()
25 {
26 grep ^RUN_DAEMONS $1/etc/rcS.conf | grep -q "ajaxterm" || sed -i \
27 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' $1/etc/rcS.conf
28 # Configure lighttpd server
29 if [ -f $1/usr/lib/lighttpd/mod_proxy.so ]; then
30 grep -q mod_proxy $1/etc/lighttpd/lighttpd.conf ||
31 cat >> $1/etc/lighttpd/lighttpd.conf <<EOT
32 server.modules += ( "mod_proxy" )
33 EOT
34 grep -q ajaxterm $1/etc/lighttpd/lighttpd.conf ||
35 cat >> $1/etc/lighttpd/lighttpd.conf <<EOT
36 proxy.server = ( "/ajaxterm/" =>
37 ( ( "host" => "127.0.0.1", "port" => 8022 ) )
38 )
39 EOT
40 if [ -z "$1" ]; then
41 # Start Web server.
42 /etc/init.d/lighttpd stop
43 /etc/init.d/lighttpd start
44 fi
45 fi
46 # Configure apache server
47 if [ -f $1/etc/apache/httpd.conf ]; then
48 if [ ! -f $1/etc/apache/conf.d/ajaxterm ]; then
49 cat > $1/etc/apache/conf.d/ajaxterm <<EOT
50 <IfModule mod_proxy.c>
51 ProxyRequests Off
52 <Proxy *>
53 Order deny,allow
54 Allow from all
55 </Proxy>
56 ProxyPass /ajaxterm/ http://localhost:8022/
57 ProxyPassReverse /ajaxterm/ http://localhost:8022/
58 </IfModule>
59 EOT
60 if [ -z "$1" ]; then
61 # Start Web server.
62 /etc/init.d/apache stop
63 sleep 2
64 /etc/init.d/apache start
65 fi
66 fi
67 fi
68 [ -z "$1" ] && /etc/init.d/ajaxterm start
69 [ ! -f $1/usr/lib/lighttpd/mod_proxy.so -a \
70 ! -f $1/etc/apache/httpd.conf ] && cat <<EOT
71 --------
72 You should install either lighttpd
73 # tazpkg get-install lighttpd-ssl ; tazpkg get-install lighttpd-modules
74 or apache
75 # tazpkg get-install apache
76 and reconfigure
77 # tazpkg reconfigure ajaxterm
78 --------
79 EOT
80 }