From e3f153b3a7784de39874b0d7c0c5037a19d602f7 Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Fri, 25 Oct 2013 19:08:36 +0300 Subject: [PATCH] buildsystem: add 'post_unpack' this is built-in PKG_DIR/rename replacement --- scripts/unpack | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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