create_addon: Substitute RPi1 as device to differentiate RPi project from RPi device

This commit is contained in:
MilhouseVH 2018-03-11 22:46:21 +00:00
parent 9b47b64cb9
commit 6a6eed401a
6 changed files with 12 additions and 7 deletions

View File

@ -24,7 +24,7 @@ PKG_NAME="myprogram" # same as the folder name
PKG_VERSION="1.0.1" # version or 7 digit-hash
PKG_REV="100" # currently we start at 100 to solve OE update problems
PKG_ARCH="any" # for available architectures, see LE/config/arch.* files
# PKG_ADDON_PROJECTS="RPi RPi2" # for available projects, see projects subdirectory
# PKG_ADDON_PROJECTS="any !RPi1 !Amlogic" # for available projects or devices, see projects subdirectory (note: Use RPi for RPi project, and RPi1 for RPi device)
PKG_LICENSE="GPL" # program licenses, see licenses subdirectory for a list
PKG_SITE="http://www.site.org"
PKG_URL="http://www.site.org/$PKG_VERSION.tar.xz" # for github see the other packages, prefer tar.xz over .gz

View File

@ -20,7 +20,7 @@ PKG_NAME="adafruit-libraries"
PKG_VERSION=""
PKG_REV="105"
PKG_ARCH="any"
PKG_ADDON_PROJECTS="RPi RPi2"
PKG_ADDON_PROJECTS="RPi"
PKG_LICENSE="MIT"
PKG_SITE=""
PKG_URL=""

View File

@ -21,7 +21,7 @@ PKG_VERSION="77b33a6"
PKG_SHA256="69ca5b7bd18709cb8df1054d1656c0be30fbdae6ccfefaffe70e313df4e31b4f"
PKG_REV="104"
PKG_ARCH="arm"
PKG_ADDON_PROJECTS="RPi RPi2"
PKG_ADDON_PROJECTS="RPi"
PKG_LICENSE="OSS"
PKG_SITE="https://github.com/patrikolausson/dispmanx_vnc"
PKG_URL="https://github.com/patrikolausson/dispmanx_vnc/archive/$PKG_VERSION.tar.gz"

View File

@ -20,7 +20,7 @@ PKG_NAME="touchscreen"
PKG_VERSION="1.0"
PKG_REV="101"
PKG_ARCH="any"
PKG_ADDON_PROJECTS="Generic RPi RPi2 Amlogic"
PKG_ADDON_PROJECTS="Generic RPi Amlogic"
PKG_LICENSE="GPL"
PKG_SITE=""
PKG_URL=""

View File

@ -33,7 +33,7 @@ PKG_IS_ADDON="yes"
PKG_ADDON_NAME="Raspberry Pi Tools"
PKG_ADDON_TYPE="xbmc.python.module"
PKG_ADDON_PROVIDES=""
PKG_ADDON_PROJECTS="RPi RPi2"
PKG_ADDON_PROJECTS="RPi"
addon() {

View File

@ -36,9 +36,14 @@ not_supported() {
}
if [ -n "$PKG_ADDON_PROJECTS" ]; then
listcontains "$PKG_ADDON_PROJECTS" "!${DEVICE:-$PROJECT}" && not_supported
[ "${DEVICE}" = "RPi" ] && _DEVICE="RPi1" || _DEVICE="${DEVICE}"
if ! listcontains "$PKG_ADDON_PROJECTS" "${DEVICE:-$PROJECT}" &&
if listcontains "$PKG_ADDON_PROJECTS" "!${_DEVICE:-$PROJECT}" ||
listcontains "$PKG_ADDON_PROJECTS" "!${PROJECT}"; then
not_supported
fi
if ! listcontains "$PKG_ADDON_PROJECTS" "${_DEVICE:-$PROJECT}" &&
! listcontains "$PKG_ADDON_PROJECTS" "${PROJECT}" &&
! listcontains "$PKG_ADDON_PROJECTS" "any"; then
not_supported