diff --git a/packages/addons/service/multimedia/boblightd/addon b/packages/addons/service/multimedia/boblightd/addon new file mode 100755 index 0000000000..703beafc6f --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/addon @@ -0,0 +1,36 @@ +#!/bin/sh + +################################################################################ +# 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) +# 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/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 new file mode 100755 index 0000000000..ba6ff9d49c --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/build @@ -0,0 +1,39 @@ +#!/bin/sh + +################################################################################ +# 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) +# 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..98f124e4dc --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/changelog.txt @@ -0,0 +1,5 @@ +2.0.2 +- Renamed to boblightd to avoid conflicts + +2.0.1 +- 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 0000000000..38a84de135 Binary files /dev/null and b/packages/addons/service/multimedia/boblightd/icon/icon.png differ diff --git a/packages/addons/service/multimedia/boblightd/meta b/packages/addons/service/multimedia/boblightd/meta new file mode 100644 index 0000000000..01c8348641 --- /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.2" +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.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.\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" + +PKG_AUTORECONF="no" 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 new file mode 100755 index 0000000000..520bfb2597 --- /dev/null +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblightd @@ -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" 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 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__) 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