Raspbian VDR Streaming Client - Install Scripts

Aus VDR Wiki
Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

Scripts

Spätestens beim zweiten Mal möchte man nicht alles per Anleitung durchführen.

Die Scripts sind nur Vorschläge und sollten nochmals auf Kompatibilität mit der eigenen Umgebung überprüft werden.

Speziell der Parameter -j4 der make anweist alle 4 CPUs zu benutzen schlägt beim PI1 ins Gegenteil um. Damit braucht der PI1 eine Ewigkeit zum compilieren.


Einrichten eines Users vdr

user.sh

#!/bin/bash
#set -x 
# create a user vdr that is compatible to the user vdr on yaVDR for easier integration via NFS.
sudo adduser --disabled-login --uid 666 --home /var/lib/vdr vdr
sudo adduser vdr video
sudo adduser vdr audio
sudo adduser vdr sudo
sudo mkdir -p /srv/vdr/video
sudo chown -R vdr.vdr /srv/vdr
sudo mkdir -p /var/cache/vdr
sudo chown -R vdr.vdr /var/cache/vdr

Abhängigkeiten und Goodies Installieren

Dependencies.sh

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install htop nfs-common git nano gettext g++ libfreetype6-dev libfontconfig1-dev libcap-dev libjpeg-dev libncurses5-dev libncursesw5-dev libavcodec-dev libavformat-dev libavutil-dev libavresample-dev libavresample1 libcap-dev libcurl4-openssl-dev libtinyxml-dev lirc wakeonlan

Quellen holen

GetSources.sh

#!/bin/bash
#set -x

# prepare some directories
# First the place to download archives
DNLOAD=~/Download
mkdir -p $DNLOAD

# We build it local as normal user
SRC=~/src
mkdir -p $SRC

# get vdr
cd $DNLOAD
wget ftp://ftp.tvdr.de/vdr/vdr-2.2.0.tar.bz2

# get plugins as archives
cd $DNLOAD
wget http://vdr.schmirler.de/svdrpservice/vdr-svdrpservice-1.0.0.tgz
wget http://vdr.schmirler.de/epgsync/vdr-epgsync-1.0.1.tgz
wget http://vdr.schmirler.de/remotetimers/vdr-remotetimers-1.0.2.tgz

wget http://phivdr.dyndns.org/vdr/vdr-suspendoutput/vdr-suspendoutput-2.0.0.tgz

wget http://www.saunalahti.fi/~rahrenbe/vdr/satip/files/vdr-satip-2.2.2.tgz

# unpack archives
cd $SRC
tar -xjf $DNLOAD/vdr-2.2.0.tar.bz2 
ln -sf vdr-2.2.0/ vdr

# directory for plugins
PLUGINSRC=$SRC/vdr/PLUGINS/src
mkdir -p $PLUGINSRC

# prepare svdrpservice
cd $PLUGINSRC
tar -xzf $DNLOAD/vdr-svdrpservice-1.0.0.tgz
ln -sf svdrpservice-1.0.0 svdrpservice

# prepare epgsync
cd $PLUGINSRC
tar -xzf $DNLOAD/vdr-epgsync-1.0.1.tgz
ln -sf epgsync-1.0.1 epgsync

# prepare remote timers
cd $PLUGINSRC
tar -xzf $DNLOAD/vdr-remotetimers-1.0.2.tgz
ln -sf remotetimers-1.0.2 remotetimers

# sat-ip
cd $PLUGINSRC
tar -xzf $DNLOAD/vdr-satip-2.2.2.tgz
ln -sf satip-2.2.2 satip 

# get plugins via git - directly into the right directory
cd $PLUGINSRC
git clone git://projects.vdr-developer.org/vdr-plugin-rpihddevice.git vdr-plugin-rpihddevice --depth=1
git clone git://projects.vdr-developer.org/vdr-plugin-streamdev.git vdr-plugin-streamdev --depth=1

# prepare rpihddevice
cd $SRC/vdr/PLUGINS/src
ln -sf vdr-plugin-rpihddevice rpihddevice

# prepare Streamdev
cd $SRC/vdr/PLUGINS/src
ln -sf vdr-plugin-streamdev/ streamdev

echo "Just a reminder tha we might need some manual steps before building"
echo "Need to modifiy the makefile for satip (SATIP_USE_TINYXML), see wiki"
echo "Also you might want some patches in various places, see wiki"

VDR und plugins bauen

build.sh

#!/bin/bash
set -x 
#
# use all 4 CPUs on the PI2. For PI1 remove the -j4
PI2=-j4
#
DNLOAD=~/Download
#
# We build it local as normal user
SRC=~/src
mkdir $SRC
cd $SRC
#
tar -xjf $DNLOAD/vdr/vdr-2.2.0.tar.bz2 
ln -s vdr-2.2.0/ vdr
#
# prepare rpihddevice
cd $SRC/vdr/PLUGINS/src
cp -a $DNLOAD/vdrplugins/vdr-plugin-rpihddevice .
ln -s vdr-plugin-rpihddevice rpihddevice
#
# prepare Streamdev
cd $SRC/vdr/PLUGINS/src
cp -a $DNLOAD/vdrplugins/vdr-plugin-streamdev .
ln -s vdr-plugin-streamdev/ streamdev
#
# prepare svdrpservice
cd $SRC/vdr/PLUGINS/src
tar -xzf $DNLOAD/vdrplugins/vdr-svdrpservice-1.0.0.tgz
ln -s svdrpservice-1.0.0 svdrpservice
#
#prepare epgsync
cd $SRC/vdr/PLUGINS/src
tar -xzf $DNLOAD/vdrplugins/vdr-epgsync-1.0.1.tgz
ln -s epgsync-1.0.1 epgsync
#
# prepare suspendoutput
# TBD
#
# build VDR and plugins
cd $SRC/vdr/
make REMOTE=LIRC $PI2 && make plugins $PI2 && sudo make install
sudo chown -R vdr.vdr /var/cache/vdr