buildsystem: add 'post_unpack'

this is built-in PKG_DIR/rename replacement
This commit is contained in:
Stefan Saraev 2013-10-25 19:08:36 +03:00
parent 689b04eb28
commit e3f153b3a7

View File

@ -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