diff --git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh index c221bad9292..2e802b97eb5 100644 --- a/common/hooks/do-extract/00-distfiles.sh +++ b/common/hooks/do-extract/00-distfiles.sh @@ -56,6 +56,7 @@ hook() { *.txt) cursufx="txt";; *.7z) cursufx="7z";; *.gem) cursufx="gem";; + *.crate) cursufx="crate";; *) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";; esac @@ -66,7 +67,7 @@ hook() { fi case ${cursufx} in - txz|tbz|tlz|tgz) + txz|tbz|tlz|tgz|crate) tar -x --no-same-permissions --no-same-owner -f $srcdir/$curfile -C $extractdir if [ $? -ne 0 ]; then msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n" diff --git a/common/hooks/do-fetch/00-distfiles.sh b/common/hooks/do-fetch/00-distfiles.sh index 43b9c66b625..ebe0f88772d 100644 --- a/common/hooks/do-fetch/00-distfiles.sh +++ b/common/hooks/do-fetch/00-distfiles.sh @@ -44,11 +44,12 @@ contents_cksum() { *.txt) cursufx="txt";; *.7z) cursufx="7z";; *.gem) cursufx="gem";; + *.crate) cursufx="crate";; *) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";; esac case ${cursufx} in - tar|txz|tbz|tlz|tgz) + tar|txz|tbz|tlz|tgz|crate) cksum=$(tar xf "$curfile" --to-stdout | sha256sum | awk '{print $1}') if [ $? -ne 0 ]; then msg_error "$pkgver: extracting $curfile to pipe.\n"