Quick & Easy guide to building Tvheadend on a RPi2 (This also works on any other deb system!).
sudo apt-get install git build-essential debhelper pkg-config fakeroot
git clone https://github.com/tvheadend/tvheadend.git build/tvheadend/master
cd build/tvheadend/master
##### If you do not want unstable run the following line #####
git checkout release/4.0
##### If you do not want unstable run the above line #####
AUTOBUILD_CONFIGURE_EXTRA=--enable-hdhomerun_client\ --enable-ffmpeg_static\ --disable-bintray_cache ./Autobuild.sh
What each lines does.
* 1 Installs a few dependencies (you'll need to install some more later on).
* 2 Clones the Tvheadend master branch from github & places it in build/tvheadend/master.
* 3 Changes directory to the above path.
* 4 (optional) changes source to release/4.0.
* 5 Runs the Autobuild script that will build a debian package so that you can install it in a nice and neat way.
You can pass more options to AUTOBUILD_CONFIGURE_EXTRA just make sure to place an escaped space between each option, e.g.
AUTOBUILD_CONFIGURE_EXTRA=--enable-hdhomerun_client\ --disable-ffmpeg_static ./Autobuild.sh
A list of build options can be found by running (in the source directory).
Note that the Raspberry Pi is not powerful enough to do transcoding via the cpu, disabling ffmpeg during your build will reduce the time needed to build..
./configure --help
The Autobuild.sh scriptwill complain about other missing dependencies you need to install those, e.g.
sudo apt-get install libcurl14-gnutls-dev liburiparser-dev
Run the script again.
Once the build has completed you'll find the built debian package (E.g tvheadend_4.1-368~geeda7d7_armhf.deb) in build/tvheadend.
You can then install it (and the debug package) using.
cd build/tvheadend
sudo dpkg -i tvheadend*.deb
You may need to do the following on some systems with systemd, if the service doesn't start after install.
sudo systemctl disable tvheadend
sudo systemctl enable tvheadend
sudo systemctl start tvheadend