sundtek-mediatv: update driver to latest version on first install

show driver version in addon settings
allow update for aarch64 architecture
german translations
This commit is contained in:
Peter Vicman 2016-07-21 17:32:20 +02:00
parent 3e03056d24
commit 90b0e2e8ab
7 changed files with 70 additions and 8 deletions

6
packages/addons/driver/sundtek-mediatv/changelog.txt Normal file → Executable file
View File

@ -1,3 +1,9 @@
8.0.102
- automatically update driver to latest version on first install
show driver version in addon settings
allow update for aarch64 architecture
german translations
8.0.101
- system wait-for-online preference is now respected

View File

@ -18,7 +18,7 @@
PKG_NAME="sundtek-mediatv"
PKG_VERSION="7.0"
PKG_REV="101"
PKG_REV="102"
PKG_ARCH="any"
PKG_LICENSE="nonfree"
PKG_SITE="http://support.sundtek.com/"
@ -27,7 +27,7 @@ PKG_DEPENDS_TARGET=""
PKG_PRIORITY="optional"
PKG_SECTION="driver/dvb"
PKG_SHORTDESC="Sundtek MediaTV: a Linux driver to add support for SUNDTEK USB DVB devices"
PKG_LONGDESC="Install this to add support for SundTek USB DVB devices."
PKG_LONGDESC="Install this to add support for Sundtek USB DVB devices."
PKG_IS_ADDON="yes"
PKG_ADDON_NAME="Sundtek MediaTV"

View File

