]>
Commit | Line | Data |
---|---|---|
8afae0cb ER |
1 | # |
2 | # Specfile for MythTV | |
3 | # | |
4 | # MythTV now uses a fairly intelligent cpu-detection script, so if you are | |
5 | # building an rpm by hand on the machine it will be used on, I encourage you | |
6 | # to use "--with cpu_autodetect" to let mythtv decide for you. | |
7 | # | |
8 | ||
9 | # The name of the DVB driver package (used in a couple of places, | |
10 | # so it's not hard-coded in the spec itself) | |
11 | %define linuxtv_dvb_package linuxtv-dvb-1.1.1 | |
12 | ||
13 | # Compile type: debug or release | |
14 | %define compile_type debug | |
15 | ||
16 | # Set up some custom-build parameters | |
910a00e3 ER |
17 | %bcond_with lirc |
18 | %bcond_without alsa | |
19 | %bcond_without oss | |
20 | %bcond_with opengl_vsync | |
21 | %bcond_with arts | |
22 | %bcond_with xvmc | |
23 | %bcond_with cpu_autodetect # enable cpu autodetection at compile time | |
24 | ||
25 | Name: mythtv | |
26 | Version: 0.17 | |
27 | #define _snap 20050326 | |
28 | Release: 0.1 | |
29 | Summary: A personal video recorder (PVR) application. | |
30 | Group: Applications/Multimedia | |
31 | License: GPL v2 | |
32 | URL: http://www.mythtv.org/ | |
33 | Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2 | |
34 | # Source0-md5: c996dc690d36e946396fc5cd4b715e3b | |
35 | Source1: mythbackend.sysconfig.in | |
36 | Source2: mythbackend.init.in | |
37 | Source3: mythbackend.logrotate.in | |
38 | Source12: http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2 | |
39 | # Source12-md5: 6dd599f24b7abecd1e32c203eaa7fa8a | |
40 | ExclusiveArch: i386 i686 athlon x86_64 | |
41 | BuildRequires: gcc-c++ | |
42 | BuildRequires: XFree86-devel | |
43 | BuildRequires: freetype-devel >= 1:2.0.0 | |
44 | BuildRequires: lame-libs-devel | |
45 | BuildRequires: qt-devel >= 6:3.2.1-4 | |
46 | BuildRequires: qmake >= 6:3.2.1-4 | |
47 | BuildRequires: mysql-devel | |
48 | BuildRequires: desktop-file-utils | |
49 | %if %{with alsa} | |
50 | BuildRequires: alsa-lib-devel | |
8afae0cb | 51 | %endif |
910a00e3 ER |
52 | %if %{with lirc} |
53 | BuildRequires: lirc-devel | |
8afae0cb | 54 | %endif |
910a00e3 ER |
55 | %if %{with arts} |
56 | BuildRequires: arts-devel >= 13:0.9.5 | |
8afae0cb | 57 | %endif |
910a00e3 ER |
58 | %if %{with xvmc} |
59 | BuildRequires: nvidia-graphics-devel | |
8afae0cb | 60 | %endif |
910a00e3 | 61 | #%if %{with opengl_vsync} |
8afae0cb ER |
62 | #BuildRequires: nvidia-graphics-devel |
63 | #%endif | |
910a00e3 | 64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8afae0cb ER |
65 | |
66 | %description | |
910a00e3 ER |
67 | MythTV implements the following PVR features, and more, with a unified |
68 | graphical interface: | |
8afae0cb ER |
69 | |
70 | - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV. | |
71 | - Video compression using RTjpeg or MPEG-4 | |
72 | - Program listing retrieval using XMLTV | |
73 | - Themable, semi-transparent on-screen display | |
74 | - Electronic program guide | |
75 | - Scheduled recording of TV programs | |
76 | - Resolution of conflicts between scheduled recordings | |
77 | - Basic video editing | |
78 | ||
79 | %package -n libmyth | |
910a00e3 ER |
80 | Summary: Library providing mythtv support. |
81 | Group: Libraries | |
82 | Requires: freetype >= 1:2.0.0 | |
83 | Requires: lame | |
84 | Requires: qt >= 6: | |
85 | Requires: qt-plugin-mysql >= 6:3.2.1-4 | |
8afae0cb ER |
86 | |
87 | %description -n libmyth | |
910a00e3 ER |
88 | Common library code for MythTV and add-on modules (development) MythTV |
89 | provides a unified graphical interface for recording and viewing | |
90 | television programs. Refer to the mythtv package for more information. | |
8afae0cb ER |
91 | |
92 | %package -n libmyth-devel | |
910a00e3 ER |
93 | Summary: Development files for libmyth. |
94 | Group: Development/Libraries | |
95 | Requires: libmyth = %{version}-%{release} | |
96 | BuildRequires: freetype-devel >= 1:2.0.0 | |
97 | BuildRequires: lame-libs-devel | |
98 | BuildRequires: qt-devel >= 6:3.2.1-4 | |
99 | BuildRequires: mysql-devel | |
100 | BuildRequires: DirectFB-devel | |
101 | %if %{with alsa} | |
102 | BuildRequires: alsa-lib-devel | |
8afae0cb | 103 | %endif |
910a00e3 ER |
104 | %if %{with lirc} |
105 | BuildRequires: lirc-devel | |
8afae0cb | 106 | %endif |
910a00e3 ER |
107 | %if %{with arts} |
108 | BuildRequires: arts-devel >= 13:0.9.5 | |
8afae0cb ER |
109 | %endif |
110 | ||
111 | %description -n libmyth-devel | |
112 | This package contains the header files and libraries for developing | |
113 | add-ons for mythtv. | |
114 | ||
115 | %package themes | |
910a00e3 ER |
116 | Summary: Base themes for mythtv's frontend. |
117 | Group: Applications/Multimedia | |
118 | Obsoletes: mythtv-theme-Titivillus | |
8afae0cb ER |
119 | |
120 | %description themes | |
910a00e3 ER |
121 | MythTV provides a unified graphical interface for recording and |
122 | viewing television programs. Refer to the mythtv package for more | |
123 | information. | |
8afae0cb ER |
124 | |
125 | This package contains only the base themes used by the frontend and | |
126 | mythtvsetup. | |
127 | ||
128 | %package frontend | |
910a00e3 ER |
129 | Summary: Client component of mythtv (a PVR). |
130 | Group: Applications/Multimedia | |
131 | Requires: mythtv = %{version}-%{release} | |
132 | Requires: mythtv-themes = %{version}-%{release} | |
133 | Provides: mythtv-frontend-api = %(echo %{version} | cut -d. -f1,2) | |
8afae0cb ER |
134 | |
135 | %description frontend | |
910a00e3 ER |
136 | MythTV provides a unified graphical interface for recording and |
137 | viewing television programs. Refer to the mythtv package for more | |
138 | information. | |
8afae0cb ER |
139 | |
140 | This package contains only the client software, which provides a | |
910a00e3 | 141 | front-end for playback and configuration. It requires access to a |
8afae0cb ER |
142 | mythtv-backend installation, either on the same system or one |
143 | reachable via the network. | |
144 | ||
145 | %package backend | |
910a00e3 ER |
146 | Summary: Server component of mythtv (a PVR). |
147 | Group: Applications/Multimedia | |
148 | Conflicts: xmltv-grabbers < 0.5.34 | |
149 | Requires: mythtv = %{version}-%{release} | |
8afae0cb ER |
150 | |
151 | %description backend | |
910a00e3 ER |
152 | MythTV provides a unified graphical interface for recording and |
153 | viewing television programs. Refer to the mythtv package for more | |
154 | information. | |
8afae0cb ER |
155 | |
156 | This package contains only the server software, which provides video | |
910a00e3 | 157 | and audio capture and encoding services. In order to be useful, it |
8afae0cb ER |
158 | requires a mythtv-frontend installation, either on the same system or |
159 | one reachable via the network. | |
160 | ||
161 | %package setup | |
910a00e3 ER |
162 | Summary: Setup the mythtv backend. |
163 | Group: Applications/Multimedia | |
164 | Requires: mythtv-backend = %{version}-%{release} | |
165 | Requires: mythtv-themes = %{version}-%{release} | |
166 | Provides: mythtvsetup | |
8afae0cb ER |
167 | |
168 | %description setup | |
910a00e3 ER |
169 | MythTV provides a unified graphical interface for recording and |
170 | viewing television programs. Refer to the mythtv package for more | |
171 | information. | |
8afae0cb ER |
172 | |
173 | This package contains only the setup software for configuring the | |
174 | mythtv backend. | |
175 | ||
176 | %prep | |
177 | %setup -q -a 12 | |
178 | ||
179 | # Install these files that MythTV doesn't include, | |
180 | # and update them with the paths set by rpmbuild. | |
910a00e3 | 181 | %if 0 |
8afae0cb ER |
182 | cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} . |
183 | for file in mythbackend.init \ | |
184 | mythbackend.sysconfig \ | |
185 | mythbackend.logrotate; do | |
910a00e3 | 186 | sed -e's|@logdir@|%{_localstatedir}/log|g' \ |
8afae0cb | 187 | -e's|@rundir@|%{_rundir}|g' \ |
910a00e3 ER |
188 | -e's|@sysconfigdir@|%{_sysconfdir}|g' \ |
189 | -e's|@initdir@|%{_initrddir}|g' \ | |
8afae0cb ER |
190 | -e's|@bindir@|%{_bindir}|g' \ |
191 | -e's|@sbindir@|%{_sbindir}|g' \ | |
192 | -e's|@subsysdir@|%{_subsysdir}|g' \ | |
910a00e3 | 193 | -e's|@varlibdir@|/var/lib|g' \ |
8afae0cb | 194 | -e's|@varcachedir@|%{_varcachedir}|g' \ |
910a00e3 | 195 | -e's|@logrotatedir@|%{_sysconfdir}/logrotate.d|g' \ |
8afae0cb ER |
196 | < $file.in > $file |
197 | done | |
910a00e3 | 198 | %endif |
8afae0cb ER |
199 | |
200 | %build | |
910a00e3 | 201 | export QTDIR="%{_prefix}" |
8afae0cb ER |
202 | |
203 | # Initialize the options string | |
204 | OPTS="" | |
205 | ||
206 | # Tune for the various processor types? | |
910a00e3 | 207 | %if %{with cpu_autodetect} |
8afae0cb ER |
208 | %ifarch i386 |
209 | OPTS="$OPTS --cpu=i386 --tune=pentium4 --enable-mmx" | |
210 | %endif | |
211 | %ifarch i686 | |
212 | OPTS="$OPTS --cpu=i686 --tune=pentium4 --enable-mmx" | |
213 | %endif | |
214 | %ifarch athlon | |
215 | OPTS="$OPTS --arch=athlon" | |
216 | %endif | |
217 | %ifarch x86_64 | |
218 | OPTS="$OPTS --arch=x86_64" | |
219 | %endif | |
220 | %endif | |
221 | ||
222 | # Enable arts support (or make sure it's disabled) | |
910a00e3 | 223 | %if %{with arts} |
8afae0cb ER |
224 | OPTS="$OPTS --enable-audio-arts" |
225 | %else | |
226 | OPTS="$OPTS --disable-audio-arts" | |
227 | %endif | |
228 | ||
229 | # Enable alsa support (or make sure it's disabled) | |
910a00e3 | 230 | %if %{with alsa} |
8afae0cb ER |
231 | OPTS="$OPTS --enable-audio-alsa" |
232 | %else | |
233 | OPTS="$OPTS --disable-audio-alsa" | |
234 | %endif | |
235 | ||
236 | # Enable oss support (or make sure it's disabled) | |
910a00e3 | 237 | %if %{with oss} |
8afae0cb ER |
238 | OPTS="$OPTS --enable-audio-oss" |
239 | %else | |
240 | OPTS="$OPTS --disable-audio-oss" | |
241 | %endif | |
242 | ||
243 | # Enable xvmc support (or make sure it's disabled) | |
910a00e3 | 244 | %if %{with xvmc} |
8afae0cb ER |
245 | OPTS="$OPTS --enable-xvmc --enable-xvmc-vld" |
246 | %else | |
247 | OPTS="$OPTS --disable-xvmc --disable-xvmc-vld" | |
248 | %endif | |
249 | ||
250 | # Enable opengl-vsync support (or make sure it's disabled) | |
910a00e3 | 251 | %if %{with opengl_vsync} |
8afae0cb ER |
252 | OPTS="$OPTS --enable-opengl-vsync" |
253 | %else | |
254 | OPTS="$OPTS --disable-opengl-vsync" | |
255 | %endif | |
256 | ||
257 | # Enable lirc support (or make sure it's disabled) | |
910a00e3 | 258 | %if %{with lirc} |
8afae0cb ER |
259 | OPTS="$OPTS --enable-lirc" |
260 | %else | |
261 | OPTS="$OPTS --disable-lirc" | |
262 | %endif | |
263 | ||
264 | ||
265 | # Finally, actually configure | |
266 | ||
267 | %configure \ | |
8afae0cb ER |
268 | --compile-type=%{compile_type} \ |
269 | --disable-audio-jack \ | |
270 | --enable-dvb \ | |
271 | --dvb-path=%{_builddir}/%{name}-%{version}/%{linuxtv_dvb_package}/linux/include/ \ | |
272 | $OPTS | |
273 | # --disable-joystick-menu \ | |
274 | # --disable-firewire \ | |
275 | # --disable-ivtv \ | |
276 | # --enable-dvb-eit \ | |
277 | ||
278 | # MythTV doesn't support parallel builds | |
279 | qmake mythtv.pro | |
910a00e3 | 280 | %{__make} %{?_smp_mflags} |
8afae0cb ER |
281 | |
282 | # We don't want rpm to add perl requirements to anything in contrib | |
283 | find contrib -type f | xargs -r chmod a-x | |
284 | ||
285 | %install | |
286 | rm -rf $RPM_BUILD_ROOT | |
910a00e3 | 287 | %{__make} install INSTALL_ROOT=$RPM_BUILD_ROOT |
8afae0cb ER |
288 | |
289 | # Install the files that we added on top of mythtv's own stuff | |
910a00e3 ER |
290 | install -pD mythbackend.init $RPM_BUILD_ROOT%{_initrddir}/mythbackend |
291 | install -pD mythbackend.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/mythbackend | |
292 | install -pD mythbackend.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend | |
8afae0cb ER |
293 | |
294 | # Desktop entries | |
295 | #mkdir -p %{buildroot}%{_datadir}/pixmaps | |
296 | #mkdir -p %{buildroot}%{_datadir}/applications | |
297 | #for file in %{desktop_applications}; do | |
298 | # install -p %{_sourcedir}/$file.png %{buildroot}%{_datadir}/pixmaps/$file.png | |
299 | # desktop-file-install --vendor %{desktop_vendor} \ | |
300 | # --dir %{buildroot}%{_datadir}/applications \ | |
301 | # --add-category X-Red-Hat-Extra \ | |
302 | # --add-category Application \ | |
303 | # --add-category AudioVideo \ | |
304 | # %{_sourcedir}/$file.desktop | |
305 | #done | |
306 | ||
307 | # Various utility directories that we want rpm to keep track of mythtv ownership | |
910a00e3 ER |
308 | install -d $RPM_BUILD_ROOT/var/lib/mythtv |
309 | install -d $RPM_BUILD_ROOT/var/lib/cache/mythtv | |
310 | install -d $RPM_BUILD_ROOT%{_localstatedir}/log/mythtv | |
311 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d | |
312 | install -d $RPM_BUILD_ROOT%{_initrddir} | |
313 | install -d $RPM_BUILD_ROOT%{_sysconfdir} | |
8afae0cb ER |
314 | |
315 | # Create the plugins directory, so rpm can know mythtv owns it | |
910a00e3 | 316 | install -d $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins |
8afae0cb ER |
317 | |
318 | # Install settings.pro so people can see the build options we used | |
319 | install -pD settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build/settings.pro | |
320 | ||
321 | %clean | |
322 | rm -rf $RPM_BUILD_ROOT | |
323 | ||
324 | # ldconfig's for packages that install %{_libdir}/*.so.* | |
325 | # -> Don't forget Requires(post) and Requires(postun): /sbin/ldconfig | |
326 | # ...and install-info's for ones that install %{_infodir}/*.info* | |
327 | # -> Don't forget Requires(post) and Requires(preun): /sbin/install-info | |
328 | ||
910a00e3 ER |
329 | %post -p /sbin/ldconfig |
330 | %postun -p /sbin/ldconfig | |
8afae0cb ER |
331 | |
332 | %files | |
910a00e3 | 333 | %defattr(644,root,root,755) |
8afae0cb ER |
334 | %doc README* UPGRADING AUTHORS COPYING FAQ |
335 | %doc database keys.txt | |
336 | %doc docs contrib configfiles | |
337 | ||
338 | %files backend | |
910a00e3 ER |
339 | %defattr(644,root,root,755) |
340 | %attr(755,root,root) %{_bindir}/mythbackend | |
341 | %attr(755,root,root) %{_bindir}/mythfilldatabase | |
342 | %attr(755,root,root) %{_bindir}/mythjobqueue | |
343 | %attr(-,mythtv,mythtv) %dir /var/lib/mythtv | |
344 | %attr(-,mythtv,mythtv) %dir /var/lib/cache/mythtv | |
345 | %{_initrddir}/mythbackend | |
346 | %config %{_sysconfdir}/mythbackend | |
347 | %config /etc/logrotate.d/mythbackend | |
348 | %attr(-,mythtv,mythtv) %dir %{_localstatedir}/log/mythtv | |
8afae0cb ER |
349 | |
350 | %files setup | |
910a00e3 ER |
351 | %defattr(644,root,root,755) |
352 | %attr(755,root,root) %{_bindir}/mythtv-setup | |
8afae0cb ER |
353 | |
354 | %files frontend | |
910a00e3 | 355 | %defattr(644,root,root,755) |
8afae0cb | 356 | %{_datadir}/mythtv/*.xml |
910a00e3 ER |
357 | %attr(755,root,root) %{_bindir}/mythfrontend |
358 | %attr(755,root,root) %{_bindir}/mythtv | |
359 | %attr(755,root,root) %{_bindir}/mythepg | |
360 | %attr(755,root,root) %{_bindir}/mythprogfind | |
361 | %attr(755,root,root) %{_bindir}/mythcommflag | |
362 | %attr(755,root,root) %{_bindir}/mythtranscode | |
363 | %attr(755,root,root) %{_bindir}/mythtvosd | |
8afae0cb ER |
364 | %{_libdir}/mythtv/filters |
365 | %{_libdir}/mythtv/plugins | |
366 | %{_datadir}/mythtv/*.ttf | |
367 | %{_datadir}/mythtv/i18n | |
368 | #%{_datadir}/applications/*myth*.desktop | |
369 | #%{_datadir}/pixmaps/myth*.png | |
370 | ||
371 | %files themes | |
910a00e3 | 372 | %defattr(644,root,root,755) |
8afae0cb ER |
373 | %{_datadir}/mythtv/themes |
374 | ||
375 | %files -n libmyth | |
910a00e3 ER |
376 | %defattr(644,root,root,755) |
377 | %attr(755,root,root) %{_libdir}/*.so.* | |
8afae0cb ER |
378 | |
379 | %files -n libmyth-devel | |
910a00e3 | 380 | %defattr(644,root,root,755) |
8afae0cb | 381 | %{_includedir}/* |
910a00e3 | 382 | %attr(755,root,root) %{_libdir}/*.so |
8afae0cb ER |
383 | %{_libdir}/*.a |
384 | %{_datadir}/mythtv/build/settings.pro |