diff --git a/packages/addons/addon-depends/RPi.GPIO/package.mk b/packages/addons/addon-depends/RPi.GPIO/package.mk new file mode 100644 index 0000000000..0ac7751247 --- /dev/null +++ b/packages/addons/addon-depends/RPi.GPIO/package.mk @@ -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 . +################################################################################ + +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 +}