From 9180af8c567f3fa43a1c59cc2fd8410719d24946 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 9 Oct 2010 16:57:02 +0200 Subject: [PATCH] new package: add initial package 'atvclient' Signed-off-by: Stephan Raue --- packages/sysutils/remote/atvclient/build | 14 +++++++++ .../remote/atvclient/init.d/34_atvclient | 31 +++++++++++++++++++ packages/sysutils/remote/atvclient/install | 6 ++++ packages/sysutils/remote/atvclient/meta | 14 +++++++++ .../atvclient-change_config_location-0.1.diff | 12 +++++++ packages/sysutils/remote/install | 1 + 6 files changed, 78 insertions(+) create mode 100755 packages/sysutils/remote/atvclient/build create mode 100755 packages/sysutils/remote/atvclient/init.d/34_atvclient create mode 100755 packages/sysutils/remote/atvclient/install create mode 100644 packages/sysutils/remote/atvclient/meta create mode 100644 packages/sysutils/remote/atvclient/patches/atvclient-change_config_location-0.1.diff diff --git a/packages/sysutils/remote/atvclient/build b/packages/sysutils/remote/atvclient/build new file mode 100755 index 0000000000..cf6d510702 --- /dev/null +++ b/packages/sysutils/remote/atvclient/build @@ -0,0 +1,14 @@ +#!/bin/sh + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sbindir=/usr/sbin \ + --exec-prefix=/usr \ + --localstatedir=/var \ + --sysconfdir=/etc \ + +make diff --git a/packages/sysutils/remote/atvclient/init.d/34_atvclient b/packages/sysutils/remote/atvclient/init.d/34_atvclient new file mode 100755 index 0000000000..3197109d10 --- /dev/null +++ b/packages/sysutils/remote/atvclient/init.d/34_atvclient @@ -0,0 +1,31 @@ +#!/bin/sh + +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.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 +################################################################################ + +# start the ATVclient daemon +# +# runlevels: openelec, textmode + +. /etc/profile + +progress "starting ATVclient" + mkdir -p /storage/.cache + atvclient -m > /dev/null 2>&1 \ No newline at end of file diff --git a/packages/sysutils/remote/atvclient/install b/packages/sysutils/remote/atvclient/install new file mode 100755 index 0000000000..803a8b88d0 --- /dev/null +++ b/packages/sysutils/remote/atvclient/install @@ -0,0 +1,6 @@ +#!/bin/sh + +. config/options $1 + +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/src/atvclient $INSTALL/usr/bin diff --git a/packages/sysutils/remote/atvclient/meta b/packages/sysutils/remote/atvclient/meta new file mode 100644 index 0000000000..2b9d6d7f96 --- /dev/null +++ b/packages/sysutils/remote/atvclient/meta @@ -0,0 +1,14 @@ +PKG_NAME="atvclient" +PKG_VERSION="0.1" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://github.com/Evinyatar/atvclient/wiki" +PKG_URL="http://sources.openelec.tv/svn/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libusb-compat" +PKG_BUILD_DEPENDS="toolchain libusb-compat" +PKG_PRIORITY="optional" +PKG_SECTION="system/remote" +PKG_SHORTDESC="atvclient: a background application for Linux that reads input from the AppleTV’s internal infra-red receiver" +PKG_LONGDESC="atvclient is a background application for Linux that reads input from the AppleTV’s internal infra-red receiver and submits it to XBMC in a way very similar to how XBMCHelper does this under the native AppleTV OS. It implements most of the functionality the ATV OS HID driver supports, including pairing and control of the status LED." +PKG_IS_ADDON="no" diff --git a/packages/sysutils/remote/atvclient/patches/atvclient-change_config_location-0.1.diff b/packages/sysutils/remote/atvclient/patches/atvclient-change_config_location-0.1.diff new file mode 100644 index 0000000000..439134eb76 --- /dev/null +++ b/packages/sysutils/remote/atvclient/patches/atvclient-change_config_location-0.1.diff @@ -0,0 +1,12 @@ +diff -Naur atvclient-0.1/src/atvclient.cpp atvclient-0.1.patch/src/atvclient.cpp +--- atvclient-0.1/src/atvclient.cpp 2010-10-09 15:44:27.000000000 +0200 ++++ atvclient-0.1.patch/src/atvclient.cpp 2010-10-09 16:01:29.774444638 +0200 +@@ -161,7 +161,7 @@ + static CPacketNOTIFICATION remote_unpaired("Remote unpaired", "You can now control XBMC with any Apple remote.", NULL, NULL); + static CPacketNOTIFICATION remote_pair_failed("Remote already paired", "This AppleTV was paired to another remote. To unpair, hold down menu and rewind for 6 seconds.", NULL, NULL); + +-const char* remoteIdFile = "/etc/atvremoteid"; ++const char* remoteIdFile = "/storage/.cache/atvremoteid"; + static int pairedRemoteId = 0; + + /* figure out kernel name corresponding to usb device */ diff --git a/packages/sysutils/remote/install b/packages/sysutils/remote/install index dfe7708a65..7d51260aa5 100755 --- a/packages/sysutils/remote/install +++ b/packages/sysutils/remote/install @@ -4,6 +4,7 @@ $SCRIPTS/install irserver $SCRIPTS/install eventlircd +[ "$ATVCLIENT_SUPPORT" ="yes" ] && $SCRIPTS/install atvclient mkdir -p $INSTALL/usr/config cp $PKG_DIR/config/*.conf $INSTALL/usr/config \ No newline at end of file