wok-next view ajaxterm/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents a5b865e166cd
children 21ab7a6eb192
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/"
11 SOURCE="Ajaxterm"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WGET_URL="${WEB_SITE}files/$TARBALL"
15 compile_rules() {
16 cook_pick_manpages $src/ajaxterm.1
17 }
19 genpkg_rules() {
20 mkdir -p $fs/usr/share/ajaxterm
21 cp -a $src/*.py $src/*.js $src/*.css $src/*.html $fs/usr/share/ajaxterm
22 cp -a $stuff/* $fs/
23 chown -R root:root $fs
24 find $fs -type f -name '*.py' -exec chmod a+x \{\} \;
25 DEPENDS="python"
26 SUGGESTED="apache lighttpd-ssl lighttpd-modules"
27 TAGS="web application"
28 }
30 post_install() {
31 grep ^RUN_DAEMONS "$1/etc/rcS.conf" | grep -q "ajaxterm" || sed -i \
32 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' "$1/etc/rcS.conf"
33 # Configure lighttpd server
34 if [ -f "$1/usr/lib/lighttpd/mod_proxy.so" ]; then
35 grep -q mod_proxy "$1/etc/lighttpd/lighttpd.conf" ||
36 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
37 server.modules += ( "mod_proxy" )
38 EOT
39 grep -q ajaxterm "$1/etc/lighttpd/lighttpd.conf" ||
40 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
41 proxy.server = ( "/ajaxterm/" =>
42 ( ( "host" => "127.0.0.1", "port" => 8022 ) )
43 )
44 EOT
45 if [ -z "$1" ]; then
46 # Start Web server.
47 /etc/init.d/lighttpd stop
48 /etc/init.d/lighttpd start
49 fi
50 fi
51 # Configure apache server
52 if [ -f "$1/etc/apache/httpd.conf" ]; then
53 if [ ! -f "$1/etc/apache/conf.d/ajaxterm" ]; then
54 cat > "$1/etc/apache/conf.d/ajaxterm" <<EOT
55 <IfModule mod_proxy.c>
56 ProxyRequests Off
57 <Proxy *>
58 Order deny,allow
59 Allow from all
60 </Proxy>
61 ProxyPass /ajaxterm/ http://localhost:8022/
62 ProxyPassReverse /ajaxterm/ http://localhost:8022/
63 </IfModule>
64 EOT
65 if [ -z "$1" ]; then
66 # Start Web server.
67 /etc/init.d/apache stop
68 sleep 2
69 /etc/init.d/apache start
70 fi
71 fi
72 fi
73 [ -z "$1" ] && /etc/init.d/ajaxterm start
75 [ ! -f "$1/usr/lib/lighttpd/mod_proxy.so" -a \
76 ! -f "$1/etc/apache/httpd.conf" ] &&
77 [ -z "$quiet" ] && cat <<EOT
79 .---------------------------------------.
80 | You should install either lighttpd: |
81 | # tazpkg get-install lighttpd-ssl |
82 | # tazpkg get-install lighttpd-modules |
83 | |
84 | or apache: |
85 | # tazpkg get-install apache |
86 | |
87 | and reconfigure: |
88 | # tazpkg reconfigure ajaxterm |
89 '---------------------------------------'
90 EOT
91 }