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.
334 %{?with_dshowserver:%patch20 -p0}
335 rm -rf database/old # not supported in PLD
337 # lib64 fix - enable to update patch
338 %if %{_lib} != "lib" && 0
339 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
340 xargs grep -l /lib . | xargs sed -i -e '
341 s,/''usr/lib/,/%{_libdir}/,g
342 s,/''lib/mythtv,/%{_lib}/mythtv,g
343 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
348 # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain
349 # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will
350 # prevent compiler finding libs from system when they should be looked
351 # from current buildtree.
352 # but that made it link with -lqt which doesn't exist, instead of -lqt-mt
353 # so we make QMAKE wrapper which will do sed subst after calling
354 # qmake. this is the wrapper.
355 cat > qmake-wrapper.sh <<'EOF'
358 while [ $# -gt 0 ]; do
372 if [ "$makefile" ]; then
374 s;-Wl,-rpath,$(QTDIR)/%{_lib};;
375 s;-L$(QTDIR)/%{_lib};;
379 chmod +x qmake-wrapper.sh
381 # move perl bindings to vendor prefix
382 sed -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"#' \
383 bindings/perl/perl.pro
387 %if %{with cpu_autodetect}
388 # Make sure we have /proc mounted
389 if [ ! -r /proc/cpuinfo ]; then
390 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
396 --prefix=%{_prefix} \
397 --libdir=%{_libdir} \
398 --libdir-name=%{_lib} \
399 --mandir=%{_mandir} \
400 --disable-distcc --disable-ccache \
401 --compile-type=%{?debug:debug}%{!?debug:release} \
402 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
403 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
404 %if %{with cpu_autodetect}
411 --cpu=%{_target_cpu} --tune=pentium4 \
414 %ifarch i386 i486 i586
415 --enable-disable-mmx-for-debugging \
420 %{?with_mmx:--enable-mmx} \
422 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \
423 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
424 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
425 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
426 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
427 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
428 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
429 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
430 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
431 --%{?with_ivtv:en}%{!?with_ivtv:dis}able-ivtv \
432 --%{?with_iptv:en}%{!?with_iptv:dis}able-iptv \
433 --%{?with_nellymoserdec:en}%{!?with_nellymoserdec:dis}able-decoder=nellymoser \
434 --%{?with_vaapi:en}%{!?with_vaapi:dis}able-vaapi \
435 --%{?with_vdpau:en}%{!?with_vdpau:dis}able-vdpau \
436 --%{?with_directfb:en}%{!?with_directfb:dis}able-directfb \
437 --%{?with_fftw3:en}%{!?with_fftw3:dis}able-libfftw3 \
441 %{_libdir}/qt4/bin/qmake mythtv.pro
445 rm -rf $RPM_BUILD_ROOT
446 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
447 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
448 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
449 $RPM_BUILD_ROOT%{_libdir}/mythtv \
450 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins \
451 $RPM_BUILD_ROOT%{_pixmapsdir}
454 INSTALL_ROOT=$RPM_BUILD_ROOT
456 # Install the files that we added on top of mythtv's own stuff
457 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
458 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
459 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
460 %{?with_dshowserver:install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/mythtv}
463 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
464 install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
466 # Install settings.pro so people can see the build options we used
467 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
468 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
470 for p in mythfrontend; do
471 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
472 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
476 # glibc language codes. attempt was made to change it on libmyth side,
477 # but that was just asking for trouble due large coverage of
478 # language.lower() usage.
480 s,%%lang(en_gb),%%lang(en_GB),
481 s,%%lang(zh_tw),%%lang(zh_TW),
482 s,%%lang(pt_br),%%lang(pt_BR),
485 rm -rf mythtvosd mythwelcome mythlcdserver
486 install -d mythtvosd mythwelcome
487 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
488 cp -a programs/mythwelcome/README mythwelcome
489 cp -a programs/mythlcdserver/README mythlcdserver
492 rm -rf $RPM_BUILD_ROOT
495 %groupadd -g 149 %{name}
496 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
497 %addusertogroup %{name} video
498 %addusertogroup %{name} audio
501 /sbin/chkconfig --add mythbackend
504 if [ "$1" = "0" ]; then
505 %service -q mythbackend stop
506 /sbin/chkconfig --del mythbackend
510 if [ "$1" = "0" ]; then
515 %post -n libmyth -p /sbin/ldconfig
516 %postun -n libmyth -p /sbin/ldconfig
519 if [ "$1" = 1 ]; then
520 %banner -e %{name}-setup <<EOF
521 To grant mysql permissions to mythtv, please run
522 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
527 %defattr(644,root,root,755)
528 %doc README* UPGRADING AUTHORS FAQ
529 %doc docs contrib config
530 %doc keys.txt mythtvosd mythwelcome mythlcdserver
533 %defattr(644,root,root,755)
534 %attr(755,root,root) %{_sbindir}/mythbackend
535 %attr(755,root,root) %{_sbindir}/mythcommflag
536 %attr(755,root,root) %{_bindir}/mythfilldatabase
537 %attr(755,root,root) %{_sbindir}/mythjobqueue
538 %attr(755,root,root) %{_sbindir}/mythlcdserver
539 %attr(755,root,root) %{_bindir}/mythtranscode
540 %attr(755,root,root) %{_bindir}/mythreplex
541 %attr(775,root,mythtv) %dir /var/lib/mythtv
542 %attr(775,root,mythtv) %dir /var/cache/mythtv
543 %attr(775,root,mythtv) %dir /var/run/mythtv
544 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
545 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
546 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
547 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
549 %files frontend -f mythfrontend.lang
550 %defattr(644,root,root,755)
551 %attr(755,root,root) %{_bindir}/mythfrontend
552 %attr(755,root,root) %{_bindir}/mythshutdown
553 %attr(755,root,root) %{_bindir}/mythavtest
554 %attr(755,root,root) %{_bindir}/mythtvosd
555 %attr(755,root,root) %{_bindir}/mythwelcome
556 %dir %{_datadir}/mythtv
557 %dir %{_datadir}/mythtv/themes
558 %dir %{_libdir}/mythtv
559 %{_datadir}/mythtv/*.xml
560 %dir %{_libdir}/mythtv/filters
561 %dir %{_libdir}/mythtv/plugins
562 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
563 %{_datadir}/mythtv/*.ttf
564 %dir %{_datadir}/mythtv/i18n
565 %if %{with dshowserver}
566 %{_datadir}/mythtv/dshowcodecs
568 %{_desktopdir}/*.desktop
572 %defattr(644,root,root,755)
574 %attr(755,root,root) %{_bindir}/mythtv-setup
577 %defattr(644,root,root,755)
578 %{_datadir}/mythtv/themes/*
581 %defattr(644,root,root,755)
582 %attr(755,root,root) %{_libdir}/lib*.so*
583 %attr(755,root,root) %{_libdir}/lib*.a
584 %{_datadir}/mythtv/*.pl
586 %files -n libmyth-devel
587 %defattr(644,root,root,755)
588 %attr(755,root,root) %{_libdir}/*.so
590 %{_datadir}/mythtv/build
592 %files -n libmyth-static
593 %defattr(644,root,root,755)
595 %files -n perl-MythTV
596 %defattr(644,root,root,755)
597 %{perl_vendorlib}/MythTV.pm
598 %dir %{perl_vendorlib}/MythTV
599 %{perl_vendorlib}/MythTV/*.pm
600 %dir %{perl_vendorlib}/IO/Socket/INET
601 %{perl_vendorlib}/IO/Socket/INET/MythTV.pm
602 %exclude %{perl_vendorarch}/auto/MythTV/.packlist
604 %files -n python-MythTV
605 %defattr(644,root,root,755)
606 %attr(755,root,root) %{_bindir}/mythpython
607 %dir %{py_sitescriptdir}/MythTV
608 %{py_sitescriptdir}/MythTV/*
609 %{py_sitescriptdir}/*.egg-info