Tvheadend gentoo » History » Version 4
William Peters, 2010-01-24 15:03
1 | 1 | William Peters | The article describes how to build tvheadend from source |
---|---|---|---|
2 | |||
3 | Make sure you have avahi and subversion installed, these are required to build TVHeadend |
||
4 | |||
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 | 3 | 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 | 3 | 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 | 3 | 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 | if this is finished, you can create the initscript: |
||
41 | |||
42 | {{{ |
||
43 | #!/sbin/runscript |
||
44 | # Copyright 1999-2010 Gentoo Foundation |
||
45 | # Distributed under the terms of the GNU General Public License v2 |
||
46 | # $Header: |
||
47 | |||
48 | TVH_PIDFILE="/var/run/tvheadend.pid" |
||
49 | TVH_BIN="/opt/tvheadend/bin/tvheadend" |
||
50 | TVH_OPTS="-f -C" |
||
51 | |||
52 | depend() { |
||
53 | need net |
||
54 | } |
||
55 | |||
56 | start() { |
||
57 | ebegin "Starting tvheadend" |
||
58 | start-stop-daemon --start --pidfile ${TVH_PIDFILE} \ |
||
59 | --exec ${TVH_BIN} -- ${TVH_OPTS} |
||
60 | eend $? |
||
61 | } |
||
62 | |||
63 | stop() { |
||
64 | ebegin "Stopping tvheadend" |
||
65 | start-stop-daemon --stop --quiet --pidfile ${TVH_PIDFILE} --signal 2 |
||
66 | eend $? |
||
67 | rm -f ${PIDFILE} |
||
68 | } |
||
69 | }}} |
||
70 | |||
71 | now set /etc/init.d/tvheadend as executable |
||
72 | |||
73 | {{{ |
||
74 | chmod +x /etc/init.d/tvheadend |
||
75 | }}} |
||
76 | |||
77 | now you can try to start tvheadend |
||
78 | |||
79 | {{{ |
||
80 | /etc/init.d/tvheadend start |
||
81 | }}} |
||
82 | |||
83 | if this works fine you can also add it to runlevel default so tvheadend starts automatically |
||
84 | |||
85 | {{{ |
||
86 | rc-update add tvheadend default |
||
87 | }}} |
||
88 | |||
89 | now you can go to [http://hostname:9981/ http://hostname:9981/] and start using/configuring tvheadend |