wok view ajaxterm/receipt @ rev 19275

Check manpages... from start to beaver.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jul 05 15:34:01 2016 +0300 (2016-07-05)
parents f0a0b5091b4a
children a5b865e166cd
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 \{\} \;
27 cook_pick_manpages $src/ajaxterm.1
28 }
30 post_install()
31 {
32 grep ^RUN_DAEMONS "$1/etc/rcS.conf" | grep -q "ajaxterm" || sed -i \
33 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' "$1/etc/rcS.conf"
34 # Configure lighttpd server
35 if [ -f "$1/usr/lib/lighttpd/mod_proxy.so" ]; then
36 grep -q mod_proxy "$1/etc/lighttpd/lighttpd.conf" ||
37 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
38 server.modules += ( "mod_proxy" )
39 EOT
40 grep -q ajaxterm "$1/etc/lighttpd/lighttpd.conf" ||
41 cat >> "$1/etc/lighttpd/lighttpd.conf" <<EOT
42 proxy.server = ( "/ajaxterm/" =>
43 ( ( "host" => "127.0.0.1", "port" => 8022 ) )
44 )
45 EOT
46 if [ -z "$1" ]; then
47 # Start Web server.
48 /etc/init.d/lighttpd stop
49 /etc/init.d/lighttpd start
50 fi
51 fi
52 # Configure apache server
53 if [ -f "$1/etc/apache/httpd.conf" ]; then
54 if [ ! -f "$1/etc/apache/conf.d/ajaxterm" ]; then
55 cat > "$1/etc/apache/conf.d/ajaxterm" <<EOT
56 <IfModule mod_proxy.c>
57 ProxyRequests Off
58 <Proxy *>
59 Order deny,allow
60 Allow from all
61 </Proxy>
62 ProxyPass /ajaxterm/ http://localhost:8022/
63 ProxyPassReverse /ajaxterm/ http://localhost:8022/
64 </IfModule>
65 EOT
66 if [ -z "$1" ]; then
67 # Start Web server.
68 /etc/init.d/apache stop
69 sleep 2
70 /etc/init.d/apache start
71 fi
72 fi
73 fi
74 [ -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
78 --------
79 You should install either lighttpd
80 # tazpkg get-install lighttpd-ssl ; tazpkg get-install lighttpd-modules
81 or apache
82 # tazpkg get-install apache
83 and reconfigure
84 # tazpkg reconfigure ajaxterm
85 --------
86 EOT
87 }