From c23daff1274754657b29481ae800d413d5c3415c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 11 Jan 2016 11:02:44 +0100 Subject: [PATCH] xbps-src: handle .7z distfiles via 7z. --- common/hooks/do-extract/00-distfiles.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh index f3699aa628c..a4b2669df1a 100644 --- a/common/hooks/do-extract/00-distfiles.sh +++ b/common/hooks/do-extract/00-distfiles.sh @@ -54,6 +54,7 @@ hook() { *.patch) cursufx="txt";; *.diff) cursufx="txt";; *.txt) cursufx="txt";; + *.7z) cursufx="7z";; *) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";; esac @@ -108,6 +109,16 @@ hook() { txt) cp -f $srcdir/$curfile $extractdir ;; + 7z) + if command -v 7z &>/dev/null; then + 7z x $srcdir/$curfile -o$extractdir + if [ $? -ne 0 ]; then + msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n" + fi + else + msg_error "$pkgver: cannot find 7z bin for extraction.\n" + fi + ;; *) msg_error "$pkgver: cannot guess $curfile extract suffix. ($cursufx)\n" ;;