create_addon: do not include addons, embedded in image

This commit is contained in:
Sascha Kuehndel (InuSasha) 2018-07-19 21:38:51 +02:00
parent 70db036ca9
commit a5fd4a44aa
No known key found for this signature in database
GPG Key ID: 15FED89617B88D1B
6 changed files with 21 additions and 9 deletions

View File

@ -547,7 +547,7 @@ build_with_debug() {
[ "${PKG_NAME}" = "debug" ] && return 0
# Build addons with debug if we're building the mediacenter with debug and with dependencies
[ "${PKG_IS_ADDON}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "${MEDIACENTER}\+" && return 0
[ "${PKG_IS_ADDON}" = "yes" -o "${PKG_IS_ADDON}" = "embedded" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "${MEDIACENTER}\+" && return 0
# Build kernel packages with debug if we're building the kernel with debug and with dependencies
[ "${PKG_IS_KERNEL_PKG}" = "yes" ] && listcontains "${_DEBUG_DEPENDS_LIST}" "linux\+" && return 0

View File

@ -84,7 +84,7 @@ if [ -n "$PKG_DIR" -a -r $PKG_DIR/package.mk ]; then
[ -z "$PKG_LONGDESC" ] && PKG_LONGDESC="$PKG_NAME (autogenerated)"
fi
if [ "$PKG_IS_ADDON" = "yes" ] ; then
if [ "$PKG_IS_ADDON" = "yes" -o "$PKG_IS_ADDON" = "embedded" ] ; then
[ -z $PKG_SECTION ] && PKG_ADDON_ID="$PKG_NAME" || PKG_ADDON_ID="${PKG_SECTION//\//.}.$PKG_NAME"
[ "$PKG_ADDON_IS_STANDALONE" != "yes" ] && PKG_NEED_UNPACK="${PKG_NEED_UNPACK} $(get_pkg_directory $MEDIACENTER)"
fi

View File

@ -14,7 +14,7 @@ PKG_SHORTDESC="Provides the ability to change the led lights on the Slice box vi
PKG_LONGDESC="Provides the ability to change the led lights on the Slice box via Kodi actions"
PKG_TOOLCHAIN="manual"
PKG_IS_ADDON="yes"
PKG_IS_ADDON="embedded"
PKG_ADDON_NAME="Slice"
PKG_ADDON_PROJECTS="Slice Slice3"
PKG_ADDON_TYPE="xbmc.service"

View File

@ -16,5 +16,5 @@ PKG_SHORTDESC="peripheral.joystick: Joystick support in Kodi"
PKG_LONGDESC="peripheral.joystick provides joystick support and button mapping"
PKG_BUILD_FLAGS="+lto"
PKG_IS_ADDON="yes"
PKG_IS_ADDON="embedded"
PKG_ADDON_TYPE="kodi.peripheral"

View File

@ -66,7 +66,7 @@ Additional options used when the package builds an addon.
| Variable | Default | Required |Description |
|-------------|---------|----------|------------|
| PKG_REV | - | yes | The revision number of the addon (starts at 100). Must be placed after `PKG_VERSION`. Must be incremented for each new version else Kodi clients will not detect version change and download the updated addon. |
| PKG_IS_ADDON | no | yes | Must be set to `yes` |
| PKG_IS_ADDON | no | yes | Must be set to `yes` <br>or to `embedded` when this addon is part of the image |
| PKG_ADDON_NAME | - | yes | Proper name of the addon that is shown at the repo |
| PKG_ADDON_TYPE | - | yes | See LE/config/addon/ for other possibilities |
| PKG_ADDON_VERSION | - | no | The version of the addon, used in addon.xml |

View File

@ -4,7 +4,8 @@
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
. config/options
set
exit
# usage
usage() {
cat - >&2 <<EOUSAGE
@ -74,11 +75,21 @@ function find_addons() {
| xargs -n1 -I{} $SHELL -c '. ./config/options {} &>/dev/null; [ "$PKG_IS_ADDON" == "yes" ] && echo $PKG_NAME'
)
# check if anything is found
local _count=$(wc -w <<< $_addons)
if [ "$_count" == 0 ]; then
printf "$(print_color CLR_ERROR "ERROR: '$1' matches nothing...")\n" ' '>&$SILENT_OUT
printf "for more informations type: ./scripts/create_addon --help\n" ' '>&$SILENT_OUT
exit 1
# handle embedded addons here, should not found by regex
( . ./config/options $1 &>/dev/null
[ "$PKG_IS_ADDON" != "embedded" ] && exit 1
echo $PKG_NAME
)
# abort when nothing found and not embedded
if [ $? != 0 ]; then
printf "$(print_color CLR_ERROR "ERROR: '$1' matches nothing...")\n" ' '>&$SILENT_OUT
printf "for more informations type: ./scripts/create_addon --help\n" ' '>&$SILENT_OUT
exit 1
fi
fi
echo $_addons
@ -223,6 +234,7 @@ while [ $# -gt 0 ]; do
case $1 in
--help) usage 0;;
--show-only) show_only="true";;
--*) usage 1;;
-*) addons_drop+=" $(find_addons ${1:1})";;
*) addons+=" $(find_addons $1)";;
esac