diff --git a/packages/mediacenter/xbmc-pvr/build b/packages/mediacenter/xbmc-pvr/build index 04d58bc8da..bad981cda0 100755 --- a/packages/mediacenter/xbmc-pvr/build +++ b/packages/mediacenter/xbmc-pvr/build @@ -29,9 +29,15 @@ else fi if [ "$XBMC_VIS_PROJECTM" = yes ]; then - XBMC_PROJECTM="--enable-xbmcprojectm" + XBMC_PROJECTM="--enable-projectm" else - XBMC_PROJECTM="--disable-xbmcprojectm" + XBMC_PROJECTM="--disable-projectm" +fi + +if [ "$XBMC_VIS_GOOM" = yes ]; then + XBMC_GOOM="--enable-goom" +else + XBMC_GOOM="--disable-goom" fi if [ "$PULSEAUDIO_SUPPORT" = yes ]; then @@ -40,18 +46,42 @@ else XBMC_PULSEAUDIO="--disable-pulse" fi +if [ "$CEC_SUPPORT" = yes ]; then + XBMC_CEC="--enable-libcec --enable-external-libcec --enable-udev --disable-libusb" +else + XBMC_CEC="--disable-libcec --disable-udev --disable-libusb" +fi + if [ "$NONFREE_SUPPORT" = yes ]; then XBMC_NONFREE="--enable-non-free" else XBMC_NONFREE="--disable-non-free" fi +if [ "$AIRPLAY_SUPPORT" = yes ]; then + XBMC_AIRPLAY="--enable-airplay" +else + XBMC_AIRPLAY="--disable-airplay" +fi + +if [ "$AIRTUNES_SUPPORT" = yes ]; then + XBMC_AIRTUNES="--enable-airtunes" +else + XBMC_AIRTUNES="--disable-airtunes" +fi + if [ "$DVDCSS_SUPPORT" = yes ]; then XBMC_DVDCSS="--enable-dvdcss" else XBMC_DVDCSS="--disable-dvdcss" fi +if [ "$BLURAY_SUPPORT" = yes ]; then + XBMC_BLURAY="--enable-libbluray" +else + XBMC_BLURAY="--disable-libbluray" +fi + if [ "$AVAHI_DAEMON" = yes ]; then XBMC_AVAHI="--enable-avahi" else @@ -64,6 +94,18 @@ else XBMC_NFS="--disable-nfs" fi +if [ "$AFP_SUPPORT" = yes ]; then + XBMC_AFP="--enable-afpclient" +else + XBMC_AFP="--disable-afpclient" +fi + +if [ "$SAMBA_CLIENT" = yes ]; then + XBMC_SAMBA="--enable-samba" +else + XBMC_SAMBA="--disable-samba" +fi + if [ "$WEBSERVER" = yes ]; then XBMC_WEBSERVER="--enable-webserver" else @@ -124,11 +166,14 @@ cd $PKG_BUILD # adding fake Makefile for stripped skin mkdir -p addons/skin.confluence/media touch addons/skin.confluence/media/Makefile.in + mkdir -p addons/skin.touched/media + touch addons/skin.touched/media/Makefile.in # autoreconf do_autoreconf do_autoreconf lib/libid3tag/libid3tag do_autoreconf xbmc/screensavers/rsxs-0.9 + do_autoreconf xbmc/visualizations/Goom/goom2k4-0 do_autoreconf lib/libapetag do_autoreconf lib/cpluff # order matters with libdvd and friends @@ -161,26 +206,31 @@ cd $PKG_BUILD --disable-tegra \ --disable-profiling \ --enable-joystick \ - --enable-xrandr \ - --disable-goom \ + $XBMC_CEC \ + $XBMC_GOOM \ $XBMC_RSXS \ $XBMC_PROJECTM \ --enable-x11 \ + --enable-xrandr \ --disable-ccache \ $XBMC_PULSEAUDIO \ --enable-rtmp \ + $XBMC_SAMBA \ $XBMC_NFS \ + $XBMC_AFP \ --enable-ffmpeg-libvorbis \ --enable-lame \ $XBMC_DVDCSS \ --disable-mid \ --disable-hal \ $XBMC_AVAHI \ + $XBMC_AIRPLAY \ + $XBMC_AIRTUNES \ $XBMC_NONFREE \ --disable-asap-codec \ $XBMC_WEBSERVER \ --enable-optical-drive \ - --enable-libbluray \ + $XBMC_BLURAY \ --enable-texturepacker \ --disable-external-libraries \ --disable-external-ffmpeg \ diff --git a/packages/mediacenter/xbmc-pvr/config/advancedsettings.xml b/packages/mediacenter/xbmc-pvr/config/advancedsettings.xml new file mode 100644 index 0000000000..c6f22f0a3a --- /dev/null +++ b/packages/mediacenter/xbmc-pvr/config/advancedsettings.xml @@ -0,0 +1,10 @@ + + + false + false + cputemp + gputemp + + 30 + + diff --git a/packages/mediacenter/xbmc-pvr/init.d/92_setup-xbmc b/packages/mediacenter/xbmc-pvr/init.d/92_setup-xbmc index b7a9fcabeb..dc1ce42edb 100644 --- a/packages/mediacenter/xbmc-pvr/init.d/92_setup-xbmc +++ b/packages/mediacenter/xbmc-pvr/init.d/92_setup-xbmc @@ -22,48 +22,31 @@ # # runlevels: openelec -case $RUNLEVEL in - boot) - progress "setup XBMC" +progress "setup XBMC" - # - # clean temp dir - # - rm -rf $HOME/.xbmc/temp/* +# +# clean temp dir +# + rm -rf $HOME/.xbmc/temp/* - # - # add some default settings - # - mkdir -p $HOME/.xbmc/userdata +# +# add some default settings +# + mkdir -p $HOME/.xbmc/userdata - # use dds fanarts by default - if [ ! -f $HOME/.xbmc/userdata/advancedsettings.xml ] ; then - cat > $HOME/.xbmc/userdata/advancedsettings.xml << EOF - - true - false - cputemp - gputemp - - 30 - - -EOF - fi +# +# setup directories for XBMC sources +# - # - # setup directories for XBMC sources - # + [ ! -d "$HOME/music" ] && mkdir -p $HOME/music + [ ! -d "$HOME/pictures" ] && mkdir -p $HOME/pictures + [ ! -d "$HOME/tvshows" ] && mkdir -p $HOME/tvshows + [ ! -d "$HOME/videos" ] && mkdir -p $HOME/videos - [ ! -d "$HOME/music" ] && mkdir -p $HOME/music - [ ! -d "$HOME/pictures" ] && mkdir -p $HOME/pictures - [ ! -d "$HOME/tvshows" ] && mkdir -p $HOME/tvshows - [ ! -d "$HOME/videos" ] && mkdir -p $HOME/videos + mkdir -p $HOME/.xbmc/userdata - mkdir -p $HOME/.xbmc/userdata - - if [ ! -f $HOME/.xbmc/userdata/sources.xml ] ; then - cat > $HOME/.xbmc/userdata/sources.xml << EOF + if [ ! -f $HOME/.xbmc/userdata/sources.xml ] ; then + cat > $HOME/.xbmc/userdata/sources.xml << EOF EOF - fi + fi - # - # common setup guisettings - # +# +# common setup guisettings +# - mkdir -p $HOME/.xbmc/userdata + mkdir -p $HOME/.xbmc/userdata - [ ! -d "$HOME/screenshots" ] && mkdir -p $HOME/screenshots + [ ! -d "$HOME/screenshots" ] && mkdir -p $HOME/screenshots - if [ ! -f $HOME/.xbmc/userdata/guisettings.xml ] ; then - echo "" > $HOME/.xbmc/userdata/guisettings.xml + if [ ! -f $HOME/.xbmc/userdata/guisettings.xml ] ; then + echo "" > $HOME/.xbmc/userdata/guisettings.xml - cat >> $HOME/.xbmc/userdata/guisettings.xml << EOF + cat >> $HOME/.xbmc/userdata/guisettings.xml << EOF $HOME/screenshots/ EOF - # - # include project specific options - # +# +# include project specific options +# - if [ -f /usr/share/xbmc/config/guisettings.xml ]; then - cat /usr/share/xbmc/config/guisettings.xml >> $HOME/.xbmc/userdata/guisettings.xml - fi + if [ -f /usr/share/xbmc/config/guisettings.xml ]; then + cat /usr/share/xbmc/config/guisettings.xml >> $HOME/.xbmc/userdata/guisettings.xml + fi - # - # common setup for amd and nvidia graphic - # +# +# common setup for amd and nvidia graphic +# - # Always sync to vblank - if [ "$GPUTYPE" = "NVIDIA" -o "$GPUTYPE" = "AMD" ] ; then - cat >> $HOME/.xbmc/userdata/guisettings.xml << EOF + # Always sync to vblank + if [ "$GPUTYPE" = "NVIDIA" -o "$GPUTYPE" = "AMD" ] ; then + cat >> $HOME/.xbmc/userdata/guisettings.xml << EOF 2 EOF - fi - echo "" >> $HOME/.xbmc/userdata/guisettings.xml - fi - ;; - - poweroff|reboot) - ;; -esac + fi + echo "" >> $HOME/.xbmc/userdata/guisettings.xml + fi diff --git a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc index 1db77b91b2..66dcf2910d 100644 --- a/packages/mediacenter/xbmc-pvr/init.d/93_xbmc +++ b/packages/mediacenter/xbmc-pvr/init.d/93_xbmc @@ -22,70 +22,66 @@ # # runlevels: openelec -case $RUNLEVEL in - boot) - LIRCDEV="/var/run/lirc/lircd" - [ -e /var/run/lirc/lircd.irtrans ] && LIRCDEV="/var/run/lirc/lircd.irtrans" - XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV" +LIRCDEV="/var/run/lirc/lircd" +[ -e /var/run/lirc/lircd.irtrans ] && LIRCDEV="/var/run/lirc/lircd.irtrans" +XBMC_ARGS="--standalone -fs --lircdev $LIRCDEV" - progress "starting XBMC" +progress "starting XBMC" - # hack for Boxee Remote - if $(cat /proc/bus/input/devices | grep Vendor=0471 | grep -q Product=20d9);then - export SDL_MOUSE_RELATIVE=0 - fi +# hack for Boxee Remote +if $(cat /proc/bus/input/devices | grep Vendor=0471 | grep -q Product=20d9);then + export SDL_MOUSE_RELATIVE=0 +fi - # starting autostart script (will be removed later again, dont use it!!!) - AUTOSTART="/storage/.config/autostart.sh" - if [ -f $AUTOSTART ]; then - echo "!!! AUTOSTART script detected !!!" >> /var/log/messages - cat "$AUTOSTART" >> /var/log/messages - echo "!!! -End of autostart script- !!!" >> /var/log/messages +# hack: make addon-bins executable + chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 - sh $AUTOSTART - fi +# starting autostart script (will be removed later again, dont use it!!!) + AUTOSTART="/storage/.config/autostart.sh" + if [ -f $AUTOSTART ]; then + echo "!!! AUTOSTART script detected !!!" >> /var/log/messages + cat "$AUTOSTART" >> /var/log/messages + echo "!!! -End of autostart script- !!!" >> /var/log/messages - # starting autoupdate - [ -f /usr/bin/autoupdate ] && /usr/bin/autoupdate & + sh $AUTOSTART + fi - # waiting for Xorg to start - wait_for_xorg +# starting autoupdate + [ -f /usr/bin/autoupdate ] && /usr/bin/autoupdate & - # set cpu's to 'on demand' - ( usleep 15000000 - progress "set cpu's to 'on demand'" - cpupower frequency-set -g ondemand > /dev/null 2>&1 - )& +# waiting for Xorg to start + wait_for_xorg - # starting XBMC - while true; do +# set cpu's to 'on demand' + ( usleep 15000000 + progress "set cpu's to 'on demand'" + cpupower frequency-set -g ondemand > /dev/null 2>&1 + )& - DISPLAY=:0.0 /usr/lib/xbmc/xbmc.bin $XBMC_ARGS > /dev/null 2>&1 - RET=$? +# starting XBMC + while true; do - case "$RET" in - 0) - RUNLEVEL="poweroff" - ;; - 64) - RUNLEVEL="poweroff" - ;; - 66) - RUNLEVEL="reboot" - ;; - 255) - echo "Abnormal Exit. Exited with code $RET" - echo "is Xorg running? check /var/log/Xorg.log" - ;; - *) - echo "Abnormal Exit. Exited with code $RET" - ;; - esac + DISPLAY=:0.0 /usr/lib/xbmc/xbmc.bin $XBMC_ARGS > /dev/null 2>&1 + RET=$? - usleep 250000 - done - ;; + case "$RET" in + 0) + poweroff -f + ;; + 64) + poweroff -f + ;; + 66) + reboot + ;; + 255) + echo "Abnormal Exit. Exited with code $RET" + echo "is Xorg running? check /var/log/Xorg.log" + ;; + *) + echo "Abnormal Exit. Exited with code $RET" + ;; + esac - poweroff|reboot) - ;; -esac + usleep 250000 + done diff --git a/packages/mediacenter/xbmc-pvr/install b/packages/mediacenter/xbmc-pvr/install index fcfb59bd33..a5a2669182 100755 --- a/packages/mediacenter/xbmc-pvr/install +++ b/packages/mediacenter/xbmc-pvr/install @@ -46,6 +46,18 @@ cd $PKG_BUILD -exec install -D -m 0644 "{}" $ROOT/$INSTALL/usr/share/xbmc/"{}" ";" cd - +if [ ! "$XBMC_SCR_RSXS" = yes ]; then + rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/screensaver.rsxs.* +fi + +if [ ! "$XBMC_VIS_PROJECTM" = yes ]; then + rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.projectm +fi + +rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.dxspectrum +rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.itunes +rm -rf $ROOT/$INSTALL/usr/share/xbmc/addons/visualization.milkdrop + # overriding Splash image mkdir -p $INSTALL/usr/share/xbmc/media rm -rf $INSTALL/usr/share/xbmc/media/Splash.png @@ -61,6 +73,9 @@ mkdir -p $INSTALL/usr/share/xbmc/media $INSTALL/usr/share/xbmc/addons/script.module.pil/lib/PIL rm -rf $INSTALL/usr/share/xbmc/addons/script.module.pysqlite +mkdir -p $INSTALL/usr/share/xbmc/system/ + cp $PKG_DIR/config/advancedsettings.xml $INSTALL/usr/share/xbmc/system/ + mkdir -p $INSTALL/usr/share/xbmc/addons cp -R $PKG_DIR/config/os.openelec.tv $INSTALL/usr/share/xbmc/addons $SED "s|@ADDON_OS_VERSION@|$OS_VERSION|g" -i $INSTALL/usr/share/xbmc/addons/os.openelec.tv/addon.xml diff --git a/packages/mediacenter/xbmc-pvr/meta b/packages/mediacenter/xbmc-pvr/meta index 0a6aea28a4..c8731310e1 100644 --- a/packages/mediacenter/xbmc-pvr/meta +++ b/packages/mediacenter/xbmc-pvr/meta @@ -24,10 +24,10 @@ PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.xbmc.org" -#PKG_URL="$OPENELEC_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_URL="http://gujs.openelec.tv/sources/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump libplist Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmodplug faad2 flac lame libmpeg2 libbluray SDL SDL_mixer SDL_image yajl sqlite mysql samba alsa bc xbmc-addon-settings" -PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump libplist Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmodplug faad2 flac lame libmpeg2 libbluray SDL SDL_mixer SDL_image yajl sqlite mysql samba" +#PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmodplug faad2 flac lame libmpeg2 SDL SDL_mixer SDL_image yajl sqlite mysql alsa bc xbmc-addon-settings" +PKG_BUILD_DEPENDS="toolchain boost Python zlib bzip2 lzo pcre alsa-lib libass enca curl libssh rtmpdump Mesa glew fontconfig fribidi $LIBJPEG libpng tiff freetype jasper libmad libsamplerate libogg libvorbis libcdio libmodplug faad2 flac lame libmpeg2 SDL SDL_mixer SDL_image yajl sqlite mysql" PKG_PRIORITY="optional" PKG_SECTION="mediacenter" PKG_SHORTDESC="xbmc: XBMC Mediacenter" @@ -48,6 +48,11 @@ PKG_AUTORECONF="no" PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS dbus" PKG_DEPENDS="$PKG_DEPENDS dbus" +if [ "$CEC_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libcec" + PKG_DEPENDS="$PKG_DEPENDS libcec" +fi + if [ "$XBMC_SCR_RSXS" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libXt libXmu" PKG_DEPENDS="$PKG_DEPENDS libXt libXmu" @@ -58,16 +63,41 @@ if [ "$FAAC_SUPPORT" = yes ]; then PKG_DEPENDS="$PKG_DEPENDS faac" fi +if [ "$BLURAY_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libbluray" + PKG_DEPENDS="$PKG_DEPENDS libbluray" +fi + if [ "$AVAHI_DAEMON" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS avahi" PKG_DEPENDS="$PKG_DEPENDS avahi" fi +if [ "$AIRPLAY_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libplist" + PKG_DEPENDS="$PKG_DEPENDS libplist" +fi + +if [ "$AIRTUNES_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libshairport" + PKG_DEPENDS="$PKG_DEPENDS libshairport" +fi + if [ "$NFS_SUPPORT" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libnfs" PKG_DEPENDS="$PKG_DEPENDS libnfs" fi +if [ "$AFP_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS afpfs-ng" + PKG_DEPENDS="$PKG_DEPENDS afpfs-ng" +fi + +if [ "$SAMBA_CLIENT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS samba" + PKG_DEPENDS="$PKG_DEPENDS samba" +fi + if [ "$WEBSERVER" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libmicrohttpd" PKG_DEPENDS="$PKG_DEPENDS libmicrohttpd" @@ -100,3 +130,4 @@ fi # some python stuff needed for various addons PKG_DEPENDS="$PKG_DEPENDS Imaging" PKG_DEPENDS="$PKG_DEPENDS simplejson" + diff --git a/packages/mediacenter/xbmc-pvr/scripts/cputemp b/packages/mediacenter/xbmc-pvr/scripts/cputemp index a9e7950a8b..3c35564ed1 100755 --- a/packages/mediacenter/xbmc-pvr/scripts/cputemp +++ b/packages/mediacenter/xbmc-pvr/scripts/cputemp @@ -1,8 +1,8 @@ #!/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,10 +20,32 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -TEMP="0" +# inspired by +# https://github.com/xtranophilist/gnome-shell-extension-cpu-temperature/blob/master/extension.js -if [ -f /usr/bin/sensors ]; then - TEMP=`/usr/bin/sensors -u | tail -n6 | grep temp._input | awk '{print $2 }' |awk '{printf("%d\n",$1 + 0.5);}'` +TEMP=0 + +if [ -f /sys/devices/platform/coretemp.0/temp1_input ]; then + # used with coretemp + TEMP=`cat /sys/devices/platform/coretemp.0/temp1_input` +elif [ -f /sys/devices/platform/coretemp.0/temp2_input ]; then + # used with coretemp + TEMP=`cat /sys/devices/platform/coretemp.0/temp2_input` +elif [ -f /sys/bus/acpi/devices/LNXTHERM\:00/thermal_zone/temp ]; then + # used on some intel systems + TEMP=`cat /sys/bus/acpi/devices/LNXTHERM\:00/thermal_zone/temp` +elif [ -f /sys/devices/virtual/thermal/thermal_zone0/temp ]; then + # used on some intel systems + TEMP=`cat /sys/devices/virtual/thermal/thermal_zone0/temp` +elif [ -f /sys/class/hwmon/hwmon0/temp1_input ]; then + # hwmon for new 2.6.39, 3.0 linux kernels + TEMP=`cat /sys/class/hwmon/hwmon0/temp1_input` +elif [ -f /sys/class/hwmon/hwmon0/device/temp1_input ]; then + # used on AMD systems + TEMP=`cat /sys/class/hwmon/hwmon0/device/temp1_input` +elif [ -f /sys/class/hwmon/hwmon0/device/temp2_input ]; then + # used on ION systems + TEMP=`cat /sys/class/hwmon/hwmon0/device/temp2_input` fi -echo "${TEMP} C" +echo "$(( $TEMP / 1000 )) C" diff --git a/packages/mediacenter/xbmc-pvr/scripts/gputemp b/packages/mediacenter/xbmc-pvr/scripts/gputemp index 7ce4fce138..7767e885a9 100755 --- a/packages/mediacenter/xbmc-pvr/scripts/gputemp +++ b/packages/mediacenter/xbmc-pvr/scripts/gputemp @@ -27,7 +27,12 @@ if lspci -n | grep 0300 | grep -q 10de; then fi if lspci -n | grep 0300 | grep -q 1002; then - [ -f /usr/bin/aticonfig ] && TEMP=`/usr/bin/aticonfig --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,,"` + if [ -f /storage/.config/xorg.conf ]; then + XORG="/storage/.config/xorg.conf" + else + XORG="/etc/X11/xorg-fglrx.conf" + fi + [ -f /usr/bin/aticonfig ] && TEMP=`/usr/bin/aticonfig -i $XORG --od-gettemperature | grep Temperature | cut -f 2 -d "-" | cut -f 1 -d "." | sed -e "s, ,,"` fi echo "${TEMP} C" diff --git a/packages/mediacenter/xbmc-pvr/sleep.d/00_addon-sleep b/packages/mediacenter/xbmc-pvr/sleep.d/00_addon-sleep new file mode 100755 index 0000000000..0a9d84e0c4 --- /dev/null +++ b/packages/mediacenter/xbmc-pvr/sleep.d/00_addon-sleep @@ -0,0 +1,28 @@ +#!/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 + +for script in $HOME/.xbmc/addons/*/sleep.d/*.power; do + progress "running addon sleep script $script ($1)..." + sh $script $1 +done diff --git a/packages/mediacenter/xbmc-pvr/init.d/91_setup-addons b/packages/mediacenter/xbmc-pvr/sleep.d/63_reload_skin old mode 100644 new mode 100755 similarity index 72% rename from packages/mediacenter/xbmc-pvr/init.d/91_setup-addons rename to packages/mediacenter/xbmc-pvr/sleep.d/63_reload_skin index 9f22b212cd..c0c2068b28 --- a/packages/mediacenter/xbmc-pvr/init.d/91_setup-addons +++ b/packages/mediacenter/xbmc-pvr/sleep.d/63_reload_skin @@ -1,3 +1,5 @@ +#!/bin/sh + ################################################################################ # This file is part of OpenELEC - http://www.openelec.tv # Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) @@ -18,27 +20,12 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -# -# setup XBMC addons -# -# runlevels: openelec, textmode +. /etc/profile -case $RUNLEVEL in - boot) - progress "setup XBMC addons" - - # hack: add addons to $PATH - for i in `find /storage/.xbmc/addons/* -name bin -type d`; do - PATH="$PATH:$i" - done - export PATH - - # hack: make addon-bins executable - chmod +x /storage/.xbmc/addons/*/bin/* > /dev/null 2>&1 +case "$1" in + thaw|resume) + xbmc-send --host=127.0.0.1 -a "ReloadSkin()" ;; - - poweroff|reboot) + *) exit $NA ;; esac - -