diff --git a/scripts/unpack b/scripts/unpack index cf418ad34e..c1b342a6ba 100755 --- a/scripts/unpack +++ b/scripts/unpack @@ -66,6 +66,18 @@ if [ -n "$PKG_URL" ]; then $SCRIPTS/extract $1 "$1*.7z" $BUILD fi +if [ -f $PKG_DIR/package.mk ]; then + # unset functions + unset -f post_unpack + + . $PKG_DIR/package.mk + + # post_unpack (replaces PKG_DIR/rename) + if [ "$(type -t post_unpack)" = "function" ]; then + post_unpack + fi +fi + [ -f "$PKG_DIR/rename" ] && $PKG_DIR/rename $@ >&$VERBOSE_OUT if [ -d "$PKG_DIR/sources" ]; then