]>
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 | |
17 | %define with_lirc %{?_without_lirc: 0}%{!?_without_lirc: 1} | |
18 | %define with_alsa %{?_without_alsa: 0}%{!?_without_alsa: 1} | |
19 | %define with_oss %{?_without_oss: 0}%{!?_without_oss: 1} | |
20 | %define with_opengl_vsync %{?_with_opengl_vsync: 1}%{!?_with_opengl_vsync: 0} | |
21 | %define with_arts %{?_with_arts: 1}%{!?_with_arts: 0} | |
22 | %define with_xvmc %{?_with_xvmc: 1}%{!?_with_xvmc: 0} | |
23 | ||
24 | Name: mythtv | |
25 | Version: 0.18 | |
26 | Release: 0.20050326.snapshot | |
27 | Summary: A personal video recorder (PVR) application. | |
28 | ||
29 | Group: Applications/Multimedia | |
30 | License: GPL2 | |
31 | URL: http://www.mythtv.org/ | |
32 | ||
33 | Source0: %{name}-%{version}.tar.bz2 | |
34 | Source1: mythbackend.sysconfig.in | |
35 | Source2: mythbackend.init.in | |
36 | Source3: mythbackend.logrotate.in | |
37 | Source12: http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2 | |
38 | ||
39 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
40 | ||
41 | ExclusiveArch: i386 i686 athlon x86_64 | |
42 | ||
43 | BuildRequires: gcc-c++ | |
44 | BuildRequires: XFree86-devel | |
45 | BuildRequires: freetype-devel >= 2 | |
46 | BuildRequires: lame-devel | |
47 | BuildRequires: qt-devel >= 3 | |
48 | BuildRequires: mysql-devel | |
49 | BuildRequires: desktop-file-utils | |
50 | ||
51 | %if %{with_alsa} | |
52 | BuildRequires: alsa-lib-devel | |
53 | %endif | |
54 | ||
55 | %if %{with_lirc} | |
56 | BuildRequires: lirc-lib-devel | |
57 | %endif | |
58 | ||
59 | %if %{with_arts} | |
60 | BuildRequires: arts-devel | |
61 | %endif | |
62 | ||
63 | %if %{with_xvmc} | |
64 | BuildRequires: nvidia-graphics-devel | |
65 | %endif | |
66 | ||
67 | #%if %{with_opengl_vsync} | |
68 | #BuildRequires: nvidia-graphics-devel | |
69 | #%endif | |
70 | ||
71 | %description | |
72 | MythTV implements the following PVR features, and more, with a | |
73 | unified graphical interface: | |
74 | ||
75 | - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV. | |
76 | - Video compression using RTjpeg or MPEG-4 | |
77 | - Program listing retrieval using XMLTV | |
78 | - Themable, semi-transparent on-screen display | |
79 | - Electronic program guide | |
80 | - Scheduled recording of TV programs | |
81 | - Resolution of conflicts between scheduled recordings | |
82 | - Basic video editing | |
83 | ||
84 | %package -n libmyth | |
85 | Summary: Library providing mythtv support. | |
86 | Group: System Environment/Libraries | |
87 | Requires: freetype >= 2 | |
88 | Requires: lame | |
89 | Requires: qt >= 3 | |
90 | Requires: qt-MySQL | |
91 | ||
92 | %description -n libmyth | |
93 | Common library code for MythTV and add-on modules (development) | |
94 | MythTV provides a unified graphical interface for recording and viewing | |
95 | television programs. Refer to the mythtv package for more information. | |
96 | ||
97 | %package -n libmyth-devel | |
98 | Summary: Development files for libmyth. | |
99 | Group: Development/Libraries | |
100 | Requires: libmyth = %{version} | |
101 | BuildRequires: freetype-devel >= 2 | |
102 | BuildRequires: lame-devel | |
103 | BuildRequires: qt-devel >= 3 | |
104 | BuildRequires: mysql-devel | |
105 | BuildRequires: directfb-devel | |
106 | %if %{with_alsa} | |
107 | BuildRequires: alsa-lib-devel | |
108 | %endif | |
109 | %if %{with_lirc} | |
110 | BuildRequires: lirc-lib-devel | |
111 | %endif | |
112 | %if %{with_arts} | |
113 | BuildRequires: arts-devel | |
114 | %endif | |
115 | ||
116 | %description -n libmyth-devel | |
117 | This package contains the header files and libraries for developing | |
118 | add-ons for mythtv. | |
119 | ||
120 | %package themes | |
121 | Summary: Base themes for mythtv's frontend. | |
122 | Group: Applications/Multimedia | |
123 | Obsoletes: mythtv-theme-Titivillus | |
124 | ||
125 | %description themes | |
126 | MythTV provides a unified graphical interface for recording and viewing | |
127 | television programs. Refer to the mythtv package for more information. | |
128 | ||
129 | This package contains only the base themes used by the frontend and | |
130 | mythtvsetup. | |
131 | ||
132 | %package frontend | |
133 | Summary: Client component of mythtv (a PVR). | |
134 | Group: Applications/Multimedia | |
135 | Requires: mythtv = %{version} | |
136 | Requires: mythtv-themes = %{version} | |
137 | Provides: mythtv-frontend-api = %(echo %{version} | awk -F. '{print $1 "." $2}') | |
138 | ||
139 | %description frontend | |
140 | MythTV provides a unified graphical interface for recording and viewing | |
141 | television programs. Refer to the mythtv package for more information. | |
142 | ||
143 | This package contains only the client software, which provides a | |
144 | front-end for playback and configuration. It requires access to a | |
145 | mythtv-backend installation, either on the same system or one | |
146 | reachable via the network. | |
147 | ||
148 | %package backend | |
149 | Summary: Server component of mythtv (a PVR). | |
150 | Group: A pplications/Multimedia | |
151 | Conflicts: xmltv-grabbers < 0.5.34 | |
152 | Requires: mythtv = %{version} | |
153 | ||
154 | %description backend | |
155 | MythTV provides a unified graphical interface for recording and viewing | |
156 | television programs. Refer to the mythtv package for more information. | |
157 | ||
158 | This package contains only the server software, which provides video | |
159 | and audio capture and encoding services. In order to be useful, it | |
160 | requires a mythtv-frontend installation, either on the same system or | |
161 | one reachable via the network. | |
162 | ||
163 | %package setup | |
164 | Summary: Setup the mythtv backend. | |
165 | Group: Applications/Multimedia | |
166 | Requires: mythtv-backend = %{version} | |
167 | Requires: mythtv-themes = %{version} | |
168 | Provides: mythtvsetup | |
169 | ||
170 | %description setup | |
171 | MythTV provides a unified graphical interface for recording and viewing | |
172 | television programs. Refer to the mythtv package for more information. | |
173 | ||
174 | This package contains only the setup software for configuring the | |
175 | mythtv backend. | |
176 | ||
177 | %prep | |
178 | %setup -q -a 12 | |
179 | ||
180 | # Install these files that MythTV doesn't include, | |
181 | # and update them with the paths set by rpmbuild. | |
182 | cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} . | |
183 | for file in mythbackend.init \ | |
184 | mythbackend.sysconfig \ | |
185 | mythbackend.logrotate; do | |
186 | sed -e's|@logdir@|%{_logdir}|g' \ | |
187 | -e's|@rundir@|%{_rundir}|g' \ | |
188 | -e's|@sysconfigdir@|%{_sysconfigdir}|g' \ | |
189 | -e's|@initdir@|%{_initdir}|g' \ | |
190 | -e's|@bindir@|%{_bindir}|g' \ | |
191 | -e's|@sbindir@|%{_sbindir}|g' \ | |
192 | -e's|@subsysdir@|%{_subsysdir}|g' \ | |
193 | -e's|@varlibdir@|%{_varlibdir}|g' \ | |
194 | -e's|@varcachedir@|%{_varcachedir}|g' \ | |
195 | -e's|@logrotatedir@|%{_logrotatedir}|g' \ | |
196 | < $file.in > $file | |
197 | done | |
198 | ||
199 | %build | |
200 | [ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh | |
201 | ||
202 | # Initialize the options string | |
203 | OPTS="" | |
204 | ||
205 | # Tune for the various processor types? | |
206 | %if %{?_with_cpu_autodetect:0}%{!?_with_cpu_autodetect:1} | |
207 | %ifarch i386 | |
208 | OPTS="$OPTS --cpu=i386 --tune=pentium4 --enable-mmx" | |
209 | %endif | |
210 | %ifarch i686 | |
211 | OPTS="$OPTS --cpu=i686 --tune=pentium4 --enable-mmx" | |
212 | %endif | |
213 | %ifarch athlon | |
214 | OPTS="$OPTS --arch=athlon" | |
215 | %endif | |
216 | %ifarch x86_64 | |
217 | OPTS="$OPTS --arch=x86_64" | |
218 | %endif | |
219 | %endif | |
220 | ||
221 | # Enable arts support (or make sure it's disabled) | |
222 | %if %{with_arts} | |
223 | OPTS="$OPTS --enable-audio-arts" | |
224 | %else | |
225 | OPTS="$OPTS --disable-audio-arts" | |
226 | %endif | |
227 | ||
228 | # Enable alsa support (or make sure it's disabled) | |
229 | %if %{with_alsa} | |
230 | OPTS="$OPTS --enable-audio-alsa" | |
231 | %else | |
232 | OPTS="$OPTS --disable-audio-alsa" | |
233 | %endif | |
234 | ||
235 | # Enable oss support (or make sure it's disabled) | |
236 | %if %{with_oss} | |
237 | OPTS="$OPTS --enable-audio-oss" | |
238 | %else | |
239 | OPTS="$OPTS --disable-audio-oss" | |
240 | %endif | |
241 | ||
242 | # Enable xvmc support (or make sure it's disabled) | |
243 | %if %{with_xvmc} | |
244 | OPTS="$OPTS --enable-xvmc --enable-xvmc-vld" | |
245 | %else | |
246 | OPTS="$OPTS --disable-xvmc --disable-xvmc-vld" | |
247 | %endif | |
248 | ||
249 | # Enable opengl-vsync support (or make sure it's disabled) | |
250 | %if %{with_opengl_vsync} | |
251 | OPTS="$OPTS --enable-opengl-vsync" | |
252 | %else | |
253 | OPTS="$OPTS --disable-opengl-vsync" | |
254 | %endif | |
255 | ||
256 | # Enable lirc support (or make sure it's disabled) | |
257 | %if %{with_lirc} | |
258 | OPTS="$OPTS --enable-lirc" | |
259 | %else | |
260 | OPTS="$OPTS --disable-lirc" | |
261 | %endif | |
262 | ||
263 | ||
264 | # Finally, actually configure | |
265 | ||
266 | %configure \ | |
267 | --prefix=%{_prefix} \ | |
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 | |
280 | make %{?_smp_mflags} | |
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 | |
287 | make install INSTALL_ROOT=$RPM_BUILD_ROOT | |
288 | ||
289 | # Install the files that we added on top of mythtv's own stuff | |
290 | install -pD mythbackend.init $RPM_BUILD_ROOT%{_initdir}/mythbackend | |
291 | install -pD mythbackend.sysconfig $RPM_BUILD_ROOT%{_sysconfigdir}/mythbackend | |
292 | install -pD mythbackend.logrotate $RPM_BUILD_ROOT%{_logrotatedir}/mythbackend | |
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 | |
308 | mkdir -p $RPM_BUILD_ROOT%{_varlibdir}/mythtv | |
309 | mkdir -p $RPM_BUILD_ROOT%{_varcachedir}/mythtv | |
310 | mkdir -p $RPM_BUILD_ROOT%{_logdir}/mythtv | |
311 | mkdir -p $RPM_BUILD_ROOT%{_logrotatedir} | |
312 | mkdir -p $RPM_BUILD_ROOT%{_initdir} | |
313 | mkdir -p $RPM_BUILD_ROOT%{_sysconfigdir} | |
314 | ||
315 | # Create the plugins directory, so rpm can know mythtv owns it | |
316 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins | |
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 | ||
329 | %post | |
330 | /sbin/ldconfig | |
331 | ||
332 | %postun -p /sbin/ldconfig | |
333 | ||
334 | %files | |
335 | %defattr(-,root,root,-) | |
336 | %doc README* UPGRADING AUTHORS COPYING FAQ | |
337 | %doc database keys.txt | |
338 | %doc docs contrib configfiles | |
339 | ||
340 | %files backend | |
341 | %defattr(-,root,root,-) | |
342 | %{_bindir}/mythbackend | |
343 | %{_bindir}/mythfilldatabase | |
344 | %{_bindir}/mythjobqueue | |
345 | %attr(-,mythtv,mythtv) %dir %{_varlibdir}/mythtv | |
346 | %attr(-,mythtv,mythtv) %dir %{_varcachedir}/mythtv | |
347 | %{_initdir}/mythbackend | |
348 | %config %{_sysconfigdir}/mythbackend | |
349 | %config %{_logrotatedir}/mythbackend | |
350 | %attr(-,mythtv,mythtv) %dir %{_logdir}/mythtv | |
351 | ||
352 | %files setup | |
353 | %defattr(-,root,root,-) | |
354 | %{_bindir}/mythtv-setup | |
355 | ||
356 | %files frontend | |
357 | %defattr(-,root,root,-) | |
358 | %{_datadir}/mythtv/*.xml | |
359 | %{_bindir}/mythfrontend | |
360 | %{_bindir}/mythtv | |
361 | %{_bindir}/mythepg | |
362 | %{_bindir}/mythprogfind | |
363 | %{_bindir}/mythcommflag | |
364 | %{_bindir}/mythtranscode | |
365 | %{_bindir}/mythtvosd | |
366 | %{_libdir}/mythtv/filters | |
367 | %{_libdir}/mythtv/plugins | |
368 | %{_datadir}/mythtv/*.ttf | |
369 | %{_datadir}/mythtv/i18n | |
370 | #%{_datadir}/applications/*myth*.desktop | |
371 | #%{_datadir}/pixmaps/myth*.png | |
372 | ||
373 | %files themes | |
374 | %defattr(-,root,root,-) | |
375 | %{_datadir}/mythtv/themes | |
376 | ||
377 | %files -n libmyth | |
378 | %defattr(-,root,root,-) | |
379 | %{_libdir}/*.so.* | |
380 | ||
381 | %files -n libmyth-devel | |
382 | %defattr(-,root,root,-) | |
383 | %{_includedir}/* | |
384 | %{_libdir}/*.so | |
385 | %{_libdir}/*.a | |
386 | %{_datadir}/mythtv/build/settings.pro | |
387 | ||
388 | ||
389 | %changelog | |
390 | ||
391 | * Sat Mar 26 2005 Chris Petersen <rpm@forevermore.net> - 0.18-0.20050326.snapshot | |
392 | - Finished first revision of new specfile according to new Fedora guidelines. | |
393 | - Some portions of this file are based on Axel Thimm's mythtv spec, which was | |
394 | - made incompatible by updates to mythtv's build process. |