diff --git a/abuild.in b/abuild.in index 7cfa16a..db74f2d 100644 --- a/abuild.in +++ b/abuild.in @@ -426,6 +426,8 @@ default_unpack() { verify || return 1 initdcheck || return 1 mkdir -p "$srcdir" + local gunzip=$(command -v pigz || echo gunzip) + [ $gunzip = "/usr/bin/pigz" ] && gunzip="$gunzip -d" for u in $source; do local s if is_remote "$u"; then @@ -439,7 +441,7 @@ default_unpack() { tar -C "$srcdir" -xf "$s" || return 1;; *.tar.gz|*.tgz) msg "Unpacking $s..." - tar -C "$srcdir" -zxf "$s" || return 1;; + $gunzip -c "$s" | tar -C "$srcdir" -x || return 1;; *.tar.bz2) msg "Unpacking $s..." tar -C "$srcdir" -jxf "$s" || return 1;; @@ -448,11 +450,11 @@ default_unpack() { tar -C "$srcdir" --lzip -xf "$s" || return 1;; *.tar.lzma) msg "Unpacking $s..." - unlzma -c "$s" | tar -C "$srcdir" -x \ + unlzma -T 0 -c "$s" | tar -C "$srcdir" -x \ || return 1;; *.tar.xz) msg "Unpacking $s..." - unxz -c "$s" | tar -C "$srcdir" -x || return 1;; + unxz -T 0 -c "$s" | tar -C "$srcdir" -x || return 1;; *.zip) msg "Unpacking $s..." unzip -n -q "$s" -d "$srcdir" || return 1;;