wok view ajaxterm/receipt @ rev 15201
Add some licenses
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Sep 07 18:25:02 2013 +0000 (2013-09-07) |
parents | a7b54d88ae54 |
children | d5f9f516b706 |
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 ] && cat <<EOT
75 --------
76 You should install either lighttpd
77 # tazpkg get-install lighttpd-ssl ; tazpkg get-install lighttpd-modules
78 or apache
79 # tazpkg get-install apache
80 and reconfigure
81 # tazpkg reconfigure ajaxterm
82 --------
83 EOT
84 }