Project

General

Profile

Tvheadend gentoo » History » Version 10

William Peters, 2010-02-06 14:51

1 10 William Peters
This article describes how to build Tvheadend from source 
2 1 William Peters
3 8 Andreas Smas
Make sure you have avahi and subversion installed, these are required to build Tvheadend
4 1 William Peters
5
{{{
6
# emerge -av avahi subversion
7
}}}
8
9 2 William Peters
now create the following directories
10 1 William Peters
11
{{{
12
mkdir -p /opt/tvheadend/src
13
}}}
14
15 9 William Peters
now you need to check out the Tvheadend source code using svn
16 1 William Peters
17
{{{
18
svn co svn://svn.lonelycoder.com/hts/trunk/tvheadend /opt/tvheadend/src/
19
}}}
20
21 9 William Peters
now you need to prepare the Tvheadend source code
22 1 William Peters
23
{{{
24
cd /opt/tvheadend/src
25 4 William Peters
./configure --prefix=/opt/tvheadend 
26 1 William Peters
}}}
27
28 9 William Peters
if all went well you can compile the Tvheadend source code
29 1 William Peters
30
{{{
31
make
32
}}}
33
34
If the source is compiled with no errors you can install the compiled source
35
36
{{{
37
make install
38
}}}
39
40 9 William Peters
if you want you can also create this init script to start Tvheadend at boot time
41 7 William Peters
42 6 William Peters
/etc/init.d/tvheadend
43 1 William Peters
{{{
44
#!/sbin/runscript
45
# Copyright 1999-2010 Gentoo Foundation
46
# Distributed under the terms of the GNU General Public License v2
47
# $Header:
48
49
TVH_PIDFILE="/var/run/tvheadend.pid"
50
TVH_BIN="/opt/tvheadend/bin/tvheadend"
51
TVH_OPTS="-f -C"
52
53
depend() {
54
        need net
55
}
56
57
start() {
58 9 William Peters
        ebegin "Starting Tvheadend"
59 1 William Peters
        start-stop-daemon --start  --pidfile ${TVH_PIDFILE} \
60
                --exec ${TVH_BIN} -- ${TVH_OPTS}
61
        eend $?
62
}
63
64
stop() {
65 9 William Peters
        ebegin "Stopping Tvheadend"
66 1 William Peters
        start-stop-daemon --stop --quiet --pidfile ${TVH_PIDFILE} --signal 2
67
        eend $?
68
        rm -f ${PIDFILE}
69
}
70
}}}
71
72
now set /etc/init.d/tvheadend as executable
73
74
{{{
75
chmod +x /etc/init.d/tvheadend
76
}}}
77
78 9 William Peters
now you can try to start Tvheadend
79 1 William Peters
80
{{{
81
/etc/init.d/tvheadend start
82
}}}
83
84 9 William Peters
if this works fine you can also add it to runlevel default so Tvheadend starts automatically
85 1 William Peters
86
{{{
87
rc-update add tvheadend default
88
}}} 
89
90 9 William Peters
now you can go to [http://hostname:9981/ http://hostname:9981/] and start using/configuring Tvheadend