@ -36,8 +36,17 @@ SUNDTEK_ADDON_SETTINGS="$SUNDTEK_ADDON_HOME/settings.xml"
mkdir -p $SUNDTEK_ADDON_HOME
# remove the entry
BUILD_DATE="#"
sed -i "s|\(id=\"BUILD_DATE\" .* values=\)\"[^\"]*\"|\1\"$BUILD_DATE\"|" $SUNDTEK_ADDON_DIR/resources/settings.xml
if [ ! -f "$SUNDTEK_ADDON_HOME/sundtek.conf" ]; then
cp $SUNDTEK_ADDON_DIR/config/* $SUNDTEK_ADDON_HOME/
# update driver on first run
echo "update driver" >/tmp/ppp
systemd-run $SUNDTEK_ADDON_DIR/bin/sundtek-update-driver.sh
exit 0 # will be started later
else
# in case of missing entries in addon home's sundtek.conf
entry_set="$(grep use_hwpidfilter $SUNDTEK_ADDON_HOME/sundtek.conf 2>/dev/null)"
@ -244,4 +253,8 @@ if [ -z "$(pidof mediasrv)" ]; then
fi
fi
logger -t Sundtek "### Sundtek ready ###"
# change build date in addon settings
BUILD_DATE=$(mediasrv --build 2>&1)
sed -i "s|\(id=\"BUILD_DATE\" .* values=\)\"[^\"]*\"|\1\"$BUILD_DATE\"|" $SUNDTEK_ADDON_DIR/resources/settings.xml
logger -t Sundtek "### Sundtek ready ($BUILD_DATE) ###"

View File

@ -36,6 +36,10 @@ systemctl stop driver.dvb.sundtek-mediatv
killall -9 mediaclient &>/dev/null
killall -9 mediasrv &>/dev/null
# remove the entry
BUILD_DATE="#"
sed -i "s|\(id=\"BUILD_DATE\" .* values=\)\"[^\"]*\"|\1\"$BUILD_DATE\"|" $SUNDTEK_ADDON_DIR/resources/settings.xml
# exit on errors
set -e
@ -47,7 +51,7 @@ mkdir tmp
cd tmp
logger -t Sundtek "### Starting updating driver ###"
kodi-send -a "Notification(Sundtek, Starting updating driver, 2000, $SUNDTEK_ADDON_DIR/icon.png)"
kodi-send -a "Notification(Sundtek, Starting updating driver, 3000, $SUNDTEK_ADDON_DIR/icon.png)"
wget -O ../version.used http://sundtek.de/media/latest.phtml
if [ $? -ne 0 ]; then
@ -63,6 +67,8 @@ if [ "$ARCH" = "x86_64" ]; then
INSTALLER_URL="http://sundtek.de/media/netinst/64bit/installer.tar.gz"
elif [ "$ARCH" = "arm" ]; then
INSTALLER_URL="http://sundtek.de/media/netinst/armsysvhf/installer.tar.gz"
elif [ "$ARCH" = "aarch64" ]; then
INSTALLER_URL="http://sundtek.de/media/netinst/arm64/installer.tar.gz"
else
logger -t Sundtek "### Unsupported architecture ###"
kodi-send -a "Notification(Sundtek, Unsupported architecture, 8000, $SUNDTEK_ADDON_DIR/icon.png)"
@ -72,7 +78,7 @@ else
fi
logger -t Sundtek "### Downloading driver archive for $ARCH ###"
kodi-send -a "Notification(Sundtek, Downloading driver archive for $ARCH, 2000, $SUNDTEK_ADDON_DIR/icon.png)"
kodi-send -a "Notification(Sundtek, Downloading driver archive for $ARCH, 3000, $SUNDTEK_ADDON_DIR/icon.png)"
wget -O installer.tar.gz $INSTALLER_URL
if [ $? -ne 0 ]; then
logger -t Sundtek "### Archive damaged ###"
@ -83,7 +89,7 @@ if [ $? -ne 0 ]; then
fi
logger -t Sundtek "### Extracting archive ###"
kodi-send -a "Notification(Sundtek, Extracting archive, 2000, $SUNDTEK_ADDON_DIR/icon.png)"
kodi-send -a "Notification(Sundtek, Extracting archive, 3000, $SUNDTEK_ADDON_DIR/icon.png)"
tar -xzf installer.tar.gz
if [ $? -ne 0 ]; then
logger -t Sundtek "### Archive damaged ###"

View File

@ -24,11 +24,12 @@
<string id="9000">Tuner settings</string>
<string id="9005">Enable modifying settings</string>
<string id="9010">Refresh tuners... (press me)</string>
<string id="9010"><![CDATA[ >>> Refresh tuners <<< ]]></string>
<string id="9020"> IR protocol</string>
<string id="9030"> keymap filename</string>
<string id="3000">Driver</string>
<string id="3005">Driver version</string>
<string id="3020">Check for new driver version at boot</string>
<string id="3010">Update from web... (press me)</string>
<string id="3010"><![CDATA[ >>> Update driver now <<< ]]></string>
</strings>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
<string id="1000">Allgemein</string>
<string id="1014">Verzögerung bevor Treiber gestartet wird [Sek.]</string>
<string id="1015">Skript welches vom Treiber-Stack gestartet werden soll</string>
<string id="1030">Hardware PID Filter einschalten</string>
<string id="1035">Fernbedienung unterstützen</string>
<string id="1040">Niedrigste Adapter Nummer (/dev/dvb/adapterX/)</string>
<string id="1050">Suspend / Resume des Treibers zulassen</string>
<string id="2000">Netzwerksupport</string>
<string id="2005">Netzwerkserver aktivieren</string>
<string id="2010">Mit Netzwerk-Tunern verbinden</string>
<string id="2020">Server 1 IP Adresse</string>
<string id="2021"> # Tuner ID</string>
<string id="2030">Server 2 IP Adresse</string>
<string id="2031"> # Tuner ID</string>
<string id="2040">Server 3 IP Adresse</string>
<string id="2041"> # Tuner ID</string>
<string id="2050">Server 4 IP Adresse</string>
<string id="2051"> # Tuner ID</string>
<string id="2060">Server 5 IP Adresse</string>
<string id="2061"> # Tuner ID</string>
<string id="9000">Geräte Einstellungen</string>
<string id="9005">Geräte-Einstellung ändern</string>
<string id="9010"><![CDATA[ >>> Tuner-Liste aktualisieren <<< ]]></string>
<string id="9020"> IR Protokoll</string>
<string id="9030"> Keymap Datei</string>
<string id="3000">Treiber</string>
<string id="3005">Treiber-Version</string>
<string id="3020">Bei Neustart auf neue Treiber-Version prüfen</string>
<string id="3010"><![CDATA[ >>> Treiber jetzt aktualisieren <<< ]]></string>
</strings>

View File

@ -31,6 +31,7 @@
</category>
<category label="3000">
<setting type="sep" />
<setting id="BUILD_DATE" type="enum" label="3005" values="#" />
<setting id="CHECK_BOOT" type="bool" label="3020" default="false" />
<setting label="3010" option="close" type="action" id="update_driver" action="RunScript($CWD/resources/actions.py, update_driver)" />
</category>