wok-current rev 16774
xarchiver: add backends setting page (accessed via menu -> Help -> Contents (F1))
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Jun 21 02:56:20 2014 +0300 (2014-06-21) |
parents | 79c239d4e13f |
children | f90c581724ba |
files | xarchiver/receipt xarchiver/stuff/index.html xarchiver/stuff/xarchiver.cgi |
line diff
1.1 --- a/xarchiver/receipt Fri Jun 20 15:21:26 2014 +0200 1.2 +++ b/xarchiver/receipt Sat Jun 21 02:56:20 2014 +0300 1.3 @@ -8,12 +8,14 @@ 1.4 LICENSE="GPL2" 1.5 TARBALL="$PACKAGE-$VERSION.tar.bz2" 1.6 WEB_SITE="http://xarchiver.sourceforge.net/" 1.7 -WGET_URL="$SF_MIRROR/$PACKAGE/$VERSION/$TARBALL" 1.8 +WGET_URL="$SF_MIRROR/xarchiver/$VERSION/$TARBALL" 1.9 1.10 -# binutils for ar; busybox also contains gzip & cpio; rar is get-rar; gtar is absent 1.11 -SUGGESTED="arj bzip2 binutils gzip lzma xz lzop lha rar cpio zip p7zip-full xdg-utils" 1.12 +# binutils for ar; busybox also contains gzip & cpio; rar is get-rar; 1.13 +# gtar is absent 1.14 +SUGGESTED="arj bzip2 binutils gzip lzma xz lzop lha rar cpio zip p7zip-full" 1.15 DEPENDS="gtk+" 1.16 BUILD_DEPENDS="gtk+-dev" 1.17 +GENERIC_PIXMAPS="no" 1.18 1.19 # Rules to configure and make the package. 1.20 compile_rules() 1.21 @@ -38,4 +40,8 @@ 1.22 1.23 sed -i '/Encoding/d;/Version/d;/Name\[.*\]=Xarchiver/d;/GenericName/d;/Exec/s/.*/& %f/' \ 1.24 $fs/usr/share/applications/xarchiver.desktop 1.25 + 1.26 + mkdir -p $fs/var/www/cgi-bin $fs/usr/share/doc/xarchiver/html 1.27 + cp -a $stuff/xarchiver.cgi $fs/var/www/cgi-bin 1.28 + cp -a $stuff/index.html $fs/usr/share/doc/xarchiver/html 1.29 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/xarchiver/stuff/index.html Sat Jun 21 02:56:20 2014 +0300 2.3 @@ -0,0 +1,1 @@ 2.4 +<html><head><meta http-equiv="refresh" content="0;URL='http://localhost/cgi-bin/xarchiver.cgi'" /></head><body></body></html>
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/xarchiver/stuff/xarchiver.cgi Sat Jun 21 02:56:20 2014 +0300 3.3 @@ -0,0 +1,77 @@ 3.4 +#!/bin/sh 3.5 +# Web utility to show & install suggested packages for xarchiver 3.6 +# Aleksej Bobylev <al.bobylev@gmail.com>, 2014. 3.7 + 3.8 +. /usr/lib/slitaz/httphelper.sh 3.9 +. /etc/slitaz/slitaz.conf 3.10 +. /lib/libtaz.sh 3.11 +. /etc/locale.conf; export LANG LC_ALL 3.12 +export TEXTDOMAIN='tazpkg' 3.13 + 3.14 +case "$(GET)" in 3.15 + img) 3.16 + header "HTTP/1.1 200 OK\nContent-type: image/png" 3.17 + case "$(GET img)" in 3.18 + yes) cat /usr/share/icons/SliTaz/actions/22/gtk-ok.png ;; 3.19 + not) cat /usr/share/icons/SliTaz/actions/22/gtk-remove.png ;; 3.20 + fav) cat /usr/share/icons/hicolor/16x16/apps/xarchiver.png ;; 3.21 + log) cat /usr/share/icons/hicolor/48x48/apps/xarchiver.png ;; 3.22 + esac ;; 3.23 + *) 3.24 + header 3.25 + cat << EOT 3.26 +<!DOCTYPE html> 3.27 +<html> 3.28 +<head> 3.29 + <meta charset="utf-8" /> 3.30 + <title>Xarchiver</title> 3.31 + <link rel="shortcut icon" type="image/png" href="?img=fav"> 3.32 + <style type="text/css"> 3.33 + *{font-family:sans} 3.34 + img{vertical-align:middle;} 3.35 + #installer{display:none} 3.36 + </style> 3.37 + <script type="text/javascript"> 3.38 + function inst(actpkg) { 3.39 + document.getElementById("installer").src = "http://localhost:82/pkgs.cgi?do=" + actpkg 3.40 + } 3.41 + function on_load(iframe) { 3.42 + if (iframe.src !== "http://localhost/cgi-bin/xarchiver.cgi") {location.reload(false)} 3.43 + } 3.44 + </script> 3.45 +</head> 3.46 +<body> 3.47 +<div style="border:1pt solid gray; border-radius:6pt; margin:6pt; padding:6pt;"> 3.48 +<table><tr><td style="vertical-align:top"><img src="?img=log" /></td> 3.49 +<td>$(cat $INSTALLED/xarchiver/description.txt)</td></table> 3.50 +</div> 3.51 +<p>Here you can install some SliTaz packages using TazPanel on the background. 3.52 +Note that you always have tiny versions of <strong>gzip</strong> and <strong>cpio</strong> (as part of Busybox), so you may not install its "official" versions.</p> 3.53 +<table> 3.54 + <tbody> 3.55 +EOT 3.56 + for pkg in ar arj bzip2 cpio gzip lha lzma lzop rar xz zip 7z xdg-utils; do 3.57 + 3.58 + case $pkg in 3.59 + ar) pkg2=binutils ;; 3.60 + 7z) pkg2=p7zip-full ;; 3.61 + *) pkg2=$pkg ;; 3.62 + esac 3.63 + 3.64 + if [ -d $INSTALLED/$pkg2 ]; then 3.65 + img=yes; act=Remove; desc="$(_ Remove)" 3.66 + else 3.67 + img=not; act=Install; desc="$(_ Install)" 3.68 + fi 3.69 + echo "<tr><td><img src=\"?img=$img\" /> $pkg</td></td><td><button type=\"submit\" onclick='inst(\"${act}&${pkg2}\")'>$desc</button></td></tr>" 3.70 + done 3.71 + cat << EOT 3.72 + </tbody> 3.73 +</table> 3.74 +<iframe id="installer" src="" onload="on_load(this)"></iframe> 3.75 +</body> 3.76 +</html> 3.77 +EOT 3.78 + ;; 3.79 +esac 3.80 +exit 0