Tvheadend gentoo » History » Version 12
William Peters, 2010-10-29 13:08
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 | depend() { |
||
50 | need net |
||
51 | } |
||
52 | |||
53 | start() { |
||
54 | 11 | William Peters | ebegin "Starting tvheadend" |
55 | start-stop-daemon --start \ |
||
56 | --user ${TVHUSER} \ |
||
57 | --exec ${TVHBIN} -- -C -f |
||
58 | 1 | William Peters | eend $? |
59 | } |
||
60 | |||
61 | stop() { |
||
62 | 11 | William Peters | ebegin "Stopping tvheadend" |
63 | start-stop-daemon --stop --quiet --name ${TVHNAME} --signal 2 |
||
64 | 1 | William Peters | eend $? |
65 | } |
||
66 | }}} |
||
67 | |||
68 | 11 | William Peters | /etc/conf.d/tvheadend |
69 | |||
70 | {{{ |
||
71 | # /etc/conf.d/tvheadend: config file for /etc/init.d/tvheadend |
||
72 | |||
73 | TVHROOT="/opt/tvheadend" |
||
74 | TVHNAME="tvheadend" |
||
75 | TVHBIN="${TVHROOT}/bin/${TVHNAME}" |
||
76 | TVHUSER="${TVHNAME}" |
||
77 | }}} |
||
78 | |||
79 | 1 | William Peters | now set /etc/init.d/tvheadend as executable |
80 | |||
81 | {{{ |
||
82 | chmod +x /etc/init.d/tvheadend |
||
83 | 11 | William Peters | }}} |
84 | |||
85 | 12 | William Peters | Create the tvheadend and add tvheadend to the group video |
86 | 11 | William Peters | |
87 | {{{ |
||
88 | 1 | William Peters | useradd -d /opt/tvheadend/home/ -G tvheadend -s /sbin/nologin -m tvheadend |
89 | 12 | William Peters | gpasswd -a tvheadend video |
90 | 1 | William Peters | }}} |
91 | |||
92 | 9 | William Peters | now you can try to start Tvheadend |
93 | 1 | William Peters | |
94 | {{{ |
||
95 | /etc/init.d/tvheadend start |
||
96 | }}} |
||
97 | |||
98 | 9 | William Peters | if this works fine you can also add it to runlevel default so Tvheadend starts automatically |
99 | 1 | William Peters | |
100 | {{{ |
||
101 | rc-update add tvheadend default |
||
102 | }}} |
||
103 | |||
104 | 9 | William Peters | now you can go to [http://hostname:9981/ http://hostname:9981/] and start using/configuring Tvheadend |