diff --git a/packages/addons/driver/xbmc-ps3remote/addon b/packages/addons/driver/xbmc-ps3remote/addon new file mode 100755 index 0000000000..09b5ddfb18 --- /dev/null +++ b/packages/addons/driver/xbmc-ps3remote/addon @@ -0,0 +1,32 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pixmaps + cp $BUILD/xbmc-*/tools/EventClients/icons/bluetooth.png $ADDON_BUILD/$PKG_ADDON_ID/pixmaps + +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib + cp $BUILD/xbmc-*/tools/EventClients/Clients/PS3\ BD\ Remote/ps3_remote.py $ADDON_BUILD/$PKG_ADDON_ID/pylib + cp -R $BUILD/PyBluez-*/.install/usr/lib/python*/site-packages/* $ADDON_BUILD/$PKG_ADDON_ID/pylib +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/pylib/xbmc + cp -R $BUILD/xbmc-*/tools/EventClients/lib/python/* $ADDON_BUILD/$PKG_ADDON_ID/pylib/xbmc diff --git a/packages/addons/driver/xbmc-ps3remote/changelog.txt b/packages/addons/driver/xbmc-ps3remote/changelog.txt new file mode 100644 index 0000000000..2b2cf97623 --- /dev/null +++ b/packages/addons/driver/xbmc-ps3remote/changelog.txt @@ -0,0 +1,2 @@ +1.0.0 +- initial version xbmc-ps3remote \ No newline at end of file diff --git a/packages/addons/driver/xbmc-ps3remote/icon/icon.png b/packages/addons/driver/xbmc-ps3remote/icon/icon.png new file mode 100644 index 0000000000..6da0cbd829 Binary files /dev/null and b/packages/addons/driver/xbmc-ps3remote/icon/icon.png differ diff --git a/packages/addons/driver/xbmc-ps3remote/meta b/packages/addons/driver/xbmc-ps3remote/meta new file mode 100644 index 0000000000..55a6acfafd --- /dev/null +++ b/packages/addons/driver/xbmc-ps3remote/meta @@ -0,0 +1,38 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="xbmc-ps3remote" +PKG_VERSION="1.0" +PKG_REV="0" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.xbmc.org" +PKG_URL="" +PKG_DEPENDS="PyBluez" +PKG_BUILD_DEPENDS="toolchain xbmc PyBluez" +PKG_PRIORITY="optional" +PKG_SECTION="driver/remote" +PKG_SHORTDESC="xbmc-ps3remote: a quick port of brandonj's PS3 remote script to use the event server for sending input events." +PKG_LONGDESC="xbmc-ps3remote is a quick port of brandonj's PS3 remote script to use the event server for sending input events." + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" + +PKG_AUTORECONF="no" diff --git a/packages/addons/driver/xbmc-ps3remote/source/bin/xbmc-ps3remote.service b/packages/addons/driver/xbmc-ps3remote/source/bin/xbmc-ps3remote.service new file mode 100755 index 0000000000..9a7c85484f --- /dev/null +++ b/packages/addons/driver/xbmc-ps3remote/source/bin/xbmc-ps3remote.service @@ -0,0 +1,43 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +# Addon settings + ADDON_DIR="$HOME/.xbmc/addons/driver.remote.xbmc-ps3remote" + ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.remote.xbmc-ps3remote" + PIXMAPS_DIR="$ADDON_DIR/pixmaps" + + export PYTHONPATH="$PYTHONPATH:$ADDON_DIR/pylib" + +################################################################################ +# setup ps3remote +################################################################################ + + if [ ! -f $ADDON_DIR/pylib/xbmc/defs.py ]; then + echo "ICON_PATH=\"$PIXMAPS_DIR\"" > $ADDON_DIR/pylib/xbmc/defs.py + fi + +################################################################################ +# start ps3remote +################################################################################ + + usleep 1000000 + python $ADDON_DIR/pylib/ps3_remote.py localhost 9777 & diff --git a/packages/addons/driver/xbmc-ps3remote/source/default.py b/packages/addons/driver/xbmc-ps3remote/source/default.py new file mode 100644 index 0000000000..b949ecbb00 --- /dev/null +++ b/packages/addons/driver/xbmc-ps3remote/source/default.py @@ -0,0 +1,23 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program 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, or (at your option) +# any later version. +# +# This Program 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 OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +import xbmc, time, os, subprocess + +os.system("xbmc-ps3remote.service")