From 0c7484d227e2d1a814db156563dcc44f0f25f63c Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Mon, 21 May 2012 20:23:30 +0200 Subject: [PATCH] Add support for xz compressed tarballs --- buildpkg.functions | 3 ++- buildpkg.tools | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/buildpkg.functions b/buildpkg.functions index 2d2a487..b2733c2 100644 --- a/buildpkg.functions +++ b/buildpkg.functions @@ -383,7 +383,7 @@ get_files() # unpack(): Unpack source # params: $1 = source number (arrayindex) # It will detect filetype and unpack -# .tar, .tgz, .gz, .bz2, zip and .Z supported +# .tar, .tgz, .gz, .bz2, .xz, .zip and .Z supported unpack() { local source=${source[$1]} @@ -415,6 +415,7 @@ unpack() 'bz2') ${__bzip2} -dc $absfile | ${__tar} -xf -;; 'Z') ${__gzip} -dc $absfile | ${__tar} -xf -;; 'tgz') ${__gzip} -dc $absfile | ${__tar} -xf -;; + 'xz') ${__xz} -dc $absfile | ${__tar} -xf -;; 'zip') ${__unzip} -q $absfile;; *) error $E_BAD_COMPRESS unpack esac diff --git a/buildpkg.tools b/buildpkg.tools index 699b9a0..adcf1ab 100644 --- a/buildpkg.tools +++ b/buildpkg.tools @@ -8,6 +8,7 @@ __tar=/usr/tgcware/bin/tar # GNU tar v1.14 or better please! __vtar=/usr/bin/tar # vendor supplied tar __bzip2=/usr/tgcware/bin/bzip2 __gzip=/usr/tgcware/bin/gzip +__xz=/usr/tgcware/bin/xz __patch=/usr/tgcware/bin/patch # GNU patch 2.5 or better please! __rm=/usr/bin/rm __rmdir=/usr/bin/rmdir