mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
scripts/create_addon: add support for $PKG_ADDON_REQUIRES
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
3034d01846
commit
7e0b03fe47
@ -1,14 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="@PKG_ADDON_ID@"
|
||||
name="@PKG_SHORTDESC@"
|
||||
name="@PKG_NAME@"
|
||||
version="@ADDON_VERSION@"
|
||||
provider-name="openelec.tv">
|
||||
<requires>
|
||||
<import addon="os.openelec.tv" version="@OS_VERSION@"/>
|
||||
<import addon="xbmc.python" version="1.0"/>
|
||||
@REQUIRES@
|
||||
</requires>
|
||||
<extension point="@PKG_ADDON_TYPE@"
|
||||
library="default.py">
|
||||
library="default.py">
|
||||
<provides>executable</provides>
|
||||
</extension>
|
||||
<extension point="xbmc.addon.metadata">
|
||||
|
@ -22,6 +22,15 @@
|
||||
|
||||
. config/options $1
|
||||
|
||||
IFS=" "
|
||||
for i in $PKG_ADDON_REQUIRES; do
|
||||
REQUIRES_ADDONNAME=`echo $i | cut -f1 -d ":"`
|
||||
REQUIRES_ADDONVERSION=`echo $i | cut -f2 -d ":"`
|
||||
REQUIRES="$REQUIRES\n <import addon=\"$REQUIRES_ADDONNAME\" version=\"$REQUIRES_ADDONVERSION\" />"
|
||||
done
|
||||
|
||||
unset IFS
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: $0 package_name"
|
||||
exit 1
|
||||
@ -46,8 +55,10 @@ if [ -f $PKG_DIR/addon ]; then
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID
|
||||
cp config/addon/addon.xml $ADDON_BUILD/$PKG_ADDON_ID
|
||||
$SED -e "s|@PKG_ADDON_ID@|$PKG_ADDON_ID|g" \
|
||||
-e "s|@PKG_NAME@|$PKG_NAME|g" \
|
||||
-e "s|@ADDON_VERSION@|$OS_VERSION.$PKG_REV|g" \
|
||||
-e "s|@PKG_ADDON_TYPE@|$PKG_ADDON_TYPE|g" \
|
||||
-e "s|@REQUIRES@|$REQUIRES|g" \
|
||||
-e "s|@PKG_SHORTDESC@|$PKG_SHORTDESC|g" \
|
||||
-e "s|@OS_VERSION@|$OS_VERSION|g" \
|
||||
-e "s|@PKG_LONGDESC@|$PKG_LONGDESC|g" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user