2 # - bconds: altivec joystick lcd
3 # - lcd? (app-misc/lcdproc)
4 # - icons for desktop entries
5 # - alpha, sparc, ppc arches?
9 # MythTV now uses a fairly intelligent cpu-detection script, so if you are
10 # building an rpm by hand on the machine it will be used on, I encourage you
11 # to use "--with cpu_autodetect" to let mythtv decide for you.
14 %bcond_with cpu_autodetect # enable CPU autodetection at compile time (sets "-march", "-mcpu" compile flags really)
15 %bcond_without lirc # lirc support
16 %bcond_without alsa # alsa support
17 %bcond_without oss # oss support
18 %bcond_without arts # arts support
19 %bcond_without jack # jack audio connection kit
20 %bcond_with oggvorbis # ogg vorbis (gone?!)
21 %bcond_without opengl # opengl vsync
22 %bcond_without dvb # DVB support
23 %bcond_without xrandr # disable X11 resolution switching
24 %bcond_with ivtv # ivtv support (PVR-250, PVR-350) NFY
25 %bcond_with firewire # ieee1394 (NFY)
26 %bcond_without xvmc # do not use XvMCW
27 %bcond_with mmx # enable mmx
28 %bcond_with sc # softCAM support(requires/is_from sasc package)
30 # enable mmx automatically on arches having it
31 %ifarch %{ix86} %{x8664}
32 %ifnarch i386 i486 i586 i686
37 Summary: A personal video recorder (PVR) application
38 Summary(pl): Osobista aplikacja do nagrywania obrazu (PVR)
43 Group: Applications/Multimedia
44 Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
45 # Source0-md5: ebba5829d264bb4de2f75cae936141f4
46 Source1: mythbackend.sysconfig
47 Source2: mythbackend.init
48 Source3: mythbackend.logrotate
49 Source5: mythfrontend.desktop
50 Patch0: %{name}-lib64.patch
51 Patch1: %{name}-x86_64-configure.patch
52 Patch2: %{name}-mythstream.patch
53 Patch3: %{name}-ldconfig.patch
54 Patch4: %{name}-pl.patch
55 Patch5: %{name}-sbinpath.patch
56 Patch6: %{name}-ticket-1310.patch
57 Patch7: %{name}-optflags.patch
58 Patch8: %{name}-branch.diff
59 #Patch9-18 are from sasc.spec
60 Patch9: myth_sasc-base_r10247.diff
61 Patch10: myth_softcsa_r10247.diff
62 Patch11: myth_legacy-switch_r10247.diff
63 Patch12: myth_datadirect-dn_r10247.diff
64 Patch13: myth_dn-eit_r10247.diff
65 Patch14: myth_eit-cache_r10247.diff
66 Patch15: myth_eit-ratelimit_r10247.diff
67 Patch16: myth_eit-fasthuff_r10247.diff
68 Patch17: myth_eit-bev-dn_r10247.diff
69 Patch18: myth_patpmt_r10247.diff
70 URL: http://www.mythtv.org/
71 #BuildRequires: DirectFB-devel
72 BuildRequires: XFree86-devel
73 %{?with_alsa:BuildRequires: alsa-lib-devel}
74 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
75 BuildRequires: freetype-devel >= 1:2.0.0
76 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
77 BuildRequires: lame-libs-devel
78 %{?with_xvmc:BuildRequires: libXvMCW-devel}
79 %{?with_firewire:BuildRequires: libavc1394-devel}
80 %{?with_dvb:BuildRequires: libdvb-devel}
81 BuildRequires: libdvdnav-devel
82 %{?with_firewire:BuildRequires: libiec61883-devel}
83 %{?with_firewire:BuildRequires: libraw1394-devel}
84 %{?with_oggvorbis:BuildRequires: libvorbis-devel}
85 BuildRequires: linux-libc-headers >= 7:2.6.10
86 %{?with_lirc:BuildRequires: lirc-devel}
87 BuildRequires: mysql-devel
88 BuildRequires: patchutils
89 BuildRequires: qmake >= 6:3.2.1-4
90 BuildRequires: qt-devel >= 6:3.2.1-4
91 BuildRequires: rpmbuild(macros) >= 1.228
92 BuildRequires: sed >= 4.0
93 # for bundled libavcodec
94 BuildRequires: libdts-devel
95 #BuildConflicts: libmyth-devel
96 ExclusiveArch: %{ix86} %{x8664} ppc
97 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
102 MythTV implements the following PVR features, and more, with a unified
104 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
105 - Video compression using RTjpeg or MPEG-4
106 - Program listing retrieval using XMLTV
107 - Themable, semi-transparent on-screen display
108 - Electronic program guide
109 - Scheduled recording of TV programs
110 - Resolution of conflicts between scheduled recordings
111 - Basic video editing
114 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
115 ujednoliconym interfejsem graficznym:
116 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
117 przewijanie "¿ywej" telewizji
118 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
119 - odczyt listy programów przy u¿yciu XMLTV
120 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
121 - elektroniczny przewodnik po programie
122 - planowane nagrywanie programów telewizyjnych
123 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
124 - podstawowa edycja obrazu
127 Summary: Server component of mythtv (a PVR)
128 Summary(pl): Czê¶æ serwerowa mythtv (PVR)
129 Group: Applications/Multimedia
130 Requires(post,preun): /sbin/chkconfig
131 Requires(postun): /usr/sbin/groupdel
132 Requires(postun): /usr/sbin/userdel
133 Requires(pre): /bin/id
134 Requires(pre): /usr/bin/getgid
135 Requires(pre): /usr/sbin/groupadd
136 Requires(pre): /usr/sbin/useradd
137 Requires: libmyth = %{version}-%{release}
138 Requires: mythtv = %{version}-%{release}
139 Provides: group(mythtv)
140 Provides: user(mythtv)
143 MythTV provides a unified graphical interface for recording and
144 viewing television programs. Refer to the mythtv package for more
147 This package contains only the server software, which provides video
148 and audio capture and encoding services. In order to be useful, it
149 requires a mythtv-frontend installation, either on the same system or
150 one reachable via the network.
152 %description backend -l pl
153 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
154 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
157 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
158 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
159 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
160 albo innym osi±galnym po sieci.
163 Summary: Client component of mythtv (a PVR)
164 Summary(pl): Czê¶æ kliencka mythtv (PVR)
165 Group: Applications/Multimedia
166 Requires: libmyth = %{version}-%{release}
167 Requires: mythtv = %{version}-%{release}
168 Requires: mythtv-themes = %{version}-%{release}
169 Provides: mythtv-frontend-api = %{myth_api_version}
171 %description frontend
172 MythTV provides a unified graphical interface for recording and
173 viewing television programs. Refer to the mythtv package for more
176 This package contains only the client software, which provides a
177 front-end for playback and configuration. It requires access to a
178 mythtv-backend installation, either on the same system or one
179 reachable via the network.
181 %description frontend -l pl
182 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
183 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
186 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczaj±ce
187 frontend do odtwarzania i konfiguracji. Wymaga dostêpu do instalacji
188 mythtv-backend - na tym samym systemie, albo innym osi±galnym po
192 Summary: Setup the mythtv backend
193 Summary(pl): Konfigurator backendu mythtv
194 Group: Applications/Multimedia
195 Requires: libmyth = %{version}-%{release}
198 MythTV provides a unified graphical interface for recording and
199 viewing television programs. Refer to the mythtv package for more
202 This package contains only the setup software for configuring the
205 %description setup -l pl
206 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
207 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
210 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
213 Summary: Base themes for mythtv's frontend
214 Summary(pl): Podstawowe motywy dla frontendu mythtv
215 Group: Applications/Multimedia
218 MythTV provides a unified graphical interface for recording and
219 viewing television programs. Refer to the mythtv package for more
222 This package contains only the base themes used by the frontend and
225 %description themes -l pl
226 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
227 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
230 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
234 Summary: Library providing mythtv support
235 Summary(pl): Biblioteka udostêpniaj±ca obs³ugê mythtv
237 Requires: freetype >= 1:2.0.0
239 Requires: qt >= 6:3.2.1-4
240 Requires: qt-plugin-mysql >= 6:3.2.1-4
242 %description -n libmyth
243 Common library code for MythTV and add-on modules (development) MythTV
244 provides a unified graphical interface for recording and viewing
245 television programs. Refer to the mythtv package for more information.
247 %description -n libmyth -l pl
248 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
249 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
250 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
253 %package -n libmyth-devel
254 Summary: Development files for libmyth
255 Summary(pl): Pliki nag³ówkowe libmyth
256 Group: Development/Libraries
257 Requires: libmyth = %{version}-%{release}
259 %description -n libmyth-devel
260 This package contains the header files for developing add-ons for
263 %description -n libmyth-devel -l pl
264 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
266 %package -n libmyth-static
267 Summary: Static libmyth library
268 Summary(pl): Statyczna biblioteka libmyth
269 Group: Development/Libraries
270 Requires: libmyth-devel = %{version}-%{release}
272 %description -n libmyth-static
273 Static libmyth library.
275 %description -n libmyth-static -l pl
276 Statyczna biblioteka libmyth.
279 %setup -q %{?_rev:-n %{name}}
302 filterdiff -i 'mythtv/*' %{PATCH8} | %{__patch} -p1 -s
304 rm -rf database/old # not supported in PLD
306 # lib64 fix - enable to update patch
307 %if %{_lib} != "lib" && 0
308 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
309 xargs grep -l /lib . | xargs sed -i -e '
310 s,/''usr/lib/,/%{_libdir}/,g
311 s,/''lib/mythtv,/%{_lib}/mythtv,g
312 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
318 %if %{with cpu_autodetect}
319 # Make sure we have /proc mounted
320 if [ ! -r /proc/cpuinfo ]; then
321 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
325 export QTDIR="%{_prefix}"
327 %if "%{_lib}" != "lib"
328 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
329 # help configure::has_library() to locate libs
330 export LD_LIBRARY_PATH=%{_libdir}
333 # NB: not autoconf configure
335 export CXX="%{__cxx}"
337 --prefix=%{_prefix} \
338 --libdir=%{_libdir} \
339 --mandir=%{_mandir} \
341 --disable-distcc --disable-ccache \
342 --compile-type=%{?debug:debug}%{!?debug:release} \
343 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
344 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
345 %if %{with cpu_autodetect}
352 --cpu=i386 --tune=pentium4 \
358 %{?with_mmx:--enable-mmx} \
360 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
361 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
362 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
363 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
364 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
365 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
366 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
367 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
368 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
369 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
373 # --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
374 # --disable-joystick-menu \
376 # --enable-directfb enable DirectFB (Linux non-X11 video)
377 # --enable-directx enable DirectX (Microsoft video)
383 rm -rf $RPM_BUILD_ROOT
384 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
385 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
386 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
387 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
389 export QTDIR="%{_prefix}"
391 INSTALL_ROOT=$RPM_BUILD_ROOT
393 # Install the files that we added on top of mythtv's own stuff
394 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
395 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
396 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
399 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
401 # Install settings.pro so people can see the build options we used
402 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
403 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
405 for p in mythfrontend; do
406 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
407 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
411 # glibc language codes. attempt was made to change it on libmyth side,
412 # but that was just asking for trouble due large coverage of
413 # language.lower() usage.
415 s,%%lang(en_gb),%%lang(en_GB),
416 s,%%lang(zh_tw),%%lang(zh_TW),
417 s,%%lang(pt_br),%%lang(pt_BR),
420 rm -rf mythtvosd mythwelcome mythlcdserver
421 install -d mythtvosd mythwelcome
422 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
423 cp -a programs/mythwelcome/README mythwelcome
424 cp -a programs/mythlcdserver/README mythlcdserver
427 rm -rf $RPM_BUILD_ROOT
430 %groupadd -g 149 %{name}
431 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
432 %addusertogroup %{name} video
433 %addusertogroup %{name} audio
436 /sbin/chkconfig --add mythbackend
439 if [ "$1" = "0" ]; then
440 %service -q mythbackend stop
441 /sbin/chkconfig --del mythbackend
445 if [ "$1" = "0" ]; then
450 %post -n libmyth -p /sbin/ldconfig
451 %postun -n libmyth -p /sbin/ldconfig
454 if [ "$1" = 1 ]; then
455 %banner -e %{name}-setup <<EOF
456 To grant mysql permissions to mythtv, please run
457 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
462 %defattr(644,root,root,755)
463 %doc README* UPGRADING AUTHORS FAQ
464 %doc docs contrib configfiles
465 %doc keys.txt mythtvosd mythwelcome mythlcdserver
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_sbindir}/mythbackend
470 %attr(755,root,root) %{_sbindir}/mythcommflag
471 %attr(755,root,root) %{_bindir}/mythfilldatabase
472 %attr(755,root,root) %{_sbindir}/mythjobqueue
473 %attr(755,root,root) %{_sbindir}/mythlcdserver
474 %attr(755,root,root) %{_bindir}/mythtranscode
475 %attr(775,root,mythtv) %dir /var/lib/mythtv
476 %attr(775,root,mythtv) %dir /var/cache/mythtv
477 %attr(775,root,mythtv) %dir /var/run/mythtv
478 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
479 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
480 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
481 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
483 %files frontend -f mythfrontend.lang
484 %defattr(644,root,root,755)
485 %attr(755,root,root) %{_bindir}/mythfrontend
486 %attr(755,root,root) %{_bindir}/mythshutdown
487 %attr(755,root,root) %{_bindir}/mythtv
488 %attr(755,root,root) %{_bindir}/mythtvosd
489 %attr(755,root,root) %{_bindir}/mythwelcome
490 %dir %{_datadir}/mythtv
491 %dir %{_libdir}/mythtv
492 %{_datadir}/mythtv/*.xml
493 %dir %{_libdir}/mythtv/filters
494 %dir %{_libdir}/mythtv/plugins
495 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
496 %{_datadir}/mythtv/*.ttf
497 %dir %{_datadir}/mythtv/i18n
498 %{_desktopdir}/*.desktop
501 %defattr(644,root,root,755)
503 %attr(755,root,root) %{_bindir}/mythtv-setup
506 %defattr(644,root,root,755)
507 %{_datadir}/mythtv/themes
510 %defattr(644,root,root,755)
511 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
513 %files -n libmyth-devel
514 %defattr(644,root,root,755)
515 %attr(755,root,root) %{_libdir}/*.so
517 %{_datadir}/mythtv/build
519 %files -n libmyth-static
520 %defattr(644,root,root,755)