sundtek-mediatv: clean up. bump

This commit is contained in:
Stefan Saraev
2014-01-17 16:33:02 +02:00
parent d9137b76bc
commit 4da3350945
5 changed files with 13 additions and 93 deletions

View File

@@ -1,3 +1,5 @@
4.1.1
clean up
4.1.0
rebuild for addon api bump
4.0.1

View File

@@ -18,7 +18,7 @@
PKG_NAME="sundtek-mediatv"
PKG_VERSION="4.1"
PKG_REV="0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="nonfree"
PKG_SITE="http://support.sundtek.com/"

View File

@@ -1,28 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC 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 of the License, or
# (at your option) any later version.
#
# OpenELEC 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. If not, see <http://www.gnu.org/licenses/>.
################################################################################
. /etc/profile
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
export LD_PRELOAD=$ADDON_DIR/lib/libmediaclient.so
logger -t Sundtek "### Sundtek manual stop ###"
mediaclient --shutdown

View File

@@ -20,7 +20,14 @@
. /etc/profile
ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
oe_setup_addon driver.dvb.sundtek-mediatv
logger -t Sundtek "### Sundtek manual start ###"
. $ADDON_DIR/bin/userspace-driver.sh
if [ "$SUSPEND_DRIVER" = "true" ]; then
case "$1" in
pre)
killall -9 mediasrv &>/dev/null
;;
post)
;;
esac
fi

View File

@@ -1,61 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC 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 of the License, or
# (at your option) any later version.
#
# OpenELEC 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. If not, see <http://www.gnu.org/licenses/>.
################################################################################
. /etc/profile
SUNDTEK_ADDON_DIR="$HOME/.xbmc/addons/driver.dvb.sundtek-mediatv"
SUNDTEK_ADDON_HOME="$HOME/.xbmc/userdata/addon_data/driver.dvb.sundtek-mediatv"
SUNDTEK_ADDON_SETTINGS="$SUNDTEK_ADDON_HOME/settings.xml"
if [ ! -f "$SUNDTEK_ADDON_SETTINGS" ]; then
cp $SUNDTEK_ADDON_DIR/settings-default.xml $SUNDTEK_ADDON_SETTINGS
fi
mkdir -p /var/config
cat "$SUNDTEK_ADDON_SETTINGS" | awk -F\" '{print $2"=\""$4"\""}' | sed '/^=/d' > /var/config/sundtek-addon.conf
. /var/config/sundtek-addon.conf
if [ "$SUSPEND_DRIVER" = "true" ]; then
LOCKDIR="/var/lock/"
LOCKFILE="$LOCKDIR/sundtek-mediatv"
case "$1" in
hibernate|suspend|pre)
if [ -n "$(pidof mediasrv)" ]; then
progress "Shutting down Sundtek DVB driver for suspending..."
mkdir -p "$LOCKDIR"
touch "$LOCKFILE"
killall -9 mediasrv
fi
;;
thaw|resume|post)
if [ -f "$LOCKFILE" ]; then
# driver started within Tvheadend/VDR
rm -f "$LOCKFILE"
fi
;;
*) exit $NA
;;
esac
else
progress "Suspend/resume of Sundtek driver not enabled..."
fi