summaryrefslogtreecommitdiff
path: root/utilities/dvb/multiproto_plus
diff options
context:
space:
mode:
authorroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
committerroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
commit0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch)
tree11517ce0d3d2977c6732b3aa583b0008083e0bd3 /utilities/dvb/multiproto_plus
downloadx-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz
x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2
hello world
Diffstat (limited to 'utilities/dvb/multiproto_plus')
-rw-r--r--utilities/dvb/multiproto_plus/dvb-driver.sh102
1 files changed, 102 insertions, 0 deletions
diff --git a/utilities/dvb/multiproto_plus/dvb-driver.sh b/utilities/dvb/multiproto_plus/dvb-driver.sh
new file mode 100644
index 0000000..baed692
--- /dev/null
+++ b/utilities/dvb/multiproto_plus/dvb-driver.sh
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis)
+# von Marc Wernecke - www.zulu-entertainment.de
+# 03.05.2008
+
+# multiproto_plus
+
+source ./../../../x-vdr.conf
+source ./../../../setup.conf
+source ./../../../functions
+
+
+VERSION="multiproto_plus"
+WEB="http://jusst.de/hg/$VERSION"
+LINK="DVB"
+
+DIR=`pwd`
+
+# install
+function make_util() {
+
+ apt-get update
+ apt_install "mercurial"
+ apt_install "linux-headers-`uname -r`"
+ [ -L /usr/src/linux ] && rm -f /usr/src/linux
+ if [ ! -d /usr/src/linux ]; then
+ cd /usr/src
+ ln -vfs /usr/src/linux-headers-`uname -r` linux
+ fi
+
+ # download und symlink
+ cd $SOURCEDIR
+ hg clone $WEB
+
+ rm -f $LINK
+ ln -vfs $VERSION $LINK
+
+ cd $SOURCEDIR/$LINK/linux/include/linux
+ if [ -f /usr/src/linux/include/linux/compiler.h ]; then
+ ln -s /usr/src/linux/include/linux/compiler.h compiler.h
+ elif [ -f /usr/src/$(uname -r)/include/linux/compiler.h ]; then
+ ln -s /usr/src/$(uname -r)/include/linux/compiler.h compiler.h
+ elif [ -f /usr/src/linux-headers-$(uname -r)/include/linux/compiler.h ]; then
+ ln -s /usr/src/linux-headers-$(uname -r)/include/linux/compiler.h compiler.h
+ else
+ log "ERROR - /usr/src/linux/include/linux/compiler.h nicht gefunden"
+ fi
+
+ # install
+ cd $SOURCEDIR/$LINK
+
+ # search for *.diff
+ for i in `ls $DIR/patches | grep ".diff$"`; do
+ log "apply $i"
+ patch -p 1 < $DIR/patches/$i
+ done
+
+ make menuconfig
+ make
+ if [ $? = 0 ] ; then
+ log "SUCCESS - $VERSION erstellt"
+ else
+ log "ERROR - $VERSION konnte nicht erstellt werden"
+ return 1
+ fi
+
+ dialog --title " x-vdr - $VERSION " --yesno "Die DVB-Treiber wurden in $SOURCEDIR/$VERSION erstellt. \nSollen sie jetzt installiert werden?" 19 70
+ [ $? = 0 ] || return 0
+ make install && cp -rf $SOURCEDIR/$VERSION/linux/include/linux/dvb /usr/include/linux && log "SUCCESS - $VERSION installiert"
+}
+
+# uninstall
+function clean_util() {
+ # remove source
+ cd $SOURCEDIR
+ rm -rf $LINK
+ rm -rf $VERSION
+}
+
+# test
+function status_util() {
+ if [ -d "$SOURCEDIR/$VERSION" ]; then
+ [ -d "$SOURCEDIR/$VERSION" ] && echo "2" && return 0
+ echo "1"
+ else
+ echo "0"
+ fi
+}
+
+# start
+
+# plugin commands
+if [ $# \> 0 ]; then
+ cmd=$1
+ cmd_util
+else
+ make_util
+ status_util
+fi
+
+exit 0