mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
scripts/unpack: add {pre,post}_patch. post_unpack before patching
This commit is contained in:
parent
439b84a04a
commit
14066b010a
@ -79,6 +79,8 @@ if [ -f $PKG_DIR/package.mk ]; then
|
|||||||
unset -f pre_unpack
|
unset -f pre_unpack
|
||||||
unset -f unpack
|
unset -f unpack
|
||||||
unset -f post_unpack
|
unset -f post_unpack
|
||||||
|
unset -f pre_patch
|
||||||
|
unset -f post_patch
|
||||||
|
|
||||||
. $PKG_DIR/package.mk
|
. $PKG_DIR/package.mk
|
||||||
|
|
||||||
@ -109,6 +111,9 @@ if [ -f $PKG_DIR/package.mk ]; then
|
|||||||
[ ! -d "$BUILD/${PKG_NAME}-${PKG_VERSION}" ] && mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION}
|
[ ! -d "$BUILD/${PKG_NAME}-${PKG_VERSION}" ] && mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION}
|
||||||
cp -PRf $PKG_DIR/sources/* $BUILD/${PKG_NAME}-${PKG_VERSION}
|
cp -PRf $PKG_DIR/sources/* $BUILD/${PKG_NAME}-${PKG_VERSION}
|
||||||
fi
|
fi
|
||||||
|
if [ "$(type -t post_unpack)" = "function" ]; then
|
||||||
|
post_unpack
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if [ -n "$PKG_URL" ]; then
|
if [ -n "$PKG_URL" ]; then
|
||||||
$SCRIPTS/extract $1 "$1*.tar.bz2" $BUILD
|
$SCRIPTS/extract $1 "$1*.tar.bz2" $BUILD
|
||||||
@ -135,6 +140,12 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f $PKG_DIR/package.mk ]; then
|
||||||
|
if [ "$(type -t pre_patch)" = "function" ]; then
|
||||||
|
pre_patch
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
for i in $PKG_DIR/patches/$PKG_NAME-*.patch ; do
|
for i in $PKG_DIR/patches/$PKG_NAME-*.patch ; do
|
||||||
if [ -f "$i" ]; then
|
if [ -f "$i" ]; then
|
||||||
PATCH=`basename $i`
|
PATCH=`basename $i`
|
||||||
@ -177,13 +188,9 @@ for i in $PROJECT_DIR/$PROJECT/patches/$PKG_NAME/*.patch ; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# post_unpack() :
|
|
||||||
# - Formerly used to replace $PKG_DIR/rename
|
|
||||||
# - now replaced by $PKG_SOURCE_DIR .
|
|
||||||
# - now moved after patching to replace the formerly 'unpack' script
|
|
||||||
if [ -f $PKG_DIR/package.mk ]; then
|
if [ -f $PKG_DIR/package.mk ]; then
|
||||||
if [ "$(type -t post_unpack)" = "function" ]; then
|
if [ "$(type -t post_patch)" = "function" ]; then
|
||||||
post_unpack
|
post_patch
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user