wok annotate ajaxterm/receipt @ rev 14789
Fix ownership and permissions for some files in some packages: adeskbar, ajaxterm, amsn, anacron, arora, asciiquarium, assaultcube-data, asterisk-sound-fr, asterisk-sound, attr-dev, attr, audacious, avidemux, awstats, bind-dev, binutils, blogotext, bootchart, btanks, bzip2-dev, c-client, cairo-dock.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Jul 08 11:45:27 2013 +0300 (2013-07-08) |
parents | c6794eb6dd1a |
children | f4c22f009037 |
rev | line source |
---|---|
pascal@1951 | 1 # SliTaz package receipt. |
pascal@1951 | 2 |
pascal@1951 | 3 PACKAGE="ajaxterm" |
pascal@1951 | 4 VERSION="0.10" |
pascal@1951 | 5 CATEGORY="network" |
pascal@1951 | 6 SHORT_DESC="Login terminal for the web." |
pascal@1951 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
al@14789 | 8 WEB_SITE="http://antony.lesuisse.org/software/ajaxterm/" |
pascal@1951 | 9 SOURCE="Ajaxterm" |
pascal@1951 | 10 TARBALL="$SOURCE-$VERSION.tar.gz" |
pascal@1952 | 11 WGET_URL="${WEB_SITE}files/$TARBALL" |
al@14789 | 12 TAGS="web application" |
al@14789 | 13 |
pascal@1951 | 14 DEPENDS="python" |
pascal@1951 | 15 SUGGESTED="apache lighttpd-ssl lighttpd-modules" |
pascal@1951 | 16 |
pascal@1951 | 17 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1951 | 18 genpkg_rules() |
pascal@1951 | 19 { |
pascal@1951 | 20 mkdir -p $fs/usr/share/ajaxterm |
pascal@1951 | 21 cp -a $src/*.py $src/*.js $src/*.css $src/*.html $fs/usr/share/ajaxterm |
pankso@9697 | 22 cp -a $stuff/* $fs/ |
al@14789 | 23 chown -R root:root $fs |
al@14789 | 24 find $fs -type f -name '*.py' -exec chmod a+x \{\} \; |
pascal@1951 | 25 } |
pascal@1951 | 26 |
pascal@1951 | 27 post_install() |
pascal@1951 | 28 { |
pascal@1951 | 29 grep ^RUN_DAEMONS $1/etc/rcS.conf | grep -q "ajaxterm" || sed -i \ |
pascal@2303 | 30 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' $1/etc/rcS.conf |
pascal@1951 | 31 # Configure lighttpd server |
pascal@1951 | 32 if [ -f $1/usr/lib/lighttpd/mod_proxy.so ]; then |
pascal@1951 | 33 grep -q mod_proxy $1/etc/lighttpd/lighttpd.conf || |
pascal@1951 | 34 cat >> $1/etc/lighttpd/lighttpd.conf <<EOT |
pascal@1951 | 35 server.modules += ( "mod_proxy" ) |
pascal@1951 | 36 EOT |
pascal@1951 | 37 grep -q ajaxterm $1/etc/lighttpd/lighttpd.conf || |
pascal@1951 | 38 cat >> $1/etc/lighttpd/lighttpd.conf <<EOT |
pascal@1951 | 39 proxy.server = ( "/ajaxterm/" => |
pascal@1951 | 40 ( ( "host" => "127.0.0.1", "port" => 8022 ) ) |
pascal@1951 | 41 ) |
pascal@1951 | 42 EOT |
pascal@1951 | 43 if [ -z "$1" ]; then |
pascal@1951 | 44 # Start Web server. |
pascal@1951 | 45 /etc/init.d/lighttpd stop |
pascal@1951 | 46 /etc/init.d/lighttpd start |
pascal@1951 | 47 fi |
pascal@1951 | 48 fi |
pascal@1951 | 49 # Configure apache server |
pascal@1951 | 50 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@1951 | 51 if [ ! -f $1/etc/apache/conf.d/ajaxterm ]; then |
pascal@1951 | 52 cat > $1/etc/apache/conf.d/ajaxterm <<EOT |
pascal@1951 | 53 <IfModule mod_proxy.c> |
pascal@1951 | 54 ProxyRequests Off |
pascal@1951 | 55 <Proxy *> |
pascal@1951 | 56 Order deny,allow |
pascal@1951 | 57 Allow from all |
pascal@1951 | 58 </Proxy> |
pascal@1951 | 59 ProxyPass /ajaxterm/ http://localhost:8022/ |
pascal@1951 | 60 ProxyPassReverse /ajaxterm/ http://localhost:8022/ |
pascal@1951 | 61 </IfModule> |
pascal@1951 | 62 EOT |
pascal@1951 | 63 if [ -z "$1" ]; then |
pascal@1951 | 64 # Start Web server. |
pascal@1951 | 65 /etc/init.d/apache stop |
pascal@1951 | 66 sleep 2 |
pascal@1951 | 67 /etc/init.d/apache start |
pascal@1951 | 68 fi |
pascal@1951 | 69 fi |
pascal@1951 | 70 fi |
pascal@1951 | 71 [ -z "$1" ] && /etc/init.d/ajaxterm start |
pascal@1951 | 72 [ ! -f $1/usr/lib/lighttpd/mod_proxy.so -a \ |
pascal@1951 | 73 ! -f $1/etc/apache/httpd.conf ] && cat <<EOT |
pascal@1951 | 74 -------- |
pascal@1951 | 75 You should install either lighttpd |
pascal@1951 | 76 # tazpkg get-install lighttpd-ssl ; tazpkg get-install lighttpd-modules |
pascal@1951 | 77 or apache |
pascal@1951 | 78 # tazpkg get-install apache |
pascal@1951 | 79 and reconfigure |
pascal@1951 | 80 # tazpkg reconfigure ajaxterm |
pascal@1951 | 81 -------- |
pascal@1951 | 82 EOT |
pascal@1951 | 83 } |
pascal@1951 | 84 |