wok-6.x view ajaxterm/receipt @ rev 19265

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