diff --git a/packages/addons/driver/xbmc-ps3d/addon b/packages/addons/driver/xbmc-ps3d/addon new file mode 100755 index 0000000000..5eb9caf3b8 --- /dev/null +++ b/packages/addons/driver/xbmc-ps3d/addon @@ -0,0 +1,34 @@ +#!/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 -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 $BUILD/xbmc-*/tools/EventClients/Clients/PS3\ Sixaxis\ Controller/ps3d.py $ADDON_BUILD/$PKG_ADDON_ID/pylib/xbmc + cp $BUILD/xbmc-*/tools/EventClients/Clients/PS3\ BD\ Remote/ps3_remote.py $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-ps3d/changelog.txt b/packages/addons/driver/xbmc-ps3d/changelog.txt new file mode 100644 index 0000000000..d5e0de95af --- /dev/null +++ b/packages/addons/driver/xbmc-ps3d/changelog.txt @@ -0,0 +1,2 @@ +1.0.0 +- initial version xbmc-ps3d diff --git a/packages/addons/driver/xbmc-ps3d/icon/icon.png b/packages/addons/driver/xbmc-ps3d/icon/icon.png new file mode 100644 index 0000000000..6da0cbd829 Binary files /dev/null and b/packages/addons/driver/xbmc-ps3d/icon/icon.png differ diff --git a/packages/mediacenter/xbmc/scripts/ps3remote_helper b/packages/addons/driver/xbmc-ps3d/meta old mode 100755 new mode 100644 similarity index 55% rename from packages/mediacenter/xbmc/scripts/ps3remote_helper rename to packages/addons/driver/xbmc-ps3d/meta index 84d8db2806..eaca409e4e --- a/packages/mediacenter/xbmc/scripts/ps3remote_helper +++ b/packages/addons/driver/xbmc-ps3d/meta @@ -1,8 +1,6 @@ -#!/bin/sh - ################################################################################ -# Copyright (C) 2009-2010 OpenELEC.tv -# http://www.openelec.tv +# 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 @@ -20,15 +18,21 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -case "${ACTION}" in - add) - if [ -f /usr/bin/xbmc-ps3remote ]; then - /usr/bin/xbmc-ps3remote localhost 9777 & - fi - ;; - remove) - killall xbmc-ps3remote - ;; -esac +PKG_NAME="xbmc-ps3d" +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-ps3d: a quick port of brandonj's PS3 remote script to use the event server for sending input events." +PKG_LONGDESC="xbmc-ps3d is a quick port of brandonj's PS3 remote script to use the event server for sending input events. This addon also supports the PS3 sixaxis controller." -exit 0 +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" + +PKG_AUTORECONF="no" diff --git a/packages/addons/driver/xbmc-ps3d/source/bin/ps3d.service b/packages/addons/driver/xbmc-ps3d/source/bin/ps3d.service new file mode 100755 index 0000000000..f22ce3314c --- /dev/null +++ b/packages/addons/driver/xbmc-ps3d/source/bin/ps3d.service @@ -0,0 +1,41 @@ +#!/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-ps3d" + ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.remote.xbmc-ps3d" + PIXMAPS_DIR="$ADDON_DIR/pixmaps" + + export PYTHONPATH="$PYTHONPATH:$ADDON_DIR/pylib" + +################################################################################ +# setup ps3d +################################################################################ + + if [ ! -f $ADDON_DIR/pylib/xbmc/defs.py ]; then + echo "ICON_PATH=\"$PIXMAPS_DIR\"" > $ADDON_DIR/pylib/xbmc/defs.py + fi + +################################################################################ +# start ps3d +################################################################################ + python $ADDON_DIR/pylib/xbmc/ps3d.py localhost & diff --git a/packages/mediacenter/xbmc/udev.d/98-ps3remote.rules b/packages/addons/driver/xbmc-ps3d/source/default.py similarity index 82% rename from packages/mediacenter/xbmc/udev.d/98-ps3remote.rules rename to packages/addons/driver/xbmc-ps3d/source/default.py index 913d47f406..f9b76c9cba 100644 --- a/packages/mediacenter/xbmc/udev.d/98-ps3remote.rules +++ b/packages/addons/driver/xbmc-ps3d/source/default.py @@ -18,10 +18,6 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -# only does something with "bluetooth" subsystem devices. -SUBSYSTEM!="bluetooth", GOTO="end" +import xbmc, time, os, subprocess -# Start PS3 Remote support if bluetooth is starting -ACTION=="add|remove", RUN+="/lib/udev/ps3remote_helper" - -LABEL="end" +os.system("ps3d.service") diff --git a/packages/mediacenter/xbmc/install b/packages/mediacenter/xbmc/install index a5a2669182..8faf221ae7 100755 --- a/packages/mediacenter/xbmc/install +++ b/packages/mediacenter/xbmc/install @@ -106,14 +106,3 @@ if [ "$WIIMOTE_SUPPORT" = yes ]; then mkdir -p $INSTALL/lib/udev cp $PKG_DIR/scripts/wiiremote_helper $INSTALL/lib/udev fi - -if [ "$PS3REMOTE_SUPPORT" = yes ]; then - mkdir -p $INSTALL/usr/bin - cp $PKG_BUILD/tools/EventClients/Clients/PS3\ BD\ Remote/ps3_remote.py $INSTALL/usr/bin/xbmc-ps3remote - mkdir -p $INSTALL/usr/share/pixmaps/xbmc - cp $PKG_BUILD/tools/EventClients/icons/bluetooth.png $INSTALL/usr/share/pixmaps/xbmc - mkdir -p $PYTHON_LIBDIR/site-packages/xbmc - echo 'ICON_PATH="/usr/share/pixmaps/xbmc/"' > $PYTHON_LIBDIR/site-packages/xbmc/defs.py - mkdir -p $INSTALL/lib/udev - cp $PKG_DIR/scripts/ps3remote_helper $INSTALL/lib/udev -fi diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index bfa8f035bb..51a1c97830 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -122,10 +122,6 @@ if [ "$WIIMOTE_SUPPORT" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS wiiuse" fi -if [ "$PS3REMOTE_SUPPORT" = yes ]; then - PKG_DEPENDS="$PKG_DEPENDS PyBluez" -fi - # some python stuff needed for various addons PKG_DEPENDS="$PKG_DEPENDS Imaging" PKG_DEPENDS="$PKG_DEPENDS simplejson" diff --git a/packages/mediacenter/xbmc/patches/xbmc-cfa1a05-453-ps3_remote_be_more_quiet-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-cfa1a05-453-ps3_remote_be_more_quiet-0.1.patch deleted file mode 100644 index 6b2f879e1c..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-cfa1a05-453-ps3_remote_be_more_quiet-0.1.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Naur xbmc-pvr-3513480/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py xbmc-pvr-3513480.patch/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py ---- xbmc-pvr-3513480/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py 2011-04-25 02:36:33.000000000 +0200 -+++ xbmc-pvr-3513480.patch/tools/EventClients/Clients/PS3 BD Remote/ps3_remote.py 2011-04-25 05:30:03.870260596 +0200 -@@ -59,9 +59,6 @@ - target_connected = False - target_address = None - while target_connected is False: -- xbmc.send_notification("Action Required!", -- "Hold Start+Enter on your remote.", -- bticon) - print "Searching for %s" % target_name - print "(Hold Start + Enter on remote to make it discoverable)" - time.sleep(2) -@@ -72,7 +69,6 @@ - except Exception, e: - print "Error performing bluetooth discovery" - print str(e) -- xbmc.send_notification("Error", "Unable to find devices.", bticon) - time.sleep(5) - continue - -@@ -109,7 +105,6 @@ - print "ERROR - Could Not Connect. Trying again..." - time.sleep(2) - else: -- xbmc.send_notification("Error", "No remotes were found.", bticon) - print "Could not find BD Remote Control. Trying again..." - time.sleep(2) - return (remote,target_address) diff --git a/projects/ATV/options b/projects/ATV/options index 356c0d0a15..387fa3a69c 100644 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -226,9 +226,6 @@ # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="no" -# build and install PS3 Remote support (yes / no) - PS3REMOTE_SUPPORT="no" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="yes" diff --git a/projects/Fusion/options b/projects/Fusion/options index 50213e6851..7198c4c410 100644 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -226,9 +226,6 @@ # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" -# build and install PS3 Remote support (yes / no) - PS3REMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no" diff --git a/projects/Generic/options b/projects/Generic/options index ac6706b759..b5be8a50b8 100644 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -226,9 +226,6 @@ # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" -# build and install PS3 Remote support (yes / no) - PS3REMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="yes" diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index 0c6729e199..02c87b30f2 100644 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -226,9 +226,6 @@ # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" -# build and install PS3 Remote support (yes / no) - PS3REMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="yes" diff --git a/projects/ION/options b/projects/ION/options index 9fccc22ce9..7cbcf5ca88 100644 --- a/projects/ION/options +++ b/projects/ION/options @@ -226,9 +226,6 @@ # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" -# build and install PS3 Remote support (yes / no) - PS3REMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no" diff --git a/projects/Intel/options b/projects/Intel/options index 39e9968305..b9d7391c72 100644 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -226,9 +226,6 @@ # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" -# build and install PS3 Remote support (yes / no) - PS3REMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no" diff --git a/projects/Ultra/options b/projects/Ultra/options index cda0647908..3d8a84726c 100644 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -226,9 +226,6 @@ # build and install WiiMote support (yes / no) WIIMOTE_SUPPORT="yes" -# build and install PS3 Remote support (yes / no) - PS3REMOTE_SUPPORT="yes" - # build and install ATV IR remote support (yes / no) ATVCLIENT_SUPPORT="no"