wok view ajaxterm/receipt @ rev 19080

Up tazpanel (591)
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Thu Apr 28 23:50:34 2016 +0200 (2016-04-28)
parents d5f9f516b706
children f0a0b5091b4a
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 LICENSE="PublicDomain LGPL"
9 WEB_SITE="http://antony.lesuisse.org/software/ajaxterm/"
10 SOURCE="Ajaxterm"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WGET_URL="${WEB_SITE}files/$TARBALL"
13 TAGS="web application"
15 DEPENDS="python"
16 SUGGESTED="apache lighttpd-ssl lighttpd-modules"
18 # Rules to gen a SliTaz package suitable for Tazpkg.
19 genpkg_rules()
20 {
21 mkdir -p $fs/usr/share/ajaxterm
22 cp -a $src/*.py $src/*.js $src/*.css $src/*.html $fs/usr/share/ajaxterm
23 cp -a $stuff/* $fs/
24 chown -R root:root $fs
25 find $fs -type f -name '*.py' -exec chmod a+x \{\} \;
26 }
28 post_install()
29 {
30 grep ^RUN_DAEMONS "$1/etc/rcS.conf" | grep -q "ajaxterm" || sed -i \
31 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' "$1/etc/rcS.conf"
32 # Configure lighttpd server
33 if [ -f "$1/usr/lib/lighttpd/mod_proxy.so" ]; then
34 grep -q mod_proxy "$1/etc/lighttpd/lighttpd.conf" ||
35 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
36 server.modules += ( "mod_proxy" )
37 EOT
38 grep -q ajaxterm "$1/etc/lighttpd/lighttpd.conf" ||
39 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
40 proxy.server = ( "/ajaxterm/" =>
41 ( ( "host" => "127.0.0.1", "port" => 8022 ) )
42 )
43 EOT
44 if [ -z "$1" ]; then
45 # Start Web server.
46 /etc/init.d/lighttpd stop
47 /etc/init.d/lighttpd start
48 fi
49 fi
50 # Configure apache server
51 if [ -f "$1/etc/apache/httpd.conf" ]; then
52 if [ ! -f "$1/etc/apache/conf.d/ajaxterm" ]; then
53 cat > "$1/etc/apache/conf.d/ajaxterm" <<EOT
54 <IfModule mod_proxy.c>
55 ProxyRequests Off
56 <Proxy *>
57 Order deny,allow
58 Allow from all
59 </Proxy>
60 ProxyPass /ajaxterm/ http://localhost:8022/
61 ProxyPassReverse /ajaxterm/ http://localhost:8022/
62 </IfModule>
63 EOT
64 if [ -z "$1" ]; then
65 # Start Web server.
66 /etc/init.d/apache stop
67 sleep 2
68 /etc/init.d/apache start
69 fi
70 fi
71 fi
72 [ -z "$1" ] && /etc/init.d/ajaxterm start
73 [ ! -f "$1/usr/lib/lighttpd/mod_proxy.so" -a \
74 ! -f "$1/etc/apache/httpd.conf" ] &&
75 [ -z "$quiet" ] && cat <<EOT
76 --------
77 You should install either lighttpd
78 # tazpkg get-install lighttpd-ssl ; tazpkg get-install lighttpd-modules
79 or apache
80 # tazpkg get-install apache
81 and reconfigure
82 # tazpkg reconfigure ajaxterm
83 --------
84 EOT
85 }