Tvheadend gentoo » History » Revision 13
Revision 12 (William Peters, 2010-10-29 13:08) → Revision 13/16 (William Peters, 2010-10-29 13:08)
This article describes how to build Tvheadend from source
Make sure you have avahi and subversion installed, these are required to build Tvheadend
<pre>
{{{
# emerge -av avahi subversion
</pre>
}}}
now create the following directories
<pre>
{{{
mkdir -p /opt/tvheadend/src
</pre>
}}}
now you need to check out the Tvheadend source code using svn
<pre>
{{{
svn co svn://svn.lonelycoder.com/hts/trunk/tvheadend /opt/tvheadend/src/
</pre>
}}}
now you need to prepare the Tvheadend source code
<pre>
{{{
cd /opt/tvheadend/src
./configure --prefix=/opt/tvheadend
</pre>
}}}
if all went well you can compile the Tvheadend source code
<pre>
{{{
make
</pre>
}}}
If the source is compiled with no errors you can install the compiled source
<pre>
{{{
make install
</pre>
}}}
if you want you can also create this init script to start Tvheadend at boot time
/etc/init.d/tvheadend
<pre>
{{{
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
depend() {
need net
}
start() {
ebegin "Starting tvheadend"
start-stop-daemon --start \
--user ${TVHUSER} \
--exec ${TVHBIN} -- -C -f
eend $?
}
stop() {
ebegin "Stopping tvheadend"
start-stop-daemon --stop --quiet --name ${TVHNAME} --signal 2
eend $?
}
</pre>
}}}
/etc/conf.d/tvheadend
<pre>
{{{
# /etc/conf.d/tvheadend: config file for /etc/init.d/tvheadend
TVHROOT="/opt/tvheadend"
TVHNAME="tvheadend"
TVHBIN="${TVHROOT}/bin/${TVHNAME}"
TVHUSER="${TVHNAME}"
</pre>
}}}
now set /etc/init.d/tvheadend as executable
<pre>
{{{
chmod +x /etc/init.d/tvheadend
</pre>
}}}
Create the tvheadend and add tvheadend to the group video
<pre>
{{{
useradd -d /opt/tvheadend/home/ -G tvheadend -s /sbin/nologin -m tvheadend
gpasswd -a tvheadend video
</pre>
}}}
now you can try to start Tvheadend
<pre>
{{{
/etc/init.d/tvheadend start
</pre>
}}}
if this works fine you can also add it to runlevel default so Tvheadend starts automatically
<pre>
{{{
rc-update add tvheadend default
</pre>
}}}
now you can go to "http://hostname:9981/":http://hostname:9981/ [http://hostname:9981/ http://hostname:9981/] and start using/configuring Tvheadend
Make sure you have avahi and subversion installed, these are required to build Tvheadend
<pre>
{{{
# emerge -av avahi subversion
</pre>
}}}
now create the following directories
<pre>
{{{
mkdir -p /opt/tvheadend/src
</pre>
}}}
now you need to check out the Tvheadend source code using svn
<pre>
{{{
svn co svn://svn.lonelycoder.com/hts/trunk/tvheadend /opt/tvheadend/src/
</pre>
}}}
now you need to prepare the Tvheadend source code
<pre>
{{{
cd /opt/tvheadend/src
./configure --prefix=/opt/tvheadend
</pre>
}}}
if all went well you can compile the Tvheadend source code
<pre>
{{{
make
</pre>
}}}
If the source is compiled with no errors you can install the compiled source
<pre>
{{{
make install
</pre>
}}}
if you want you can also create this init script to start Tvheadend at boot time
/etc/init.d/tvheadend
<pre>
{{{
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
depend() {
need net
}
start() {
ebegin "Starting tvheadend"
start-stop-daemon --start \
--user ${TVHUSER} \
--exec ${TVHBIN} -- -C -f
eend $?
}
stop() {
ebegin "Stopping tvheadend"
start-stop-daemon --stop --quiet --name ${TVHNAME} --signal 2
eend $?
}
</pre>
}}}
/etc/conf.d/tvheadend
<pre>
{{{
# /etc/conf.d/tvheadend: config file for /etc/init.d/tvheadend
TVHROOT="/opt/tvheadend"
TVHNAME="tvheadend"
TVHBIN="${TVHROOT}/bin/${TVHNAME}"
TVHUSER="${TVHNAME}"
</pre>
}}}
now set /etc/init.d/tvheadend as executable
<pre>
{{{
chmod +x /etc/init.d/tvheadend
</pre>
}}}
Create the tvheadend and add tvheadend to the group video
<pre>
{{{
useradd -d /opt/tvheadend/home/ -G tvheadend -s /sbin/nologin -m tvheadend
gpasswd -a tvheadend video
</pre>
}}}
now you can try to start Tvheadend
<pre>
{{{
/etc/init.d/tvheadend start
</pre>
}}}
if this works fine you can also add it to runlevel default so Tvheadend starts automatically
<pre>
{{{
rc-update add tvheadend default
</pre>
}}}
now you can go to "http://hostname:9981/":http://hostname:9981/ [http://hostname:9981/ http://hostname:9981/] and start using/configuring Tvheadend