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_with mmx # enable MMX
27 %bcond_with dshowserver # enable directshow codecs server
30 # enable mmx automatically on arches having it
31 %ifarch %{ix86} %{x8664}
32 %ifnarch i386 i486 i586 i686
37 # dshowserver is exclusive arch for x86 x86_64 only
38 %ifnarch %{ix86} %{x8664}
39 %undefine with_dshowserver
44 Summary: A personal video recorder (PVR) application
45 Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR)
50 Group: Applications/Multimedia
51 Source0: %{name}-%{version}-%{snap}.tar.bz2
52 # Source0-md5: 22f837c4cf0ebb4410d97d2cc1d29546
53 Source1: mythbackend.sysconfig
54 Source2: mythbackend.init
55 Source3: mythbackend.logrotate
56 Source5: pld-mythfrontend.desktop
57 # Source5-md5: f37a903ac97463683bebacdf29406951
58 Source6: pld-mythfrontend.png
59 # Source6-md5: bf76bd1463a022e174e4af976a03e678
61 # Source20-md5: 48327772b9e150f69e1ab8ff44b9a76c
62 #Patch100: %{name}-branch.diff
63 Patch0: %{name}-configure.patch
64 #Patch1: %{name}-mythstream.patch
65 #Patch2: %{name}-pl.patch
66 Patch3: %{name}-sbinpath.patch
67 #Patch4: %{name}-dvdnav-shared.patch
68 Patch20: %{name}-dshowserver_trunk.patch
69 URL: http://www.mythtv.org/
70 BuildRequires: Mesa-libGLU-devel
71 BuildRequires: OpenGL-GLU-devel
72 BuildRequires: OpenGL-devel
73 BuildRequires: Qt3Support-devel
74 BuildRequires: QtCore-devel
75 BuildRequires: QtGui-devel
76 BuildRequires: QtNetwork-devel
77 BuildRequires: QtOpenGL-devel
78 BuildRequires: QtScript-devel
79 BuildRequires: QtSql-devel
80 BuildRequires: QtWebKit-devel
81 BuildRequires: QtXml-devel
82 %{?with_alsa:BuildRequires: alsa-lib-devel}
83 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
84 BuildRequires: ffmpeg-devel
85 BuildRequires: freetype-devel >= 1:2.0.0
86 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
87 BuildRequires: lame-libs-devel
88 %{?with_firewire:BuildRequires: libavc1394-devel}
89 BuildRequires: libdts-devel
90 %{?with_dvb:BuildRequires: libdvb-devel}
91 BuildRequires: libdvdnav-devel
92 %{?with_firewire:BuildRequires: libiec61883-devel}
93 %{?with_firewire:BuildRequires: libraw1394-devel}
94 BuildRequires: linux-libc-headers >= 7:2.6.10
95 %{?with_lirc:BuildRequires: lirc-devel}
96 BuildRequires: mysql-devel
97 #BuildRequires: patchutils
98 BuildRequires: perl-devel
99 BuildRequires: perl-tools-pod
100 BuildRequires: python-devel
101 BuildRequires: qt4-build
102 BuildRequires: qt4-qmake
103 BuildRequires: rpm-pythonprov
104 BuildRequires: rpmbuild(macros) >= 1.228
105 BuildRequires: sed >= 4.0
106 BuildRequires: xorg-lib-libXext-devel
107 %{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel}
108 BuildRequires: xorg-lib-libXxf86vm-devel
110 BuildRequires: perl-ExtUtils-MakeMaker
111 ExclusiveArch: %{ix86} %{x8664} ppc
112 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
114 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
117 MythTV implements the following PVR features, and more, with a unified
119 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
120 - Video compression using RTjpeg or MPEG-4
121 - Program listing retrieval using XMLTV
122 - Themable, semi-transparent on-screen display
123 - Electronic program guide
124 - Scheduled recording of TV programs
125 - Resolution of conflicts between scheduled recordings
126 - Basic video editing
128 %description -l pl.UTF-8
129 MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
130 ujednoliconym interfejsem graficznym:
131 - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie,
132 przewijanie "żywej" telewizji
133 - kompresja obrazu przy użyciu RTjpeg lub MPEG-4
134 - odczyt listy programów przy użyciu XMLTV
135 - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów
136 - elektroniczny przewodnik po programie
137 - planowane nagrywanie programów telewizyjnych
138 - rozwiązywanie konfliktów między planowanymi nagraniami
139 - podstawowa edycja obrazu
142 Summary: Server component of mythtv (a PVR)
143 Summary(pl.UTF-8): Część serwerowa mythtv (PVR)
144 Group: Applications/Multimedia
145 Requires(post,preun): /sbin/chkconfig
146 Requires(postun): /usr/sbin/groupdel
147 Requires(postun): /usr/sbin/userdel
148 Requires(pre): /bin/id
149 Requires(pre): /usr/bin/getgid
150 Requires(pre): /usr/sbin/groupadd
151 Requires(pre): /usr/sbin/useradd
152 Requires: libmyth = %{version}-%{release}
153 Requires: mythtv = %{version}-%{release}
154 Provides: group(mythtv)
155 Provides: user(mythtv)
158 MythTV provides a unified graphical interface for recording and
159 viewing television programs. Refer to the mythtv package for more
162 This package contains only the server software, which provides video
163 and audio capture and encoding services. In order to be useful, it
164 requires a mythtv-frontend installation, either on the same system or
165 one reachable via the network.
167 %description backend -l pl.UTF-8
168 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
169 oglądania programów telewizyjnych. Więcej informacji w pakiecie
172 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
173 usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
174 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
175 albo innym osiągalnym po sieci.
178 Summary: Client component of mythtv (a PVR)
179 Summary(pl.UTF-8): Część kliencka mythtv (PVR)
180 Group: Applications/Multimedia
181 Requires: libmyth = %{version}-%{release}
182 Requires: mythtv = %{version}-%{release}
183 Requires: mythtv-themes = %{version}-%{release}
184 Provides: mythtv-frontend-api = %{myth_api_version}
186 %description frontend
187 MythTV provides a unified graphical interface for recording and
188 viewing television programs. Refer to the mythtv package for more
191 This package contains only the client software, which provides a
192 front-end for playback and configuration. It requires access to a
193 mythtv-backend installation, either on the same system or one
194 reachable via the network.
196 %description frontend -l pl.UTF-8
197 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
198 oglądania programów telewizyjnych. Więcej informacji w pakiecie
201 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające
202 frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
203 mythtv-backend - na tym samym systemie, albo innym osiągalnym po
207 Summary: Setup the mythtv backend
208 Summary(pl.UTF-8): Konfigurator backendu mythtv
209 Group: Applications/Multimedia
210 Requires: libmyth = %{version}-%{release}
213 MythTV provides a unified graphical interface for recording and
214 viewing television programs. Refer to the mythtv package for more
217 This package contains only the setup software for configuring the
220 %description setup -l pl.UTF-8
221 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
222 oglądania programów telewizyjnych. Więcej informacji w pakiecie
225 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
228 Summary: Base themes for mythtv's frontend
229 Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv
231 Requires: %{name}-frontend = %{version}-%{release}
234 MythTV provides a unified graphical interface for recording and
235 viewing television programs. Refer to the mythtv package for more
238 This package contains only the base themes used by the frontend and
241 %description themes -l pl.UTF-8
242 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
243 oglądania programów telewizyjnych. Więcej informacji w pakiecie
246 Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
250 Summary: Library providing mythtv support
251 Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv
253 Requires: QtSql-mysql
254 Requires: freetype >= 1:2.0.0
257 %description -n libmyth
258 Common library code for MythTV and add-on modules (development) MythTV
259 provides a unified graphical interface for recording and viewing
260 television programs. Refer to the mythtv package for more information.
262 %description -n libmyth -l pl.UTF-8
263 Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
264 dostarczający ujednolicony interfejs graficzny do nagrywania i
265 oglądania programów telewizyjnych. Więcej informacji w pakiecie
268 %package -n libmyth-devel
269 Summary: Development files for libmyth
270 Summary(pl.UTF-8): Pliki nagłówkowe libmyth
271 Group: Development/Libraries
272 Requires: libmyth = %{version}-%{release}
274 %description -n libmyth-devel
275 This package contains the header files for developing add-ons for
278 %description -n libmyth-devel -l pl.UTF-8
279 Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
281 %package -n libmyth-static
282 Summary: Static libmyth library
283 Summary(pl.UTF-8): Statyczna biblioteka libmyth
284 Group: Development/Libraries
285 Requires: libmyth-devel = %{version}-%{release}
287 %description -n libmyth-static
288 Static libmyth library.
290 %description -n libmyth-static -l pl.UTF-8
291 Statyczna biblioteka libmyth.
293 %package -n perl-MythTV
294 Summary: MythTV Perl bindings
295 Summary(pl.UTF-8): Interfejs Perla dla MythTV
298 %description -n perl-MythTV
299 MythTV Perl bindings.
301 %description -n perl-MythTV -l pl.UTF-8
302 Ten pakiet zawiera moduły Perla do tworzenia dodatków dla mythtv.
304 %package -n python-MythTV
305 Summary: MythTV Python bindings
306 Summary(pl.UTF-8): Interfejs Pythona dla MythTV
308 Requires: MySQL-python
310 %description -n python-MythTV
311 MythTV Python bindings.
313 %description -n python-MythTV -l pl.UTF-8
314 Ten pakiet zawiera moduły Pythona do tworzenia dodatków dla mythtv.
327 %{?with_dshowserver:%patch20 -p1}
328 rm -rf database/old # not supported in PLD
330 # lib64 fix - enable to update patch
331 %if %{_lib} != "lib" && 0
332 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
333 xargs grep -l /lib . | xargs sed -i -e '
334 s,/''usr/lib/,/%{_libdir}/,g
335 s,/''lib/mythtv,/%{_lib}/mythtv,g
336 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
341 # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain
342 # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will
343 # prevent compiler finding libs from system when they should be looked
344 # from current buildtree.
345 # but that made it link with -lqt which doesn't exist, instead of -lqt-mt
346 # so we make QMAKE wrapper which will do sed subst after calling
347 # qmake. this is the wrapper.
348 cat > qmake-wrapper.sh <<'EOF'
351 while [ $# -gt 0 ]; do
365 if [ "$makefile" ]; then
367 s;-Wl,-rpath,$(QTDIR)/%{_lib};;
368 s;-L$(QTDIR)/%{_lib};;
372 chmod +x qmake-wrapper.sh
374 # move perl bindings to vendor prefix
375 sed -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"#' \
376 bindings/perl/perl.pro
380 %if %{with cpu_autodetect}
381 # Make sure we have /proc mounted
382 if [ ! -r /proc/cpuinfo ]; then
383 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
389 --prefix=%{_prefix} \
390 --libdir=%{_libdir} \
391 --libdir-name=`basename %{_libdir}` \
392 --mandir=%{_mandir} \
393 --disable-distcc --disable-ccache \
394 --compile-type=%{?debug:debug}%{!?debug:release} \
395 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
396 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
397 %if %{with cpu_autodetect}
404 --cpu=i386 --tune=pentium4 \
410 %{?with_mmx:--enable-mmx} \
412 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \
413 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
414 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
415 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
416 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
417 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
418 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
419 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
420 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
421 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
422 --%{?with_ivtv:en}%{!?with_ivtv:dis}able-ivtv \
423 --%{?with_iptv:en}%{!?with_iptv:dis}able-iptv \
424 --%{?with_nellymoserdec:en}%{!?with_nellymoserdec:dis}able-decoder=nellymoser \
425 --%{?with_directfb:en}%{!?with_directfb:dis}able-directfb \
429 %{_libdir}/qt4/bin/qmake mythtv.pro
430 #sed -i -e 's/usr\/\/usr/usr/g' config.ep
437 rm -rf $RPM_BUILD_ROOT
438 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
439 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
440 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
441 $RPM_BUILD_ROOT%{_libdir}/mythtv \
442 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins \
443 $RPM_BUILD_ROOT%{_pixmapsdir}
446 INSTALL_ROOT=$RPM_BUILD_ROOT
448 # required to build some plugins
449 # install libs/libavcodec/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \
450 # libs/libavformat/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \
451 # libs/libavutil/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv
453 # Install the files that we added on top of mythtv's own stuff
454 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
455 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
456 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
457 %{?with_dshowserver:install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/mythtv}
460 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
461 install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
463 # Install settings.pro so people can see the build options we used
464 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
465 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
467 for p in mythfrontend; do
468 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
469 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
473 # glibc language codes. attempt was made to change it on libmyth side,
474 # but that was just asking for trouble due large coverage of
475 # language.lower() usage.
477 s,%%lang(en_gb),%%lang(en_GB),
478 s,%%lang(zh_tw),%%lang(zh_TW),
479 s,%%lang(pt_br),%%lang(pt_BR),
482 rm -rf mythtvosd mythwelcome mythlcdserver
483 install -d mythtvosd mythwelcome
484 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
485 cp -a programs/mythwelcome/README mythwelcome
486 cp -a programs/mythlcdserver/README mythlcdserver
489 rm -rf $RPM_BUILD_ROOT
491 # Empty newline after %addusertogroup %{name} video below is intended.
492 # Do not remove it until rpm stop joining lines with that macro.
494 %groupadd -g 149 %{name}
495 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
496 %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}/mythtv
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 %{perl_vendorlib}/IO/Socket/INET/MythTV.pm
601 %exclude %{perl_vendorarch}/auto/MythTV/.packlist
603 %files -n python-MythTV
604 %defattr(644,root,root,755)
605 %dir %{py_sitescriptdir}/MythTV
606 # XXX: package .py[co] only
607 %{py_sitescriptdir}/MythTV/*
608 %{py_sitescriptdir}/*.egg-info