# HG changeset patch # User Pascal Bellard # Date 1243414466 -7200 # Node ID c50152520c0a63c33bfe0e208c621860c117263e # Parent 21b155a7fff15edc3bf65ad44a634e6c6a82d211 Xarchive: add lzo support diff -r 21b155a7fff1 -r c50152520c0a xarchive/receipt --- a/xarchive/receipt Wed May 27 10:51:59 2009 +0200 +++ b/xarchive/receipt Wed May 27 10:54:26 2009 +0200 @@ -8,7 +8,7 @@ TARBALL="$PACKAGE-$VERSION.tar.gz" DEPENDS="gtk+ xorg-libXdamage" BUILD_DEPENDS="pkg-config gtk+ gtk+-dev" -SUGGESTED="zip rar unace arj lha p7zip" +SUGGESTED="zip rar unace arj lha p7zip lzop" WEB_SITE="http://xarchive.sourceforge.net/" WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" diff -r 21b155a7fff1 -r c50152520c0a xarchive/stuff/slitaz-wrap.sh --- a/xarchive/stuff/slitaz-wrap.sh Wed May 27 10:51:59 2009 +0200 +++ b/xarchive/stuff/slitaz-wrap.sh Wed May 27 10:54:26 2009 +0200 @@ -40,6 +40,7 @@ CLOOP_EXTS="cloop" RAR_EXTS="rar cbr" LHA_EXTS="lha lzh lzs" +LZO_EXTS="lzo" # Setup awk program AWK_PROGS="mawk gawk awk" @@ -331,6 +332,7 @@ arj arj 7za 7z lha $LHA_EXTS +lzop $LZO_EXTS EOT printf "\n" exit @@ -622,6 +624,40 @@ exit 0 fi done + for ext in $LZO_EXTS; do + if [ $(expr "$lc_archive" : ".*\."$ext"$") -gt 0 ]; then + # format of lzo output: +# Method Length Packed Ratio Date Time Name +# ------ ------ ------ ----- ---- ---- ---- +# LZO1X-1 626 526 84.0% 2009-05-27 09:52 file +# LZO1X-1 10057 5675 56.4% 2005-07-25 16:26 path/file +# ------- ------- ----- ---- +# 1 2 3 4 5 6 7 + lzop -Plv "$archive" | $AWK_PROG -v uuid=$(id -u -n) ' + BEGIN { show = 0} + { + if ($5 == "----" || $4 == "----") { + show = 1 - show + next + } + attr="-rw-r--r--" + uid=uuid; gid=uuid + size=$2 + date=$5 + time=$6 + + #this method works with filenames that start with a space (evil!) + #split line a time and a space + split($0,linesplit, $6 " ") + + name=linesplit[2] + link="-" # links are not supported + + if (show == 1) printf "%s;%s;%s;%s;%s;%s;%s;%s\n",name,size,attr,uid,gid,date,time,link + }' + exit 0 + fi + done exit $E_UNSUPPORTED ;; @@ -756,6 +792,7 @@ unzip -n $ZIP_EXTS dpkg-deb -X $DEB_EXTS lha x $LHA_EXTS +lzop -x $LZO_EXTS EOT while read exe args argpass exts; do [ "$(which $exe)" ] || continue