diff --git a/config/functions b/config/functions index 9eb4f232e0..c0a3b8227c 100644 --- a/config/functions +++ b/config/functions @@ -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 diff --git a/config/path b/config/path index dc2f3e6e8b..da0b1182b5 100644 --- a/config/path +++ b/config/path @@ -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 diff --git a/packages/addons/service/slice/package.mk b/packages/addons/service/slice/package.mk index 5c646f4557..f70f73173b 100644 --- a/packages/addons/service/slice/package.mk +++ b/packages/addons/service/slice/package.mk @@ -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" diff --git a/packages/mediacenter/kodi-binary-addons/peripheral.joystick/package.mk b/packages/mediacenter/kodi-binary-addons/peripheral.joystick/package.mk index 790dffdf0d..f5ec450c16 100644 --- a/packages/mediacenter/kodi-binary-addons/peripheral.joystick/package.mk +++ b/packages/mediacenter/kodi-binary-addons/peripheral.joystick/package.mk @@ -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" diff --git a/packages/readme.md b/packages/readme.md index 0d08c63772..cd2df2efdb 100644 --- a/packages/readme.md +++ b/packages/readme.md @@ -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`
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 | diff --git a/scripts/create_addon b/scripts/create_addon index d20197449a..b2d6b815b9 100755 --- a/scripts/create_addon +++ b/scripts/create_addon @@ -4,7 +4,8 @@ # Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) . config/options - +set +exit # usage usage() { cat - >&2 </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