2 # - bconds: altivec joystick lcd
3 # - lcd? (app-misc/lcdproc)
4 # - alpha, sparc, ppc arches?
8 # MythTV now uses a fairly intelligent cpu-detection script, so if you are
9 # building an rpm by hand on the machine it will be used on, I encourage you
10 # to use "--with cpu_autodetect" to let mythtv decide for you.
13 %bcond_with cpu_autodetect # enable CPU autodetection at compile time (sets "-march", "-mcpu" compile flags really)
14 %bcond_without lirc # lirc support
15 %bcond_without alsa # alsa support
16 %bcond_without oss # oss support
17 %bcond_with arts # arts support
18 %bcond_without jack # jack audio connection kit
19 %bcond_without opengl # opengl vsync
20 %bcond_without dvb # DVB support
21 %bcond_without xrandr # disable X11 resolution switching
22 %bcond_without ivtv # ivtv support (PVR-250, PVR-350) NFY
24 %bcond_with firewire # ieee1394 (NFY)
25 %bcond_without xvmc # do not use XvMCW
26 %bcond_without vdpau # disable nvidia vdpau support
27 %bcond_with mmx # enable MMX
28 %bcond_with dshowserver # enable directshow codecs server
30 %bcond_with nvidia_headers
32 # enable mmx automatically on arches having it
33 %ifarch %{ix86} %{x8664}
34 %ifnarch i386 i486 i586 i686
39 # dshowserver is exclusive arch for x86 x86_64 only
40 %ifnarch %{ix86} %{x8664}
41 %undefine with_dshowserver
46 Summary: A personal video recorder (PVR) application
47 Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR)
52 Group: Applications/Multimedia
53 Source0: ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}%{snap}.tar.bz2
54 # Source0-md5: 049e93d78d5370351539c9a23b47e1af
55 Source1: mythbackend.sysconfig
56 Source2: mythbackend.init
57 Source3: mythbackend.logrotate
58 Source5: pld-mythfrontend.desktop
59 # Source5-md5: f37a903ac97463683bebacdf29406951
60 Source6: pld-mythfrontend.png
61 # Source6-md5: bf76bd1463a022e174e4af976a03e678
63 # Source20-md5: 48327772b9e150f69e1ab8ff44b9a76c
64 #Patch100: %{name}-branch.diff
65 Patch0: %{name}-configure.patch
66 #Patch1: %{name}-mythstream.patch
67 #Patch2: %{name}-pl.patch
68 Patch3: %{name}-sbinpath.patch
69 #Patch4: %{name}-dvdnav-shared.patch
70 Patch20: %{name}-dshowserver_trunk.patch
71 URL: http://www.mythtv.org/
72 %{?without_nvidia_headers:BuildConflicts: xorg-driver-video-nvidia-libs}
73 %{?without_nvidia_headers:BuildConflicts: xorg-driver-video-nvidia-devel}
74 BuildRequires: Mesa-libGLU-devel
75 #BuildRequires: OpenGL-GLU-devel
76 BuildRequires: OpenGL-devel
77 BuildRequires: Qt3Support-devel
78 BuildRequires: QtCore-devel
79 BuildRequires: QtGui-devel
80 BuildRequires: QtNetwork-devel
81 BuildRequires: QtOpenGL-devel
82 BuildRequires: QtScript-devel
83 BuildRequires: QtSql-devel
84 BuildRequires: QtWebKit-devel
85 BuildRequires: QtXml-devel
86 %{?with_alsa:BuildRequires: alsa-lib-devel}
87 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
88 BuildRequires: ffmpeg-devel
89 BuildRequires: freetype-devel >= 1:2.0.0
90 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
91 BuildRequires: lame-libs-devel
92 %{?with_firewire:BuildRequires: libavc1394-devel}
93 BuildRequires: libdts-devel
94 %{?with_dvb:BuildRequires: libdvb-devel}
95 BuildRequires: libdvdnav-devel
96 %{?with_firewire:BuildRequires: libiec61883-devel}
97 %{?with_firewire:BuildRequires: libraw1394-devel}
98 BuildRequires: linux-libc-headers >= 7:2.6.10
99 %{?with_lirc:BuildRequires: lirc-devel}
100 BuildRequires: mysql-devel
101 #BuildRequires: patchutils
102 BuildRequires: perl-devel
103 BuildRequires: perl-tools-pod
104 BuildRequires: pkgconfig
105 BuildRequires: python-devel
106 BuildRequires: qt4-build
107 BuildRequires: qt4-qmake
108 BuildRequires: rpm-pythonprov
109 BuildRequires: rpmbuild(macros) >= 1.228
110 BuildRequires: sed >= 4.0
111 %{?with_vdpau:BuildRequires: libvdpau-devel}
112 BuildRequires: xorg-lib-libXext-devel
113 %{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel}
114 BuildRequires: xorg-lib-libXxf86vm-devel
116 BuildRequires: perl-ExtUtils-MakeMaker
117 ExclusiveArch: %{ix86} %{x8664} ppc
118 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
120 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
123 MythTV implements the following PVR features, and more, with a unified
125 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
126 - Video compression using RTjpeg or MPEG-4
127 - Program listing retrieval using XMLTV
128 - Themable, semi-transparent on-screen display
129 - Electronic program guide
130 - Scheduled recording of TV programs
131 - Resolution of conflicts between scheduled recordings
132 - Basic video editing
134 %description -l pl.UTF-8
135 MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
136 ujednoliconym interfejsem graficznym:
137 - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie,
138 przewijanie "żywej" telewizji
139 - kompresja obrazu przy użyciu RTjpeg lub MPEG-4
140 - odczyt listy programów przy użyciu XMLTV
141 - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów
142 - elektroniczny przewodnik po programie
143 - planowane nagrywanie programów telewizyjnych
144 - rozwiązywanie konfliktów między planowanymi nagraniami
145 - podstawowa edycja obrazu
148 Summary: Server component of mythtv (a PVR)
149 Summary(pl.UTF-8): Część serwerowa mythtv (PVR)
150 Group: Applications/Multimedia
151 Requires(post,preun): /sbin/chkconfig
152 Requires(postun): /usr/sbin/groupdel
153 Requires(postun): /usr/sbin/userdel
154 Requires(pre): /bin/id
155 Requires(pre): /usr/bin/getgid
156 Requires(pre): /usr/sbin/groupadd
157 Requires(pre): /usr/sbin/useradd
158 Requires: libmyth = %{version}-%{release}
159 Requires: mythtv = %{version}-%{release}
161 Provides: group(mythtv)
162 Provides: user(mythtv)
165 MythTV provides a unified graphical interface for recording and
166 viewing television programs. Refer to the mythtv package for more
169 This package contains only the server software, which provides video
170 and audio capture and encoding services. In order to be useful, it
171 requires a mythtv-frontend installation, either on the same system or
172 one reachable via the network.
174 %description backend -l pl.UTF-8
175 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
176 oglądania programów telewizyjnych. Więcej informacji w pakiecie
179 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
180 usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
181 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
182 albo innym osiągalnym po sieci.
185 Summary: Client component of mythtv (a PVR)
186 Summary(pl.UTF-8): Część kliencka mythtv (PVR)
187 Group: Applications/Multimedia
188 Requires: libmyth = %{version}-%{release}
189 Requires: mythtv = %{version}-%{release}
190 Requires: mythtv-themes = %{version}-%{release}
191 Provides: mythtv-frontend-api = %{myth_api_version}
193 %description frontend
194 MythTV provides a unified graphical interface for recording and
195 viewing television programs. Refer to the mythtv package for more
198 This package contains only the client software, which provides a
199 front-end for playback and configuration. It requires access to a
200 mythtv-backend installation, either on the same system or one
201 reachable via the network.
203 %description frontend -l pl.UTF-8
204 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
205 oglądania programów telewizyjnych. Więcej informacji w pakiecie
208 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające
209 frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
210 mythtv-backend - na tym samym systemie, albo innym osiągalnym po
214 Summary: Setup the mythtv backend
215 Summary(pl.UTF-8): Konfigurator backendu mythtv
216 Group: Applications/Multimedia
217 Requires: libmyth = %{version}-%{release}
220 MythTV provides a unified graphical interface for recording and
221 viewing television programs. Refer to the mythtv package for more
224 This package contains only the setup software for configuring the
227 %description setup -l pl.UTF-8
228 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
229 oglądania programów telewizyjnych. Więcej informacji w pakiecie
232 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
235 Summary: Base themes for mythtv's frontend
236 Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv
238 Requires: %{name}-frontend = %{version}-%{release}
241 MythTV provides a unified graphical interface for recording and
242 viewing television programs. Refer to the mythtv package for more
245 This package contains only the base themes used by the frontend and
248 %description themes -l pl.UTF-8
249 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
250 oglądania programów telewizyjnych. Więcej informacji w pakiecie
253 Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
257 Summary: Library providing mythtv support
258 Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv
260 Requires: QtSql-mysql
261 Requires: freetype >= 1:2.0.0
264 %description -n libmyth
265 Common library code for MythTV and add-on modules (development) MythTV
266 provides a unified graphical interface for recording and viewing
267 television programs. Refer to the mythtv package for more information.
269 %description -n libmyth -l pl.UTF-8
270 Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
271 dostarczający ujednolicony interfejs graficzny do nagrywania i
272 oglądania programów telewizyjnych. Więcej informacji w pakiecie
275 %package -n libmyth-devel
276 Summary: Development files for libmyth
277 Summary(pl.UTF-8): Pliki nagłówkowe libmyth
278 Group: Development/Libraries
279 Requires: libmyth = %{version}-%{release}
281 %description -n libmyth-devel
282 This package contains the header files for developing add-ons for
285 %description -n libmyth-devel -l pl.UTF-8
286 Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
288 %package -n libmyth-static
289 Summary: Static libmyth library
290 Summary(pl.UTF-8): Statyczna biblioteka libmyth
291 Group: Development/Libraries
292 Requires: libmyth-devel = %{version}-%{release}
294 %description -n libmyth-static
295 Static libmyth library.
297 %description -n libmyth-static -l pl.UTF-8
298 Statyczna biblioteka libmyth.
300 %package -n perl-MythTV
301 Summary: MythTV Perl bindings
302 Summary(pl.UTF-8): Interfejs Perla dla MythTV
305 %description -n perl-MythTV
306 MythTV Perl bindings.
308 %description -n perl-MythTV -l pl.UTF-8
309 Ten pakiet zawiera moduły Perla do tworzenia dodatków dla mythtv.
311 %package -n python-MythTV
312 Summary: MythTV Python bindings
313 Summary(pl.UTF-8): Interfejs Pythona dla MythTV
315 Requires: MySQL-python
317 %description -n python-MythTV
318 MythTV Python bindings.
320 %description -n python-MythTV -l pl.UTF-8
321 Ten pakiet zawiera moduły Pythona do tworzenia dodatków dla mythtv.
325 %setup -q -n %{name}-%{version}%{snap}
334 %{?with_dshowserver:%patch20 -p1}
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=`basename %{_libdir}` \
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=i386 --tune=pentium4 \
417 %{?with_mmx:--enable-mmx} \
419 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \
420 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
421 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
422 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
423 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
424 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
425 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
426 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
427 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
428 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
429 --%{?with_ivtv:en}%{!?with_ivtv:dis}able-ivtv \
430 --%{?with_iptv:en}%{!?with_iptv:dis}able-iptv \
431 --%{?with_nellymoserdec:en}%{!?with_nellymoserdec:dis}able-decoder=nellymoser \
432 --%{?with_vdpau:en}%{!?with_vdpau:dis}able-vdpau \
433 --%{?with_directfb:en}%{!?with_directfb:dis}able-directfb \
437 %{_libdir}/qt4/bin/qmake mythtv.pro
438 #sed -i -e 's/usr\/\/usr/usr/g' config.ep
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 # required to build some plugins
457 # install libs/libavcodec/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \
458 # libs/libavformat/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \
459 # libs/libavutil/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv
461 # Install the files that we added on top of mythtv's own stuff
462 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
463 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
464 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
465 %{?with_dshowserver:install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/mythtv}
468 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
469 install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
471 # Install settings.pro so people can see the build options we used
472 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
473 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
475 for p in mythfrontend; do
476 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
477 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
481 # glibc language codes. attempt was made to change it on libmyth side,
482 # but that was just asking for trouble due large coverage of
483 # language.lower() usage.
485 s,%%lang(en_gb),%%lang(en_GB),
486 s,%%lang(zh_tw),%%lang(zh_TW),
487 s,%%lang(pt_br),%%lang(pt_BR),
490 rm -rf mythtvosd mythwelcome mythlcdserver
491 install -d mythtvosd mythwelcome
492 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
493 cp -a programs/mythwelcome/README mythwelcome
494 cp -a programs/mythlcdserver/README mythlcdserver
497 rm -rf $RPM_BUILD_ROOT
499 # Empty newline after %addusertogroup %{name} video below is intended.
500 # Do not remove it until rpm stop joining lines with that macro.
502 %groupadd -g 149 %{name}
503 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
504 %addusertogroup %{name} video
505 %addusertogroup %{name} audio
508 /sbin/chkconfig --add mythbackend
511 if [ "$1" = "0" ]; then
512 %service -q mythbackend stop
513 /sbin/chkconfig --del mythbackend
517 if [ "$1" = "0" ]; then
522 %post -n libmyth -p /sbin/ldconfig
523 %postun -n libmyth -p /sbin/ldconfig
526 if [ "$1" = 1 ]; then
527 %banner -e %{name}-setup <<EOF
528 To grant mysql permissions to mythtv, please run
529 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
534 %defattr(644,root,root,755)
535 %doc README* UPGRADING AUTHORS FAQ
536 %doc docs contrib config
537 %doc keys.txt mythtvosd mythwelcome mythlcdserver
540 %defattr(644,root,root,755)
541 %attr(755,root,root) %{_sbindir}/mythbackend
542 %attr(755,root,root) %{_sbindir}/mythcommflag
543 %attr(755,root,root) %{_bindir}/mythfilldatabase
544 %attr(755,root,root) %{_sbindir}/mythjobqueue
545 %attr(755,root,root) %{_sbindir}/mythlcdserver
546 %attr(755,root,root) %{_bindir}/mythtranscode
547 %attr(755,root,root) %{_bindir}/mythreplex
548 %attr(775,root,mythtv) %dir /var/lib/mythtv
549 %attr(775,root,mythtv) %dir /var/cache/mythtv
550 %attr(775,root,mythtv) %dir /var/run/mythtv
551 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
552 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
553 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
554 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
556 %files frontend -f mythfrontend.lang
557 %defattr(644,root,root,755)
558 %attr(755,root,root) %{_bindir}/mythfrontend
559 %attr(755,root,root) %{_bindir}/mythshutdown
560 %attr(755,root,root) %{_bindir}/mythavtest
561 %attr(755,root,root) %{_bindir}/mythtvosd
562 %attr(755,root,root) %{_bindir}/mythwelcome
563 %dir %{_datadir}/mythtv
564 %dir %{_datadir}/mythtv/themes
565 %dir %{_libdir}/mythtv
566 %{_datadir}/mythtv/*.xml
567 %dir %{_libdir}/mythtv/filters
568 %dir %{_libdir}/mythtv/plugins
569 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
570 %{_datadir}/mythtv/*.ttf
571 %dir %{_datadir}/mythtv/i18n
572 %if %{with dshowserver}
573 %{_datadir}/mythtv/dshowcodecs
575 %{_desktopdir}/*.desktop
579 %defattr(644,root,root,755)
581 %attr(755,root,root) %{_bindir}/mythtv-setup
584 %defattr(644,root,root,755)
585 %{_datadir}/mythtv/themes/*
588 %defattr(644,root,root,755)
589 %attr(755,root,root) %{_libdir}/lib*.so*
590 %attr(755,root,root) %{_libdir}/lib*.a
591 %{_datadir}/mythtv/*.pl
593 %files -n libmyth-devel
594 %defattr(644,root,root,755)
595 %attr(755,root,root) %{_libdir}/*.so
597 %{_datadir}/mythtv/build
599 %files -n libmyth-static
600 %defattr(644,root,root,755)
602 %files -n perl-MythTV
603 %defattr(644,root,root,755)
604 %{perl_vendorlib}/MythTV.pm
605 %dir %{perl_vendorlib}/MythTV
606 %{perl_vendorlib}/MythTV/*.pm
607 %{perl_vendorlib}/IO/Socket/INET/MythTV.pm
608 %exclude %{perl_vendorarch}/auto/MythTV/.packlist
610 %files -n python-MythTV
611 %defattr(644,root,root,755)
612 %dir %{py_sitescriptdir}/MythTV
613 # XXX: package .py[co] only
614 %{py_sitescriptdir}/MythTV/*
615 %{py_sitescriptdir}/*.egg-info