mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #201 from lrusak/rpi-addon
rpi-tools: initial add-on
This commit is contained in:
commit
13402d8b8a
45
packages/addons/addon-depends/RPi.GPIO/package.mk
Normal file
45
packages/addons/addon-depends/RPi.GPIO/package.mk
Normal file
@ -0,0 +1,45 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - http://www.libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="RPi.GPIO"
|
||||
PKG_VERSION="0.6.2"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="http://sourceforge.net/p/raspberry-gpio-python/"
|
||||
PKG_URL="https://pypi.python.org/packages/source/R/RPi.GPIO/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain Python distutilscross:host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="python"
|
||||
PKG_SHORTDESC="A module to control Raspberry Pi GPIO channels"
|
||||
PKG_LONGDESC="A module to control Raspberry Pi GPIO channels"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
pre_configure_target() {
|
||||
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
|
||||
export LDSHARED="$CC -shared"
|
||||
export CPPFLAGS="$TARGET_CPPFLAGS -I${SYSROOT_PREFIX}/usr/include/python2.7"
|
||||
}
|
||||
|
||||
make_target() {
|
||||
python setup.py build
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nop
|
||||
}
|
39
packages/addons/addon-depends/gpiozero/package.mk
Normal file
39
packages/addons/addon-depends/gpiozero/package.mk
Normal file
@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - http://www.libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="gpiozero"
|
||||
PKG_VERSION="1.2.0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="https://github.com/RPi-Distro/python-gpiozero"
|
||||
PKG_URL="https://pypi.python.org/packages/source/g/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="python"
|
||||
PKG_SHORTDESC="A simple interface to everyday GPIO components used with Raspberry Pi"
|
||||
PKG_LONGDESC="A simple interface to everyday GPIO components used with Raspberry Pi"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
make_target() {
|
||||
: # nop
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nop
|
||||
}
|
39
packages/addons/addon-depends/picamera/package.mk
Normal file
39
packages/addons/addon-depends/picamera/package.mk
Normal file
@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - http://www.libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="picamera"
|
||||
PKG_VERSION="1.10"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="BSD"
|
||||
PKG_SITE="https://github.com/waveform80/picamera"
|
||||
PKG_URL="https://pypi.python.org/packages/source/p/picamera/$PKG_NAME-$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain Python distutilscross:host bcm2835-driver"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="python"
|
||||
PKG_SHORTDESC="A python and shell interface for the Raspberry Pi camera module"
|
||||
PKG_LONGDESC="A python and shell interface for the Raspberry Pi camera module"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
make_target() {
|
||||
: # nop
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nop
|
||||
}
|
2
packages/addons/tools/rpi-tools/changelog.txt
Normal file
2
packages/addons/tools/rpi-tools/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
8.0.100
|
||||
- Initial Release
|
BIN
packages/addons/tools/rpi-tools/icon/icon.png
Normal file
BIN
packages/addons/tools/rpi-tools/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
54
packages/addons/tools/rpi-tools/package.mk
Normal file
54
packages/addons/tools/rpi-tools/package.mk
Normal file
@ -0,0 +1,54 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - http://www.libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="rpi-tools"
|
||||
PKG_VERSION=""
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="arm"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE=""
|
||||
PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain RPi.GPIO picamera gpiozero"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_SHORTDESC="A bundle of tools and programs for use on the Raspberry Pi"
|
||||
PKG_LONGDESC="This bundle currently includes RPi.GPIO, picamera, and gpiozero python modules"
|
||||
PKG_DISCAIMER="Raspberry Pi is a trademark of the Raspberry Pi Foundation http://www.raspberrypi.org"
|
||||
|
||||
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_REPOVERSION="8.0"
|
||||
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/RPi/
|
||||
cp -PR $(get_build_dir RPi.GPIO)/build/lib.linux-*/RPi/* $ADDON_BUILD/$PKG_ADDON_ID/lib/RPi
|
||||
cp -PR $(get_build_dir picamera)/picamera $ADDON_BUILD/$PKG_ADDON_ID/lib/
|
||||
cp -PR $(get_build_dir gpiozero)/gpiozero $ADDON_BUILD/$PKG_ADDON_ID/lib/
|
||||
|
||||
BCM2835_DIR="$(get_build_dir bcm2835-driver)"
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||
cp -P $BCM2835_DIR/hardfp/opt/vc/bin/raspistill $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $BCM2835_DIR/hardfp/opt/vc/bin/raspiyuv $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $BCM2835_DIR/hardfp/opt/vc/bin/raspivid $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $BCM2835_DIR/hardfp/opt/vc/bin/raspividyuv $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
22
packages/addons/tools/rpi-tools/source/default.py
Normal file
22
packages/addons/tools/rpi-tools/source/default.py
Normal file
@ -0,0 +1,22 @@
|
||||
################################################################################
|
||||
# This file is part of LibreELEC - http://www.libreelec.tv
|
||||
# Copyright (C) 2016 Team LibreELEC
|
||||
#
|
||||
# LibreELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# LibreELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
import xbmcgui
|
||||
|
||||
dialog = xbmcgui.Dialog()
|
||||
dialog.ok('', 'This is a console-only addon')
|
Loading…
x
Reference in New Issue
Block a user