Tvheadend gentoo » History » Version 16
Adam Sutton, 2012-08-23 10:35
1 | 16 | Adam Sutton | TODO: this needs to be updated. |
---|---|---|---|
2 | |||
3 | 10 | William Peters | This article describes how to build Tvheadend from source |
4 | 1 | William Peters | |
5 | 14 | William Peters | Make sure you have avahi and git installed, these are required to build Tvheadend |
6 | 1 | William Peters | |
7 | 13 | William Peters | <pre> |
8 | 14 | William Peters | # emerge -av avahi git |
9 | 13 | William Peters | </pre> |
10 | 1 | William Peters | |
11 | 2 | William Peters | now create the following directories |
12 | 1 | William Peters | |
13 | 13 | William Peters | <pre> |
14 | 1 | William Peters | mkdir -p /opt/tvheadend/src |
15 | 13 | William Peters | </pre> |
16 | 1 | William Peters | |
17 | 14 | William Peters | now you need to fetch the Tvheadend source code using git |
18 | 1 | William Peters | |
19 | 13 | William Peters | <pre> |
20 | 14 | William Peters | git clone https://github.com/andoma/tvheadend.git /opt/tvheadend/src/ |
21 | 13 | William Peters | </pre> |
22 | 1 | William Peters | |
23 | 9 | William Peters | now you need to prepare the Tvheadend source code |
24 | 1 | William Peters | |
25 | 13 | William Peters | <pre> |
26 | 1 | William Peters | cd /opt/tvheadend/src |
27 | 4 | William Peters | ./configure --prefix=/opt/tvheadend |
28 | 13 | William Peters | </pre> |
29 | 1 | William Peters | |
30 | 9 | William Peters | if all went well you can compile the Tvheadend source code |
31 | 1 | William Peters | |
32 | 13 | William Peters | <pre> |
33 | 1 | William Peters | make |
34 | 13 | William Peters | </pre> |
35 | 1 | William Peters | |
36 | If the source is compiled with no errors you can install the compiled source |
||
37 | |||
38 | 13 | William Peters | <pre> |
39 | 1 | William Peters | make install |
40 | 13 | William Peters | </pre> |
41 | 1 | William Peters | |
42 | 9 | William Peters | if you want you can also create this init script to start Tvheadend at boot time |
43 | 7 | William Peters | |
44 | 6 | William Peters | /etc/init.d/tvheadend |
45 | 13 | William Peters | <pre> |
46 | 1 | William Peters | #!/sbin/runscript |
47 | # Copyright 1999-2010 Gentoo Foundation |
||
48 | # Distributed under the terms of the GNU General Public License v2 |
||
49 | # $Header: |
||
50 | |||
51 | depend() { |
||
52 | need net |
||
53 | } |
||
54 | |||
55 | start() { |
||
56 | 11 | William Peters | ebegin "Starting tvheadend" |
57 | start-stop-daemon --start \ |
||
58 | --user ${TVHUSER} \ |
||
59 | --exec ${TVHBIN} -- -C -f |
||
60 | 1 | William Peters | eend $? |
61 | } |
||
62 | |||
63 | stop() { |
||
64 | 11 | William Peters | ebegin "Stopping tvheadend" |
65 | start-stop-daemon --stop --quiet --name ${TVHNAME} --signal 2 |
||
66 | 1 | William Peters | eend $? |
67 | } |
||
68 | 13 | William Peters | </pre> |
69 | 1 | William Peters | |
70 | 11 | William Peters | /etc/conf.d/tvheadend |
71 | |||
72 | 13 | William Peters | <pre> |
73 | 11 | William Peters | # /etc/conf.d/tvheadend: config file for /etc/init.d/tvheadend |
74 | |||
75 | TVHROOT="/opt/tvheadend" |
||
76 | TVHNAME="tvheadend" |
||
77 | TVHBIN="${TVHROOT}/bin/${TVHNAME}" |
||
78 | TVHUSER="${TVHNAME}" |
||
79 | 13 | William Peters | </pre> |
80 | 11 | William Peters | |
81 | 1 | William Peters | now set /etc/init.d/tvheadend as executable |
82 | |||
83 | 13 | William Peters | <pre> |
84 | 1 | William Peters | chmod +x /etc/init.d/tvheadend |
85 | 13 | William Peters | </pre> |
86 | 11 | William Peters | |
87 | 12 | William Peters | Create the tvheadend and add tvheadend to the group video |
88 | 11 | William Peters | |
89 | 13 | William Peters | <pre> |
90 | 15 | William Peters | groupadd tvheadend |
91 | useradd -d /opt/tvheadend/home/ -g tvheadend -s /sbin/nologin -m tvheadend |
||
92 | 12 | William Peters | gpasswd -a tvheadend video |
93 | 13 | William Peters | </pre> |
94 | 1 | William Peters | |
95 | 9 | William Peters | now you can try to start Tvheadend |
96 | 1 | William Peters | |
97 | 13 | William Peters | <pre> |
98 | 1 | William Peters | /etc/init.d/tvheadend start |
99 | 13 | William Peters | </pre> |
100 | 1 | William Peters | |
101 | 9 | William Peters | if this works fine you can also add it to runlevel default so Tvheadend starts automatically |
102 | 1 | William Peters | |
103 | 13 | William Peters | <pre> |
104 | 1 | William Peters | rc-update add tvheadend default |
105 | 13 | William Peters | </pre> |
106 | 1 | William Peters | |
107 | 13 | William Peters | now you can go to "http://hostname:9981/":http://hostname:9981/ and start using/configuring Tvheadend |