From f83f5e14fab7a06a31bb430bff363c36e1c7fa91 Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Fri, 30 Dec 2011 10:19:58 -0500 Subject: [PATCH 1/5] Addon library paths added to LD_LIBRARY_PATH so they need not be defined in every script. --- packages/mediacenter/xbmc-pvr/init.d/93_xbmc | 3 ++ packages/mediacenter/xbmc/init.d/93_xbmc | 3 ++ .../busybox/profile.d/librarypath.conf | 33 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 packages/sysutils/busybox/profile.d/librarypath.conf diff --git a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc index c50c56068e..9f4c1e8586 100644 --- a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc +++ b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc @@ -36,6 +36,9 @@ fi # hack: make addon-bins executable chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 +# hack: make addon-libs executable + chmod +x /storage/.xbmc/addons/*/lib/* > /dev/null 2>&1 + # hack to support user installed fonts SUBFONTS="/storage/.xbmc/userdata/fonts" if [ -d "$SUBFONTS" ]; then diff --git a/packages/mediacenter/xbmc/init.d/93_xbmc b/packages/mediacenter/xbmc/init.d/93_xbmc index 6863ca604f..c7f1ed57b5 100644 --- a/packages/mediacenter/xbmc/init.d/93_xbmc +++ b/packages/mediacenter/xbmc/init.d/93_xbmc @@ -36,6 +36,9 @@ fi # hack: make addon-bins executable chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 +# hack: make addon-libs executable + chmod +x /storage/.xbmc/addons/*/lib/* > /dev/null 2>&1 + # hack to support user installed fonts SUBFONTS="/storage/.xbmc/userdata/fonts" if [ -d "$SUBFONTS" ]; then diff --git a/packages/sysutils/busybox/profile.d/librarypath.conf b/packages/sysutils/busybox/profile.d/librarypath.conf new file mode 100644 index 0000000000..1bf913b61a --- /dev/null +++ b/packages/sysutils/busybox/profile.d/librarypath.conf @@ -0,0 +1,33 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# Added 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 +################################################################################ +# Core (PATH) environment variables. +# +# This file contains non-OpenELEC evironment variables as well as OpenELEC +# evironment variables that are not user defined. +################################################################################ + +# hack: add addons to $PATH + for i in `find /storage/.xbmc/addons/* -name lib -type d`; do + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$i" + done + +export LD_LIBRARY_PATH From 42ce6908b219767ac454de6cf2aa851ceef6260c Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Fri, 30 Dec 2011 10:30:06 -0500 Subject: [PATCH 2/5] Add the system library path so they're always found first. --- packages/sysutils/busybox/profile.d/librarypath.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/sysutils/busybox/profile.d/librarypath.conf b/packages/sysutils/busybox/profile.d/librarypath.conf index 1bf913b61a..42ecd91881 100644 --- a/packages/sysutils/busybox/profile.d/librarypath.conf +++ b/packages/sysutils/busybox/profile.d/librarypath.conf @@ -25,7 +25,9 @@ # evironment variables that are not user defined. ################################################################################ -# hack: add addons to $PATH +LD_LIBRARY_PATH="/usr/lib:/lib" + +# hack: add addons to $LD_LIBRARY_PATH for i in `find /storage/.xbmc/addons/* -name lib -type d`; do LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$i" done From 316f7b886a390e7077b5f736f2225977a4431bb8 Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Fri, 30 Dec 2011 10:40:48 -0500 Subject: [PATCH 3/5] Removed LD_LIBRARY_PATH Dependencies --- .../addons/service/multimedia/boblightd/addon | 6 ++-- .../boblightd/source/bin/boblight-X11 | 29 ------------------- .../boblightd/source/bin/boblight-constant | 29 ------------------- .../multimedia/boblightd/source/bin/boblightd | 29 ------------------- .../boblightd/source/bin/boblightd.service | 2 -- 5 files changed, 3 insertions(+), 92 deletions(-) delete mode 100755 packages/addons/service/multimedia/boblightd/source/bin/boblight-X11 delete mode 100755 packages/addons/service/multimedia/boblightd/source/bin/boblight-constant delete mode 100755 packages/addons/service/multimedia/boblightd/source/bin/boblightd diff --git a/packages/addons/service/multimedia/boblightd/addon b/packages/addons/service/multimedia/boblightd/addon index 703beafc6f..52642c30bf 100755 --- a/packages/addons/service/multimedia/boblightd/addon +++ b/packages/addons/service/multimedia/boblightd/addon @@ -28,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/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 + 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/source/bin/boblight-X11 b/packages/addons/service/multimedia/boblightd/source/bin/boblight-X11 deleted file mode 100755 index 274c528f99..0000000000 --- a/packages/addons/service/multimedia/boblightd/source/bin/boblight-X11 +++ /dev/null @@ -1,29 +0,0 @@ -#!/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 deleted file mode 100755 index 3947666be0..0000000000 --- a/packages/addons/service/multimedia/boblightd/source/bin/boblight-constant +++ /dev/null @@ -1,29 +0,0 @@ -#!/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 deleted file mode 100755 index 520bfb2597..0000000000 --- a/packages/addons/service/multimedia/boblightd/source/bin/boblightd +++ /dev/null @@ -1,29 +0,0 @@ -#!/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 index 236c8d0744..7f7cbccb0a 100755 --- a/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service @@ -37,8 +37,6 @@ 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 From 470688b1665f0774198ae38f296d79afb126c801 Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Fri, 30 Dec 2011 10:43:01 -0500 Subject: [PATCH 4/5] Update changelog. Minor other updates. --- packages/addons/service/multimedia/boblightd/changelog.txt | 3 +++ .../service/multimedia/boblightd/config/boblight.conf.sample | 2 +- packages/addons/service/multimedia/boblightd/meta | 4 ++-- packages/addons/service/multimedia/boblightd/unpack | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/addons/service/multimedia/boblightd/changelog.txt b/packages/addons/service/multimedia/boblightd/changelog.txt index 98f124e4dc..49ba90c485 100644 --- a/packages/addons/service/multimedia/boblightd/changelog.txt +++ b/packages/addons/service/multimedia/boblightd/changelog.txt @@ -1,3 +1,6 @@ +2.0.3 +- Removed LD_LIBRARY_PATH dependencies + 2.0.2 - Renamed to boblightd to avoid conflicts diff --git a/packages/addons/service/multimedia/boblightd/config/boblight.conf.sample b/packages/addons/service/multimedia/boblightd/config/boblight.conf.sample index 16c628de9e..fd01d7c847 100644 --- a/packages/addons/service/multimedia/boblightd/config/boblight.conf.sample +++ b/packages/addons/service/multimedia/boblightd/config/boblight.conf.sample @@ -10,7 +10,7 @@ type momo output /dev/ttyACM0 channels 75 prefix 41 64 61 00 18 4D -interval 10000 +interval 20000 rate 115200 debug off #turn this on to see what it's doing with the serial port delayafteropen 1000000 diff --git a/packages/addons/service/multimedia/boblightd/meta b/packages/addons/service/multimedia/boblightd/meta index 01c8348641..cba90a8862 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.2" -PKG_REV="2" +PKG_VERSION="2.0.3" +PKG_REV="3" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://code.google.com/p/boblight" diff --git a/packages/addons/service/multimedia/boblightd/unpack b/packages/addons/service/multimedia/boblightd/unpack index f299ac3901..74392b8a11 100755 --- a/packages/addons/service/multimedia/boblightd/unpack +++ b/packages/addons/service/multimedia/boblightd/unpack @@ -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) From 06b4b209203100df7fd52c9d07824030999cc474 Mon Sep 17 00:00:00 2001 From: Adam Boeglin Date: Fri, 30 Dec 2011 20:53:42 -0500 Subject: [PATCH 5/5] No need to specify path since it's automatic now. --- .../service/multimedia/boblightd/source/bin/boblightd.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service b/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service index 7f7cbccb0a..c118773fe2 100755 --- a/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service +++ b/packages/addons/service/multimedia/boblightd/source/bin/boblightd.service @@ -45,7 +45,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 + boblightd -c $BOBLIGHT_CONFIG -f >> $LOG_FILE 2>&1 fi @@ -55,6 +55,6 @@ if [ -e $BOBLIGHT_X11 ]; then wait_for_xorg # Start the boblight daemon - $ADDON_DIR/bin/boblight-X11 -f >> $LOG_FILE 2>&1 + boblight-X11 -f >> $LOG_FILE 2>&1 fi