2 # - bconds: altivec joystick lcd
3 # - lcd? (app-misc/lcdproc)
4 # - alpha, sparc, ppc arches?
5 # - http://outflux.net/software/pkgs/mythtvfs-fuse/
6 # - vaapi support - check for compatible versions of libva?
10 # MythTV now uses a fairly intelligent cpu-detection script, so if you are
11 # building an rpm by hand on the machine it will be used on, I encourage you
12 # to use "--with cpu_autodetect" to let mythtv decide for you.
15 %bcond_with cpu_autodetect # enable CPU autodetection at compile time (sets "-march", "-mcpu" compile flags really)
16 %bcond_without lirc # lirc support
17 %bcond_without alsa # alsa support
18 %bcond_without oss # oss support
19 %bcond_without jack # jack audio connection kit
20 %bcond_without pulseaudio # pulseaudio support
21 %bcond_without opengl # opengl vsync
22 %bcond_without dvb # DVB support
23 %bcond_without xrandr # disable X11 resolution switching
24 %bcond_without ivtv # ivtv support (PVR-250, PVR-350) NFY
26 %bcond_without firewire # ieee1394 (NFY)
27 %bcond_without xvmc # do not use XvMCW
28 %bcond_without vdpau # disable nvidia vdpau support
29 %bcond_without fftw3 # disable fftw3 support
30 %bcond_with mmx # enable MMX
31 %bcond_without nellymoserdec
32 %bcond_with vaapi # enable vaapi
33 %bcond_with dshowserver # enable directshow codecs server
35 %bcond_with nvidia_headers # build vdpau support with nvidia headers
38 # enable mmx automatically on arches having it
39 %ifarch %{ix86} %{x8664}
40 %ifnarch i386 i486 i586 i686
45 # dshowserver is exclusive arch for x86 x86_64 only
46 %ifnarch %{ix86} %{x8664}
47 %undefine with_dshowserver
50 Summary: A personal video recorder (PVR) application
51 Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR)
56 Group: Applications/Multimedia
57 Source0: ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}.tar.bz2
58 # Source0-md5: 3379a5fd12ae866cd10c5b5d23439898
59 Source1: mythbackend.sysconfig
60 Source2: mythbackend.init
61 Source3: mythbackend.logrotate
62 Source5: pld-mythfrontend.desktop
63 # Source5-md5: f37a903ac97463683bebacdf29406951
64 Source6: pld-mythfrontend.png
65 # Source6-md5: bf76bd1463a022e174e4af976a03e678
67 # Source20-md5: 48327772b9e150f69e1ab8ff44b9a76c
68 Patch0: %{name}-configure.patch
69 Patch10: %{name}-sbinpath.patch
70 Patch20: %{name}-compile_fixes_for_qt_4_7.patch
71 Patch30: %{name}-dshowserver-0.22.patch
72 URL: http://www.mythtv.org/
73 BuildRequires: Mesa-libGLU-devel
74 BuildRequires: OpenGL-devel
75 BuildRequires: Qt3Support-devel
76 BuildRequires: QtCore-devel
77 BuildRequires: QtGui-devel
78 BuildRequires: QtNetwork-devel
79 BuildRequires: QtOpenGL-devel
80 BuildRequires: QtScript-devel
81 BuildRequires: QtSql-devel
82 BuildRequires: QtWebKit-devel
83 BuildRequires: QtXml-devel
84 %{?with_alsa:BuildRequires: alsa-lib-devel}
85 BuildRequires: ffmpeg-devel
86 %{?with_fftw3:BuildRequires: fftw3-devel,fftw3-single-devel}
87 BuildRequires: freetype-devel >= 1:2.0.0
88 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
89 BuildRequires: lame-libs-devel
90 %{?with_firewire:BuildRequires: libavc1394-devel}
91 BuildRequires: libdts-devel
92 %{?with_dvb:BuildRequires: libdvb-devel}
93 BuildRequires: libdvdnav-devel
94 %{?with_firewire:BuildRequires: libiec61883-devel}
95 %{?with_firewire:BuildRequires: libraw1394-devel}
96 %{!?with_nvidia_headers:%{?with_vdpau:BuildRequires: libvdpau-devel}}
97 BuildRequires: linux-libc-headers >= 7:2.6.10
98 %{?with_lirc:BuildRequires: lirc-devel}
99 BuildRequires: mysql-devel
100 BuildRequires: perl-devel
101 BuildRequires: perl-tools-pod
102 BuildRequires: pkgconfig
103 %{?with_pulseaudio:BuildRequires: pulseaudio-devel}
104 BuildRequires: python-devel
105 BuildRequires: qt4-build
106 BuildRequires: qt4-qmake
107 BuildRequires: rpm-pythonprov
108 BuildRequires: rpmbuild(macros) >= 1.228
109 BuildRequires: sed >= 4.0
111 %{?with_nvidia_headers:%{?with_vdpau:BuildRequires: xorg-driver-video-nvidia-devel}}
112 BuildRequires: xorg-lib-libXext-devel
113 %{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel}
114 BuildRequires: xorg-lib-libXxf86vm-devel
115 %{!?with_pulseaudio:BuildConflicts: pulseaudio-devel}
116 %{!?with_nvidia_headers:BuildConflicts: xorg-driver-video-nvidia-devel}
118 BuildRequires: perl-ExtUtils-MakeMaker
119 ExclusiveArch: %{ix86} %{x8664} ppc
120 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
122 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
125 MythTV implements the following PVR features, and more, with a unified
127 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
128 - Video compression using RTjpeg or MPEG-4
129 - Program listing retrieval using XMLTV
130 - Themable, semi-transparent on-screen display
131 - Electronic program guide
132 - Scheduled recording of TV programs
133 - Resolution of conflicts between scheduled recordings
134 - Basic video editing
136 %description -l pl.UTF-8
137 MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
138 ujednoliconym interfejsem graficznym:
139 - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie,
140 przewijanie "żywej" telewizji
141 - kompresja obrazu przy użyciu RTjpeg lub MPEG-4
142 - odczyt listy programów przy użyciu XMLTV
143 - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów
144 - elektroniczny przewodnik po programie
145 - planowane nagrywanie programów telewizyjnych
146 - rozwiązywanie konfliktów między planowanymi nagraniami
147 - podstawowa edycja obrazu
150 Summary: Server component of mythtv (a PVR)
151 Summary(pl.UTF-8): Część serwerowa mythtv (PVR)
152 Group: Applications/Multimedia
153 Requires(post,preun): /sbin/chkconfig
154 Requires(postun): /usr/sbin/groupdel
155 Requires(postun): /usr/sbin/userdel
156 Requires(pre): /bin/id
157 Requires(pre): /usr/bin/getgid
158 Requires(pre): /usr/sbin/groupadd
159 Requires(pre): /usr/sbin/useradd
160 Requires: libmyth = %{version}-%{release}
161 Requires: mythtv = %{version}-%{release}
163 Provides: group(mythtv)
164 Provides: user(mythtv)
167 MythTV provides a unified graphical interface for recording and
168 viewing television programs. Refer to the mythtv package for more
171 This package contains only the server software, which provides video
172 and audio capture and encoding services. In order to be useful, it
173 requires a mythtv-frontend installation, either on the same system or
174 one reachable via the network.
176 %description backend -l pl.UTF-8
177 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
178 oglądania programów telewizyjnych. Więcej informacji w pakiecie
181 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
182 usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
183 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
184 albo innym osiągalnym w sieci.
187 Summary: Client component of mythtv (a PVR)
188 Summary(pl.UTF-8): Część kliencka mythtv (PVR)
189 Group: Applications/Multimedia
190 Requires: libmyth = %{version}-%{release}
191 Requires: mythtv = %{version}-%{release}
192 Requires: mythtv-themes = %{version}-%{release}
193 Provides: mythtv-frontend-api = %{myth_api_version}
195 %description frontend
196 MythTV provides a unified graphical interface for recording and
197 viewing television programs. Refer to the mythtv package for more
200 This package contains only the client software, which provides a
201 front-end for playback and configuration. It requires access to a
202 mythtv-backend installation, either on the same system or one
203 reachable via the network.
205 %description frontend -l pl.UTF-8
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 oprogramowanie klienckie, dostarczające
211 frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
212 mythtv-backend - na tym samym systemie, albo innym osiągalnym w sieci.
215 Summary: Setup the mythtv backend
216 Summary(pl.UTF-8): Konfigurator backendu mythtv
217 Group: Applications/Multimedia
218 Requires: libmyth = %{version}-%{release}
221 MythTV provides a unified graphical interface for recording and
222 viewing television programs. Refer to the mythtv package for more
225 This package contains only the setup software for configuring the
228 %description setup -l pl.UTF-8
229 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
230 oglądania programów telewizyjnych. Więcej informacji w pakiecie
233 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
236 Summary: Base themes for mythtv's frontend
237 Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv
239 Requires: %{name}-frontend = %{version}-%{release}
242 MythTV provides a unified graphical interface for recording and
243 viewing television programs. Refer to the mythtv package for more
246 This package contains only the base themes used by the frontend and
249 %description themes -l pl.UTF-8
250 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
251 oglądania programów telewizyjnych. Więcej informacji w pakiecie
254 Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
258 Summary: Library providing mythtv support
259 Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv
261 Requires: QtSql-mysql
262 Requires: freetype >= 1:2.0.0
265 %description -n libmyth
266 Common library code for MythTV and add-on modules (development) MythTV
267 provides a unified graphical interface for recording and viewing
268 television programs. Refer to the mythtv package for more information.
270 %description -n libmyth -l pl.UTF-8
271 Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
272 dostarczający ujednolicony interfejs graficzny do nagrywania i
273 oglądania programów telewizyjnych. Więcej informacji w pakiecie
276 %package -n libmyth-devel
277 Summary: Development files for libmyth
278 Summary(pl.UTF-8): Pliki nagłówkowe libmyth
279 Group: Development/Libraries
280 Requires: libmyth = %{version}-%{release}
282 %description -n libmyth-devel
283 This package contains the header files for developing add-ons for
286 %description -n libmyth-devel -l pl.UTF-8
287 Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
289 %package -n libmyth-static
290 Summary: Static libmyth library
291 Summary(pl.UTF-8): Statyczna biblioteka libmyth
292 Group: Development/Libraries
293 Requires: libmyth-devel = %{version}-%{release}
295 %description -n libmyth-static
296 Static libmyth library.
298 %description -n libmyth-static -l pl.UTF-8
299 Statyczna biblioteka libmyth.
301 %package -n perl-MythTV
302 Summary: MythTV Perl bindings
303 Summary(pl.UTF-8): Interfejs Perla dla MythTV
306 %description -n perl-MythTV
307 MythTV Perl bindings.
309 %description -n perl-MythTV -l pl.UTF-8
310 Ten pakiet zawiera moduły Perla do tworzenia dodatków dla mythtv.
312 %package -n python-MythTV
313 Summary: MythTV Python bindings
314 Summary(pl.UTF-8): Interfejs Pythona dla MythTV
316 Requires: python-MySQLdb
318 %description -n python-MythTV
319 MythTV Python bindings.
321 %description -n python-MythTV -l pl.UTF-8
322 Ten pakiet zawiera moduły Pythona do tworzenia dodatków dla mythtv.
328 %{__sed} -i -e 's,/var/log/mythfilldatabase.log,/var/log/mythtv/mythfilldatabase.log,' \
329 programs/mythbackend/housekeeper.cpp programs/mythwelcome/welcomedialog.cpp
336 %{?with_dshowserver:%patch20 -p0}
337 rm -rf database/old # not supported in PLD
339 # lib64 fix - enable to update patch
340 %if %{_lib} != "lib" && 0
341 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
342 xargs grep -l /lib . | xargs sed -i -e '
343 s,/''usr/lib/,/%{_libdir}/,g
344 s,/''lib/mythtv,/%{_lib}/mythtv,g
345 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
350 # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain
351 # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will
352 # prevent compiler finding libs from system when they should be looked
353 # from current buildtree.
354 # but that made it link with -lqt which doesn't exist, instead of -lqt-mt
355 # so we make QMAKE wrapper which will do sed subst after calling
356 # qmake. this is the wrapper.
357 cat > qmake-wrapper.sh <<'EOF'
360 while [ $# -gt 0 ]; do
374 if [ "$makefile" ]; then
376 s;-Wl,-rpath,$(QTDIR)/%{_lib};;
377 s;-L$(QTDIR)/%{_lib};;
381 chmod +x qmake-wrapper.sh
383 # move perl bindings to vendor prefix
384 sed -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"#' \
385 bindings/perl/perl.pro
389 %if %{with cpu_autodetect}
390 # Make sure we have /proc mounted
391 if [ ! -r /proc/cpuinfo ]; then
392 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
398 --prefix=%{_prefix} \
399 --libdir=%{_libdir} \
400 --libdir-name=%{_lib} \
401 --mandir=%{_mandir} \
402 --disable-distcc --disable-ccache \
403 --compile-type=%{?debug:debug}%{!?debug:release} \
404 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
405 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
406 %if %{with cpu_autodetect}
413 --cpu=%{_target_cpu} --tune=pentium4 \
416 %ifarch i386 i486 i586
417 --enable-disable-mmx-for-debugging \
422 %{?with_mmx:--enable-mmx} \
424 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \
425 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
426 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
427 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
428 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
429 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
430 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
431 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
432 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
433 --%{?with_ivtv:en}%{!?with_ivtv:dis}able-ivtv \
434 --%{?with_iptv:en}%{!?with_iptv:dis}able-iptv \
435 --%{?with_nellymoserdec:en}%{!?with_nellymoserdec:dis}able-decoder=nellymoser \
436 --%{?with_vaapi:en}%{!?with_vaapi:dis}able-vaapi \
437 --%{?with_vdpau:en}%{!?with_vdpau:dis}able-vdpau \
438 --%{?with_directfb:en}%{!?with_directfb:dis}able-directfb \
439 --%{?with_fftw3:en}%{!?with_fftw3:dis}able-libfftw3 \
443 %{_libdir}/qt4/bin/qmake mythtv.pro
447 rm -rf $RPM_BUILD_ROOT
448 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
449 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
450 $RPM_BUILD_ROOT/var/{cache,log,run}/mythtv \
451 $RPM_BUILD_ROOT/var/lib/mythtv/tmp \
452 $RPM_BUILD_ROOT%{_libdir}/mythtv \
453 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins \
454 $RPM_BUILD_ROOT%{_pixmapsdir}
457 INSTALL_ROOT=$RPM_BUILD_ROOT
459 # Install the files that we added on top of mythtv's own stuff
460 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
461 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
462 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
463 %{?with_dshowserver:install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/mythtv}
466 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
467 install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
469 # Install settings.pro so people can see the build options we used
470 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
471 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
473 for p in mythfrontend; do
474 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
475 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
479 # glibc language codes. attempt was made to change it on libmyth side,
480 # but that was just asking for trouble due large coverage of
481 # language.lower() usage.
483 s,%%lang(en_gb),%%lang(en_GB),
484 s,%%lang(zh_tw),%%lang(zh_TW),
485 s,%%lang(pt_br),%%lang(pt_BR),
488 rm -rf mythtvosd mythwelcome mythlcdserver
489 install -d mythtvosd mythwelcome
490 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
491 cp -a programs/mythwelcome/README mythwelcome
492 cp -a programs/mythlcdserver/README mythlcdserver
495 rm -rf $RPM_BUILD_ROOT
498 %groupadd -g 149 %{name}
499 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
500 %addusertogroup %{name} video
501 %addusertogroup %{name} audio
504 /sbin/chkconfig --add mythbackend
507 if [ "$1" = "0" ]; then
508 %service -q mythbackend stop
509 /sbin/chkconfig --del mythbackend
513 if [ "$1" = "0" ]; then
518 %post -n libmyth -p /sbin/ldconfig
519 %postun -n libmyth -p /sbin/ldconfig
522 if [ "$1" = 1 ]; then
523 %banner -e %{name}-setup <<EOF
524 To grant mysql permissions to mythtv, please run
525 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
530 %defattr(644,root,root,755)
531 %doc README* UPGRADING AUTHORS FAQ
532 %doc docs contrib config
533 %doc keys.txt mythtvosd mythwelcome mythlcdserver
536 %defattr(644,root,root,755)
537 %attr(755,root,root) %{_sbindir}/mythbackend
538 %attr(755,root,root) %{_sbindir}/mythcommflag
539 %attr(755,root,root) %{_bindir}/mythfilldatabase
540 %attr(755,root,root) %{_sbindir}/mythjobqueue
541 %attr(755,root,root) %{_sbindir}/mythlcdserver
542 %attr(755,root,root) %{_bindir}/mythtranscode
543 %attr(755,root,root) %{_bindir}/mythreplex
544 %attr(775,root,mythtv) %dir /var/lib/mythtv
545 %attr(700,root,mythtv) %dir /var/lib/mythtv/tmp
546 %attr(775,root,mythtv) %dir /var/cache/mythtv
547 %attr(775,root,mythtv) %dir /var/run/mythtv
548 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
549 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
550 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
551 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
553 %files frontend -f mythfrontend.lang
554 %defattr(644,root,root,755)
555 %attr(755,root,root) %{_bindir}/mythfrontend
556 %attr(755,root,root) %{_bindir}/mythshutdown
557 %attr(755,root,root) %{_bindir}/mythavtest
558 %attr(755,root,root) %{_bindir}/mythtvosd
559 %attr(755,root,root) %{_bindir}/mythwelcome
560 %dir %{_datadir}/mythtv
561 %dir %{_datadir}/mythtv/themes
562 %dir %{_libdir}/mythtv
563 %{_datadir}/mythtv/*.xml
564 %dir %{_libdir}/mythtv/filters
565 %dir %{_libdir}/mythtv/plugins
566 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
567 %{_datadir}/mythtv/*.ttf
568 %dir %{_datadir}/mythtv/i18n
569 %if %{with dshowserver}
570 %{_datadir}/mythtv/dshowcodecs
572 %{_desktopdir}/*.desktop
576 %defattr(644,root,root,755)
578 %attr(755,root,root) %{_bindir}/mythtv-setup
581 %defattr(644,root,root,755)
582 %{_datadir}/mythtv/themes/*
585 %defattr(644,root,root,755)
586 %attr(755,root,root) %{_libdir}/lib*.so*
587 %attr(755,root,root) %{_libdir}/lib*.a
588 %{_datadir}/mythtv/*.pl
590 %files -n libmyth-devel
591 %defattr(644,root,root,755)
592 %attr(755,root,root) %{_libdir}/*.so
594 %{_datadir}/mythtv/build
596 %files -n libmyth-static
597 %defattr(644,root,root,755)
599 %files -n perl-MythTV
600 %defattr(644,root,root,755)
601 %{perl_vendorlib}/MythTV.pm
602 %dir %{perl_vendorlib}/MythTV
603 %{perl_vendorlib}/MythTV/*.pm
604 %dir %{perl_vendorlib}/IO/Socket/INET
605 %{perl_vendorlib}/IO/Socket/INET/MythTV.pm
606 %exclude %{perl_vendorarch}/auto/MythTV/.packlist
608 %files -n python-MythTV
609 %defattr(644,root,root,755)
610 %attr(755,root,root) %{_bindir}/mythpython
611 %dir %{py_sitescriptdir}/MythTV
612 %{py_sitescriptdir}/MythTV/*
613 %{py_sitescriptdir}/*.egg-info