Created
February 7, 2017 07:35
-
-
Save fcolista/10d039d059f41bbe5cf77ba7ebae97e8 to your computer and use it in GitHub Desktop.
Tvheadend build script from git repo (debian-based)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# (c) 2016 francesco@bsod.eu | |
# Simple script for building tvheadend with the latest git repo and ffmpeg static bindings | |
# Used to build WEBM profile on Live TV Web Player | |
# | |
check_if_installed() { | |
local PACKAGES="libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev build-essential git pkg-config libssl-dev bzip2 wget debhelper libcurl4-gnutls-dev liburiparser-dev" | |
for p in $PACKAGES; do | |
STATUS=$(dpkg-query -W -f='${Status} ${Version}\n' $p | awk '{print $3}') | |
if ! [ $STATUS = "installed" ]; then | |
apt-get install $p; | |
else | |
echo " ==> $p is installed" | |
echo | |
fi | |
done | |
} | |
check_if_installed | |
cd /tmp | |
if [ -d tvheadend ]; then | |
echo " ==> Updating TVHeadend git repository" | |
cd /tmp/tvheadend | |
git pull | |
else | |
echo " ==> Cloning TVHeadend git repository" | |
git clone https://github.com/tvheadend/tvheadend.git | |
fi | |
cd /tmp/tvheadend | |
./configure | |
AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static ./Autobuild.sh -t $(lsb_release -c -)-$(uname -i) | |
if [ $? = 0 ]; then | |
echo | |
echo " ==> tvheadend was succesfully built. Now you can install the following .deb file : " | |
cd /tmp | |
ls -1 *.deb | |
echo | |
echo " ==> By running: dpkg -i file.deb" | |
echo | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment