hooks/do-extract: support extracting .gem files with gem unpack.
This commit is contained in:
parent
f25eb64d42
commit
c6c249348d
2 changed files with 11 additions and 0 deletions
|
@ -55,6 +55,7 @@ hook() {
|
|||
*.diff) cursufx="txt";;
|
||||
*.txt) cursufx="txt";;
|
||||
*.7z) cursufx="7z";;
|
||||
*.gem) cursufx="gem";;
|
||||
*) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";;
|
||||
esac
|
||||
|
||||
|
@ -119,6 +120,12 @@ hook() {
|
|||
msg_error "$pkgver: cannot find 7z bin for extraction.\n"
|
||||
fi
|
||||
;;
|
||||
gem)
|
||||
tar -xOf $srcdir/$curfile data.tar.gz | tar -xz -C $extractdir --transform="s,^,$(basename $wrksrc)/,"
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
msg_error "$pkgver: cannot guess $curfile extract suffix. ($cursufx)\n"
|
||||
;;
|
||||
|
|
|
@ -43,6 +43,7 @@ contents_cksum() {
|
|||
*.diff) cursufx="txt";;
|
||||
*.txt) cursufx="txt";;
|
||||
*.7z) cursufx="7z";;
|
||||
*.gem) cursufx="gem";;
|
||||
*) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";;
|
||||
esac
|
||||
|
||||
|
@ -92,6 +93,9 @@ contents_cksum() {
|
|||
msg_error "$pkgver: cannot find 7z bin for extraction.\n"
|
||||
fi
|
||||
;;
|
||||
gem)
|
||||
cksum=$(tar -xf "$curfile" data.tar.gz --to-stdout | tar -xzO | sha256sum | awk '{print $1}')
|
||||
;;
|
||||
*)
|
||||
msg_error "$pkgver: cannot guess $curfile extract suffix. ($cursufx)\n"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue