From c3d7c50fde7ebb6379c27e38263f4e0a26ce105c Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Thu, 29 Dec 2011 11:38:44 -0500 Subject: [PATCH 1/3] Boblightd service. After installation, it can be configured in /storage/.config using sample files. --- .../addons/service/multimedia/boblightd/addon | 34 +++ .../addons/service/multimedia/boblightd/build | 37 +++ .../multimedia/boblightd/changelog.txt | 5 + .../boblightd/config/boblight.X11.sample | 1 + .../boblightd/config/boblight.conf.sample | 231 ++++++++++++++++++ .../multimedia/boblightd/icon/icon.png | Bin 0 -> 3694 bytes .../addons/service/multimedia/boblightd/meta | 38 +++ .../boblightd/source/bin/boblightd.service | 60 +++++ .../multimedia/boblightd/source/default.py | 32 +++ 9 files changed, 438 insertions(+) create mode 100755 packages/addons/service/multimedia/boblightd/addon create mode 100755 packages/addons/service/multimedia/boblightd/build create mode 100644 packages/addons/service/multimedia/boblightd/changelog.txt create mode 100644 packages/addons/service/multimedia/boblightd/config/boblight.X11.sample create mode 100644 packages/addons/service/multimedia/boblightd/config/boblight.conf.sample create mode 100644 packages/addons/service/multimedia/boblightd/icon/icon.png create mode 100644 packages/addons/service/multimedia/boblightd/meta create mode 100755 packages/addons/service/multimedia/boblightd/source/bin/boblightd.service create mode 100644 packages/addons/service/multimedia/boblightd/source/default.py diff --git a/packages/addons/service/multimedia/boblightd/addon b/packages/addons/service/multimedia/boblightd/addon new file mode 100755 index 0000000000..7da1cc012e --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/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/lib + cp -P $PKG_BUILD/src/.libs/libboblight.so* $ADDON_BUILD/$PKG_ADDON_ID/lib + +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin + cp -P $PKG_BUILD/src/boblightd $ADDON_BUILD/$PKG_ADDON_ID/bin + cp -P $PKG_BUILD/src/boblight-constant $ADDON_BUILD/$PKG_ADDON_ID/bin + cp -P $PKG_BUILD/src/boblight-X11 $ADDON_BUILD/$PKG_ADDON_ID/bin + +mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config + cp -R $PKG_DIR/config/*.sample $ADDON_BUILD/$PKG_ADDON_ID/config diff --git a/packages/addons/service/multimedia/boblightd/build b/packages/addons/service/multimedia/boblightd/build new file mode 100755 index 0000000000..e063e04e0d --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/build @@ -0,0 +1,37 @@ +#!/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 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --enable-shared \ + --disable-static \ + --without-portaudio \ + --without-ffmpeg \ + --disable-documentation + +make + +$MAKEINSTALL diff --git a/packages/addons/service/multimedia/boblightd/changelog.txt b/packages/addons/service/multimedia/boblightd/changelog.txt new file mode 100644 index 0000000000..35a6cd3f15 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/changelog.txt @@ -0,0 +1,5 @@ +2.0.401 +- Renamed to boblightd to avoid conflicts + +2.0.400 +- initial version boblight diff --git a/packages/addons/service/multimedia/boblightd/config/boblight.X11.sample b/packages/addons/service/multimedia/boblightd/config/boblight.X11.sample new file mode 100644 index 0000000000..42aaa47345 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/config/boblight.X11.sample @@ -0,0 +1 @@ +# Nothing needed in this file, just rename to boblight.X11 if not using XBMC addon diff --git a/packages/addons/service/multimedia/boblightd/config/boblight.conf.sample b/packages/addons/service/multimedia/boblightd/config/boblight.conf.sample new file mode 100644 index 0000000000..16c628de9e --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/config/boblight.conf.sample @@ -0,0 +1,231 @@ +#config file for adalight from http://www.ladyada.net/make/adalight/ + +[global] +interface 127.0.0.1 +port 19333 + +[device] +name device1 +type momo +output /dev/ttyACM0 +channels 75 +prefix 41 64 61 00 18 4D +interval 10000 +rate 115200 +debug off #turn this on to see what it's doing with the serial port +delayafteropen 1000000 + + +[color] +name red +rgb FF0000 + +[color] +name green +rgb 00FF00 + +[color] +name blue +rgb 0000FF + +[light] +name light1 +color red device1 1 +color green device1 2 +color blue device1 3 +hscan 33.33 44.44 +vscan 83.33 100 + +[light] +name light2 +color red device1 4 +color green device1 5 +color blue device1 6 +hscan 22.22 33.33 +vscan 83.33 100 + +[light] +name light3 +color red device1 7 +color green device1 8 +color blue device1 9 +hscan 11.11 22.22 +vscan 83.33 100 + +[light] +name light4 +color red device1 10 +color green device1 11 +color blue device1 12 +hscan 0 11.11 +vscan 83.33 100 + +[light] +name light5 +color red device1 13 +color green device1 14 +color blue device1 15 +hscan 0 11.11 +vscan 66.67 83.33 + +[light] +name light6 +color red device1 16 +color green device1 17 +color blue device1 18 +hscan 0 11.11 +vscan 50 66.67 + +[light] +name light7 +color red device1 19 +color green device1 20 +color blue device1 21 +hscan 0 11.11 +vscan 33.33 50 + +[light] +name light8 +color red device1 22 +color green device1 23 +color blue device1 24 +hscan 0 11.11 +vscan 16.67 33.33 + +[light] +name light9 +color red device1 25 +color green device1 26 +color blue device1 27 +hscan 0 11.11 +vscan 0 16.67 + +[light] +name light10 +color red device1 28 +color green device1 29 +color blue device1 30 +hscan 11.11 22.22 +vscan 0 16.67 + +[light] +name light11 +color red device1 31 +color green device1 32 +color blue device1 33 +hscan 22.22 33.33 +vscan 0 16.67 + +[light] +name light12 +color red device1 34 +color green device1 35 +color blue device1 36 +hscan 33.33 44.44 +vscan 0 16.67 + +[light] +name light13 +color red device1 37 +color green device1 38 +color blue device1 39 +hscan 44.44 55.56 +vscan 0 16.67 + +[light] +name light14 +color red device1 40 +color green device1 41 +color blue device1 42 +hscan 55.56 66.67 +vscan 0 16.67 + +[light] +name light15 +color red device1 43 +color green device1 44 +color blue device1 45 +hscan 66.67 77.78 +vscan 0 16.67 + +[light] +name light16 +color red device1 46 +color green device1 47 +color blue device1 48 +hscan 77.78 88.89 +vscan 0 16.67 + +[light] +name light17 +color red device1 49 +color green device1 50 +color blue device1 51 +hscan 88.89 100 +vscan 0 16.67 + +[light] +name light18 +color red device1 52 +color green device1 53 +color blue device1 54 +hscan 88.89 100 +vscan 16.67 33.33 + +[light] +name light19 +color red device1 55 +color green device1 56 +color blue device1 57 +hscan 88.89 100 +vscan 33.33 50 + +[light] +name light20 +color red device1 58 +color green device1 59 +color blue device1 60 +hscan 88.89 100 +vscan 50 66.67 + +[light] +name light21 +color red device1 61 +color green device1 62 +color blue device1 63 +hscan 88.89 100 +vscan 66.67 83.33 + +[light] +name light22 +color red device1 64 +color green device1 65 +color blue device1 66 +hscan 88.89 100 +vscan 83.33 100 + +[light] +name light23 +color red device1 67 +color green device1 68 +color blue device1 69 +hscan 77.78 88.89 +vscan 83.33 100 + +[light] +name light24 +color red device1 70 +color green device1 71 +color blue device1 72 +hscan 66.67 77.78 +vscan 83.33 100 + +[light] +name light25 +color red device1 73 +color green device1 74 +color blue device1 75 +hscan 55.56 66.67 +vscan 83.33 100 + + diff --git a/packages/addons/service/multimedia/boblightd/icon/icon.png b/packages/addons/service/multimedia/boblightd/icon/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..38a84de135d6d6caaa68c6559c8f14d19381bb8b GIT binary patch literal 3694 zcma)9c|6qJ_rGK8>x68fF(p$OGlndaWo%gz(j-X?W5})wcxt{(w_9uB~7 zri=a^06z=>vqS)JX#j}&WYwM3U~aHGo;K8HTBdC3)!$$mE+3GI~Df@zj*QxMI* z+NP24_=A~s>UjtG-6+LWt4*6M(dwganN8MpM-X3C5hjao82QvqyJq)pnzx_d+Avdi zip+EESiz+RUtiy!?tv>Y1*$ zZ@*TpG~0=h)cohgx^pyR+^VnZjy`|Lz8~?jez7UWu56>65omAHXvbLX(H3a8mgNAj zk*K-4nYGW2fmi1T6$y{etHnV_YN*wOV-F1*ZBkPn*EJ`Mp^i;!TqrlcGOCh649idet80EL!=@pGn4k9))-cwC>6Lw80XvFwBjr@=3Z=WU2)atRY}V9jt-Q>j!{G9@;boUgE0E|5G609GFm~d#z};nI zjfu>&NGA`-i_0cu6uoj94wkyY#p&dc5V)kiRL0M^Zv8+%1wyIVIw2w(Z6vO*fuvQH zu%Bb;%y3TZaJnx$?%0dmi4to`tYOi1v=FP96%whJJeyn9mhAcsAf17XaGv;lZgf>D zw-@$cVvbNTh5b|qU+N33w@zYE1h}KXPz~7&KXYw9IGFy~`nC9s7I+drZhO@J0X+{LriOaTqZJESHnmgafe3Q&UB#L$2=YU818p@s1nmVj_m0TFWp0L~SvHPby z3C^-`J$(Pfw899+mz?sg1fki> zab9Vh9iUw>$w8h?hvOwOiNMZ+7e3jVWwrlI@$_Gbp>sbdJ(*YHC4Y=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Z|G|Kf)^xtJHs+M#zA;8$cOutl@ G81^5l4Tqcn literal 0 HcmV?d00001 diff --git a/packages/addons/service/multimedia/boblightd/meta b/packages/addons/service/multimedia/boblightd/meta new file mode 100644 index 0000000000..48177d4701 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/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="boblightd" +PKG_VERSION="2.0.401" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://code.google.com/p/boblight" +PKG_URL="http://dl.dropbox.com/u/10051534/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="libX11 libXext libX11 libXrender $MESA" +PKG_BUILD_DEPENDS="toolchain libX11 libXext libXrender $MESA" +PKG_PRIORITY="optional" +PKG_SECTION="service/multimedia" +PKG_SHORTDESC="boblightd: an ambilight controller." +PKG_LONGDESC="Boblight's main purpose is to create light effects from an external input, such as a video stream." + +PKG_IS_ADDON="yes" +PKG_ADDON_TYPE="xbmc.service" + +PKG_AUTORECONF="no" diff --git a/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service b/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service new file mode 100755 index 0000000000..42280cb732 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service @@ -0,0 +1,60 @@ +#!/bin/bash + +################################################################################ +# 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 +################################################################################ + +. /etc/profile + +ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.boblightd" +ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.multimedia.boblightd" + +mkdir -p $ADDON_HOME + +LOG_FILE="$ADDON_HOME/service.log" + +# Boblight config file created by user +BOBLIGHT_CONFIG="/storage/.config/boblight.conf" + +# Flag file to start boblight-x11 daemon +BOBLIGHT_X11="/storage/.config/boblight.X11" + +export LD_LIBRARY_PATH="$ADDON_DIR/lib" + +cp -R $ADDON_DIR/config/*.sample /storage/.config/ > $LOG_FILE 2>&1 + +if [ -e $BOBLIGHT_CONFIG ]; then + + # Make sure the xserver has started up + wait_for_xorg + + # Start the boblight daemon + $ADDON_DIR/bin/boblightd -c $BOBLIGHT_CONFIG -f >> $LOG_FILE 2>&1 + +fi + +if [ -e $BOBLIGHT_X11 ]; then + + # Make sure the xserver has started up + wait_for_xorg + + # Start the boblight daemon + $ADDON_DIR/bin/boblight-X11 -f >> $LOG_FILE 2>&1 + +fi diff --git a/packages/addons/service/multimedia/boblightd/source/default.py b/packages/addons/service/multimedia/boblightd/source/default.py new file mode 100644 index 0000000000..4ec88185a9 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/source/default.py @@ -0,0 +1,32 @@ +################################################################################ +# 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 os +import sys +import xbmcaddon + +__scriptname__ = "Boblightd" +__author__ = "OpenELEC" +__url__ = "http://www.openelec.tv" +__settings__ = xbmcaddon.Addon(id='service.multimedia.boblightd') +__cwd__ = __settings__.getAddonInfo('path') +__path__ = xbmc.translatePath( os.path.join( __cwd__, 'bin', "boblightd.service") ) + +os.system(__path__) From bfffa4993aa63dedce7be4232aae8d38221674d4 Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Thu, 29 Dec 2011 16:55:20 -0500 Subject: [PATCH 2/3] Code cleanup to match Openelc conventions. --- packages/addons/service/multimedia/boblightd/addon | 8 +++++--- packages/addons/service/multimedia/boblightd/build | 2 ++ .../service/multimedia/boblightd/changelog.txt | 4 ++-- packages/addons/service/multimedia/boblightd/meta | 4 ++-- .../source/bin/{boblightd.service => boblightd} | 14 ++++++++------ .../service/multimedia/boblightd/source/default.py | 2 +- 6 files changed, 20 insertions(+), 14 deletions(-) rename packages/addons/service/multimedia/boblightd/source/bin/{boblightd.service => boblightd} (75%) diff --git a/packages/addons/service/multimedia/boblightd/addon b/packages/addons/service/multimedia/boblightd/addon index 7da1cc012e..703beafc6f 100755 --- a/packages/addons/service/multimedia/boblightd/addon +++ b/packages/addons/service/multimedia/boblightd/addon @@ -4,6 +4,8 @@ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) # +# Boblightd addon maintained by Adam Boeglin: adamrb@gmail.com +# # 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) @@ -26,9 +28,9 @@ mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib cp -P $PKG_BUILD/src/.libs/libboblight.so* $ADDON_BUILD/$PKG_ADDON_ID/lib mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin - cp -P $PKG_BUILD/src/boblightd $ADDON_BUILD/$PKG_ADDON_ID/bin - cp -P $PKG_BUILD/src/boblight-constant $ADDON_BUILD/$PKG_ADDON_ID/bin - cp -P $PKG_BUILD/src/boblight-X11 $ADDON_BUILD/$PKG_ADDON_ID/bin + cp -P $PKG_BUILD/src/boblightd $ADDON_BUILD/$PKG_ADDON_ID/bin/boblightd.bin + cp -P $PKG_BUILD/src/boblight-constant $ADDON_BUILD/$PKG_ADDON_ID/bin/boblight-constant.bin + cp -P $PKG_BUILD/src/boblight-X11 $ADDON_BUILD/$PKG_ADDON_ID/bin/boblight-X11.bin mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config cp -R $PKG_DIR/config/*.sample $ADDON_BUILD/$PKG_ADDON_ID/config diff --git a/packages/addons/service/multimedia/boblightd/build b/packages/addons/service/multimedia/boblightd/build index e063e04e0d..ba6ff9d49c 100755 --- a/packages/addons/service/multimedia/boblightd/build +++ b/packages/addons/service/multimedia/boblightd/build @@ -4,6 +4,8 @@ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) # +# Boblightd addon maintained by Adam Boeglin: adamrb@gmail.com +# # 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) diff --git a/packages/addons/service/multimedia/boblightd/changelog.txt b/packages/addons/service/multimedia/boblightd/changelog.txt index 35a6cd3f15..98f124e4dc 100644 --- a/packages/addons/service/multimedia/boblightd/changelog.txt +++ b/packages/addons/service/multimedia/boblightd/changelog.txt @@ -1,5 +1,5 @@ -2.0.401 +2.0.2 - Renamed to boblightd to avoid conflicts -2.0.400 +2.0.1 - initial version boblight diff --git a/packages/addons/service/multimedia/boblightd/meta b/packages/addons/service/multimedia/boblightd/meta index 48177d4701..be05ca82c3 100644 --- a/packages/addons/service/multimedia/boblightd/meta +++ b/packages/addons/service/multimedia/boblightd/meta @@ -19,8 +19,8 @@ ################################################################################ PKG_NAME="boblightd" -PKG_VERSION="2.0.401" -PKG_REV="1" +PKG_VERSION="2.0.2" +PKG_REV="2" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://code.google.com/p/boblight" diff --git a/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service b/packages/addons/service/multimedia/boblightd/source/bin/boblightd similarity index 75% rename from packages/addons/service/multimedia/boblightd/source/bin/boblightd.service rename to packages/addons/service/multimedia/boblightd/source/bin/boblightd index 42280cb732..021ab69851 100755 --- a/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblightd @@ -4,6 +4,8 @@ # Copyright (C) 2009-2010 OpenELEC.tv # http://www.openelec.tv # +# Boblightd addon maintained by Adam Boeglin: adamrb@gmail.com +# # 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) @@ -30,14 +32,14 @@ mkdir -p $ADDON_HOME LOG_FILE="$ADDON_HOME/service.log" # Boblight config file created by user -BOBLIGHT_CONFIG="/storage/.config/boblight.conf" +BOBLIGHT_CONFIG="$ADDON_HOME/boblight.conf" # Flag file to start boblight-x11 daemon -BOBLIGHT_X11="/storage/.config/boblight.X11" +BOBLIGHT_X11="$ADDON_HOME/boblight.X11" -export LD_LIBRARY_PATH="$ADDON_DIR/lib" +export LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" -cp -R $ADDON_DIR/config/*.sample /storage/.config/ > $LOG_FILE 2>&1 +cp -R $ADDON_DIR/config/*.sample $ADDON_HOME > $LOG_FILE 2>&1 if [ -e $BOBLIGHT_CONFIG ]; then @@ -45,7 +47,7 @@ if [ -e $BOBLIGHT_CONFIG ]; then wait_for_xorg # Start the boblight daemon - $ADDON_DIR/bin/boblightd -c $BOBLIGHT_CONFIG -f >> $LOG_FILE 2>&1 + LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" $ADDON_DIR/bin/boblightd.bin -c $BOBLIGHT_CONFIG -f $@ >> $LOG_FILE 2>&1 fi @@ -55,6 +57,6 @@ if [ -e $BOBLIGHT_X11 ]; then wait_for_xorg # Start the boblight daemon - $ADDON_DIR/bin/boblight-X11 -f >> $LOG_FILE 2>&1 + LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" $ADDON_DIR/bin/boblight-X11.bin -f $@ >> $LOG_FILE 2>&1 fi diff --git a/packages/addons/service/multimedia/boblightd/source/default.py b/packages/addons/service/multimedia/boblightd/source/default.py index 4ec88185a9..50b4fbe1c5 100644 --- a/packages/addons/service/multimedia/boblightd/source/default.py +++ b/packages/addons/service/multimedia/boblightd/source/default.py @@ -27,6 +27,6 @@ __author__ = "OpenELEC" __url__ = "http://www.openelec.tv" __settings__ = xbmcaddon.Addon(id='service.multimedia.boblightd') __cwd__ = __settings__.getAddonInfo('path') -__path__ = xbmc.translatePath( os.path.join( __cwd__, 'bin', "boblightd.service") ) +__path__ = xbmc.translatePath( os.path.join( __cwd__, 'bin', "boblightd") ) os.system(__path__) From a61026cbcd351d07b1433859901cec94ab2743cf Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Thu, 29 Dec 2011 19:43:31 -0500 Subject: [PATCH 3/3] Updated metadata, added unpack file to make versioning easier. Added scripts so boblight binaries can be called directly. --- .../addons/service/multimedia/boblightd/meta | 4 +- .../boblightd/source/bin/boblight-X11 | 29 +++++++++ .../boblightd/source/bin/boblight-constant | 29 +++++++++ .../multimedia/boblightd/source/bin/boblightd | 43 ++----------- .../boblightd/source/bin/boblightd.service | 62 +++++++++++++++++++ .../multimedia/boblightd/source/default.py | 2 +- .../service/multimedia/boblightd/unpack | 27 ++++++++ 7 files changed, 155 insertions(+), 41 deletions(-) create mode 100755 packages/addons/service/multimedia/boblightd/source/bin/boblight-X11 create mode 100755 packages/addons/service/multimedia/boblightd/source/bin/boblight-constant create mode 100755 packages/addons/service/multimedia/boblightd/source/bin/boblightd.service create mode 100755 packages/addons/service/multimedia/boblightd/unpack diff --git a/packages/addons/service/multimedia/boblightd/meta b/packages/addons/service/multimedia/boblightd/meta index be05ca82c3..01c8348641 100644 --- a/packages/addons/service/multimedia/boblightd/meta +++ b/packages/addons/service/multimedia/boblightd/meta @@ -24,13 +24,13 @@ PKG_REV="2" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://code.google.com/p/boblight" -PKG_URL="http://dl.dropbox.com/u/10051534/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_URL="http://dl.dropbox.com/u/10051534/$PKG_NAME.tar.gz" PKG_DEPENDS="libX11 libXext libX11 libXrender $MESA" PKG_BUILD_DEPENDS="toolchain libX11 libXext libXrender $MESA" PKG_PRIORITY="optional" PKG_SECTION="service/multimedia" PKG_SHORTDESC="boblightd: an ambilight controller." -PKG_LONGDESC="Boblight's main purpose is to create light effects from an external input, such as a video stream." +PKG_LONGDESC="Boblight's main purpose is to create light effects from an external input, such as a video stream.\n\nSee this thread on the Openelec forums for howto and demonstration: http://bit.ly/oe-boblight" PKG_IS_ADDON="yes" PKG_ADDON_TYPE="xbmc.service" diff --git a/packages/addons/service/multimedia/boblightd/source/bin/boblight-X11 b/packages/addons/service/multimedia/boblightd/source/bin/boblight-X11 new file mode 100755 index 0000000000..274c528f99 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblight-X11 @@ -0,0 +1,29 @@ +#!/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 +################################################################################ + +. /etc/profile + +ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.boblightd" + +chmod +x $ADDON_DIR/lib/* + +LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" boblight-X11.bin $@ diff --git a/packages/addons/service/multimedia/boblightd/source/bin/boblight-constant b/packages/addons/service/multimedia/boblightd/source/bin/boblight-constant new file mode 100755 index 0000000000..3947666be0 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblight-constant @@ -0,0 +1,29 @@ +#!/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 +################################################################################ + +. /etc/profile + +ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.boblightd" + +chmod +x $ADDON_DIR/lib/* + +LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" boblight-constant.bin $@ diff --git a/packages/addons/service/multimedia/boblightd/source/bin/boblightd b/packages/addons/service/multimedia/boblightd/source/bin/boblightd index 021ab69851..520bfb2597 100755 --- a/packages/addons/service/multimedia/boblightd/source/bin/boblightd +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblightd @@ -1,10 +1,8 @@ -#!/bin/bash +#!/bin/sh ################################################################################ -# Copyright (C) 2009-2010 OpenELEC.tv -# http://www.openelec.tv -# -# Boblightd addon maintained by Adam Boeglin: adamrb@gmail.com +# 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 @@ -25,38 +23,7 @@ . /etc/profile ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.boblightd" -ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.multimedia.boblightd" -mkdir -p $ADDON_HOME +chmod +x $ADDON_DIR/lib/* -LOG_FILE="$ADDON_HOME/service.log" - -# Boblight config file created by user -BOBLIGHT_CONFIG="$ADDON_HOME/boblight.conf" - -# Flag file to start boblight-x11 daemon -BOBLIGHT_X11="$ADDON_HOME/boblight.X11" - -export LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" - -cp -R $ADDON_DIR/config/*.sample $ADDON_HOME > $LOG_FILE 2>&1 - -if [ -e $BOBLIGHT_CONFIG ]; then - - # Make sure the xserver has started up - wait_for_xorg - - # Start the boblight daemon - LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" $ADDON_DIR/bin/boblightd.bin -c $BOBLIGHT_CONFIG -f $@ >> $LOG_FILE 2>&1 - -fi - -if [ -e $BOBLIGHT_X11 ]; then - - # Make sure the xserver has started up - wait_for_xorg - - # Start the boblight daemon - LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" $ADDON_DIR/bin/boblight-X11.bin -f $@ >> $LOG_FILE 2>&1 - -fi +LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" boblightd.bin $@ diff --git a/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service b/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service new file mode 100755 index 0000000000..236c8d0744 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service @@ -0,0 +1,62 @@ +#!/bin/bash + +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.openelec.tv +# +# Boblightd addon maintained by Adam Boeglin: adamrb@gmail.com +# +# 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 +################################################################################ + +. /etc/profile + +ADDON_DIR="$HOME/.xbmc/addons/service.multimedia.boblightd" +ADDON_HOME="$HOME/.xbmc/userdata/addon_data/service.multimedia.boblightd" + +mkdir -p $ADDON_HOME + +LOG_FILE="$ADDON_HOME/service.log" + +# Boblight config file created by user +BOBLIGHT_CONFIG="$ADDON_HOME/boblight.conf" + +# Flag file to start boblight-x11 daemon +BOBLIGHT_X11="$ADDON_HOME/boblight.X11" + +export LD_LIBRARY_PATH="$ADDON_DIR/lib:$LD_LIBRARY_PATH" + +cp -R $ADDON_DIR/config/*.sample $ADDON_HOME > $LOG_FILE 2>&1 + +if [ -e $BOBLIGHT_CONFIG ]; then + + # Make sure the xserver has started up + wait_for_xorg + + # Start the boblight daemon + $ADDON_DIR/bin/boblightd -c $BOBLIGHT_CONFIG -f >> $LOG_FILE 2>&1 + +fi + +if [ -e $BOBLIGHT_X11 ]; then + + # Make sure the xserver has started up + wait_for_xorg + + # Start the boblight daemon + $ADDON_DIR/bin/boblight-X11 -f >> $LOG_FILE 2>&1 + +fi diff --git a/packages/addons/service/multimedia/boblightd/source/default.py b/packages/addons/service/multimedia/boblightd/source/default.py index 50b4fbe1c5..4ec88185a9 100644 --- a/packages/addons/service/multimedia/boblightd/source/default.py +++ b/packages/addons/service/multimedia/boblightd/source/default.py @@ -27,6 +27,6 @@ __author__ = "OpenELEC" __url__ = "http://www.openelec.tv" __settings__ = xbmcaddon.Addon(id='service.multimedia.boblightd') __cwd__ = __settings__.getAddonInfo('path') -__path__ = xbmc.translatePath( os.path.join( __cwd__, 'bin', "boblightd") ) +__path__ = xbmc.translatePath( os.path.join( __cwd__, 'bin', "boblightd.service") ) os.system(__path__) diff --git a/packages/addons/service/multimedia/boblightd/unpack b/packages/addons/service/multimedia/boblightd/unpack new file mode 100755 index 0000000000..f299ac3901 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/unpack @@ -0,0 +1,27 @@ +#!/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 + +[ -d $PKG_BUILD ] && rm -rf $PKG_BUILD + +mv $BUILD/${PKG_NAME} $BUILD/$PKG_NAME-$PKG_VERSION