wok view ajaxterm/receipt @ rev 21435
updated mhwaveedit (1.4.23 -> 1.4.24)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Apr 27 16:09:59 2019 +0100 (2019-04-27) |
parents | 11b5e93cb5f2 |
children | aaa3fcf79cf3 |
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 configure and make the package.
19 compile_rules()
20 {
21 cook_pick_manpages $src/ajaxterm.1
22 }
24 # Rules to gen a SliTaz package suitable for Tazpkg.
25 genpkg_rules()
26 {
27 mkdir -p $fs/usr/share/ajaxterm
28 cp -a $src/*.py $src/*.js $src/*.css $src/*.html $fs/usr/share/ajaxterm
29 cp -a $stuff/* $fs/
30 chown -R root:root $fs
31 find $fs -type f -name '*.py' -exec chmod a+x \{\} \;
32 }
34 post_install()
35 {
36 grep ^RUN_DAEMONS "$1/etc/rcS.conf" | grep -q "ajaxterm" || sed -i \
37 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' "$1/etc/rcS.conf"
38 # Configure lighttpd server
39 if [ -f "$1/usr/lib/lighttpd/mod_proxy.so" ]; then
40 grep -q mod_proxy "$1/etc/lighttpd/lighttpd.conf" ||
41 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
42 server.modules += ( "mod_proxy" )
43 EOT
44 grep -q ajaxterm "$1/etc/lighttpd/lighttpd.conf" ||
45 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
46 proxy.server = ( "/ajaxterm/" =>
47 ( ( "host" => "127.0.0.1", "port" => 8022 ) )
48 )
49 EOT
50 if [ -z "$1" ]; then
51 # Start Web server.
52 /etc/init.d/lighttpd stop
53 /etc/init.d/lighttpd start
54 fi
55 fi
56 # Configure apache server
57 if [ -f "$1/etc/apache/httpd.conf" ]; then
58 if [ ! -f "$1/etc/apache/conf.d/ajaxterm" ]; then
59 cat > "$1/etc/apache/conf.d/ajaxterm" <<EOT
60 <IfModule mod_proxy.c>
61 ProxyRequests Off
62 <Proxy *>
63 Order deny,allow
64 Allow from all
65 </Proxy>
66 ProxyPass /ajaxterm/ http://localhost:8022/
67 ProxyPassReverse /ajaxterm/ http://localhost:8022/
68 </IfModule>
69 EOT
70 if [ -z "$1" ]; then
71 # Start Web server.
72 /etc/init.d/apache stop
73 sleep 2
74 /etc/init.d/apache start
75 fi
76 fi
77 fi
78 [ -z "$1" ] && /etc/init.d/ajaxterm start
79 [ ! -f "$1/usr/lib/lighttpd/mod_proxy.so" -a \
80 ! -f "$1/etc/apache/httpd.conf" ] &&
81 [ -z "$quiet" ] && cat <<EOT
82 --------
83 You should install either lighttpd
84 # tazpkg get-install lighttpd-ssl ; tazpkg get-install lighttpd-modules
85 or apache
86 # tazpkg get-install apache
87 and reconfigure
88 # tazpkg reconfigure ajaxterm
89 --------
90 EOT
91 }