hooks/do-extract/00-distfiles: supports rpm extraction via rpmextract.
This commit is contained in:
parent
17f15ae108
commit
65bf4d6fca
1 changed files with 13 additions and 1 deletions
|
@ -50,6 +50,7 @@ hook() {
|
|||
*.bz2) cursufx="bz2";;
|
||||
*.tar) cursufx="tar";;
|
||||
*.zip) cursufx="zip";;
|
||||
*.rpm) cursufx="rpm";;
|
||||
*) msg_error "$pkgver: unknown distfile suffix for $curfile.\n";;
|
||||
esac
|
||||
|
||||
|
@ -81,7 +82,7 @@ hook() {
|
|||
fi
|
||||
;;
|
||||
zip)
|
||||
if command -v unzip 2>&1 >/dev/null; then
|
||||
if command -v unzip &>/dev/null; then
|
||||
unzip -q $srcdir/$curfile -d $extractdir
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
||||
|
@ -90,6 +91,17 @@ hook() {
|
|||
msg_error "$pkgver: cannot find unzip bin for extraction.\n"
|
||||
fi
|
||||
;;
|
||||
rpm)
|
||||
if command -v rpmextract &>/dev/null; then
|
||||
cd $extractdir
|
||||
rpmextract $srcdir/$curfile
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
|
||||
fi
|
||||
else
|
||||
msg_error "$pkgver: cannot find rpmextract for extraction.\n"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
msg_error "$pkgver: cannot guess $curfile extract suffix. ($cursufx)\n"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue