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
./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 Runs the Autobuild script that will build a debian package so that you can install it in a nice and neat way.
AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static ./Autobuild.sh if you want transcoding
Other info.
The Autobuild.sh script
will complain about other missing dependencies you need to install those (using sudo apt-get install) and then 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