mirror of
https://github.com/libretro/Lakka.git
synced 2024-11-30 11:30:33 +00:00
scripts/create_addon: add shared functions
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
868d014743
commit
bf0f0fad4c
21
config/addon/addon.xml
Normal file
21
config/addon/addon.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="@PKG_ADDON_ID@"
|
||||
name="@PKG_SHORTDESC@"
|
||||
version="@ADDON_VERSION@"
|
||||
provider-name="openelec.tv">
|
||||
<requires>
|
||||
<import addon="os.openelec.tv" version="@OS_VERSION@"/>
|
||||
<import addon="xbmc.python" version="1.0"/>
|
||||
</requires>
|
||||
<extension point="xbmc.python.pluginsource"
|
||||
library="default.py">
|
||||
<provides>executable</provides>
|
||||
</extension>
|
||||
<extension point="xbmc.addon.metadata">
|
||||
<summary>@PKG_SHORTDESC@</summary>
|
||||
<description>
|
||||
@PKG_LONGDESC@
|
||||
</description>
|
||||
<platform>all</platform>
|
||||
</extension>
|
||||
</addon>
|
@ -23,5 +23,51 @@ printf "%${INDENT}c CREATE ADDON $1\n" >&$SILENT_OUT
|
||||
export INDENT=$((${INDENT:-1}+$INDENT_SIZE))
|
||||
|
||||
if [ -f $PKG_DIR/addon ]; then
|
||||
|
||||
rm -rf $ADDON_BUILD
|
||||
|
||||
$PKG_DIR/addon $@ >&$VERBOSE_OUT
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID
|
||||
cp config/addon/default.py $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|@ADDON_VERSION@|$OS_VERSION.$PKG_REV|g" \
|
||||
-e "s|@PKG_SHORTDESC@|$PKG_SHORTDESC|g" \
|
||||
-e "s|@OS_VERSION@|$OS_VERSION|g" \
|
||||
-e "s|@PKG_LONGDESC@|$PKG_LONGDESC|g" \
|
||||
-i $ADDON_BUILD/$PKG_ADDON_ID/addon.xml
|
||||
|
||||
if [ -f $PKG_DIR/scripts/start.sh ]; then
|
||||
cp $PKG_DIR/scripts/start.sh $ADDON_BUILD/$PKG_ADDON_ID
|
||||
else
|
||||
echo "*** ERROR: you need $PKG_DIR/scripts/start.sh so your addon can work ***"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f $PKG_DIR/icon/icon.png ]; then
|
||||
cp $PKG_DIR/icon/icon.png $ADDON_BUILD/$PKG_ADDON_ID
|
||||
else
|
||||
echo "*** WARNING: its recommended to have an $PKG_DIR/icon/icon.png ***"
|
||||
fi
|
||||
|
||||
if [ -f $PKG_DIR/changelog.txt ]; then
|
||||
cp $PKG_DIR/changelog.txt $ADDON_BUILD/$PKG_ADDON_ID
|
||||
else
|
||||
echo "*** WARNING: its recommended to have an $PKG_DIR/changelog.txt ***"
|
||||
fi
|
||||
|
||||
if [ -d $ADDON_BUILD/mkimage ]; then
|
||||
$ROOT/$TOOLCHAIN/bin/mksquashfs $ADDON_BUILD/mkimage $ADDON_BUILD/$PKG_ADDON_ID/$1.img -noappend -comp lzma
|
||||
fi
|
||||
|
||||
cd $ADDON_BUILD
|
||||
echo "*** compressing Addon $PKG_ADDON_ID ... ***"
|
||||
zip -rq $PKG_ADDON_ID-$OS_VERSION.$PKG_REV.zip $PKG_ADDON_ID;
|
||||
cd -
|
||||
|
||||
mkdir -p $ADDON_BUILD/target/$PKG_ADDON_ID
|
||||
cp $ADDON_BUILD/$PKG_ADDON_ID-$OS_VERSION.$PKG_REV.zip $ADDON_BUILD/target/$PKG_ADDON_ID
|
||||
cp $PKG_DIR/changelog.txt $ADDON_BUILD/target/$PKG_ADDON_ID/changelog-$OS_VERSION.$PKG_REV.txt
|
||||
cp $PKG_DIR/icon/icon.png $ADDON_BUILD/target/$PKG_ADDON_ID/icon.png
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user