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
29 # enable mmx automatically on arches having it
30 %ifarch %{ix86} %{x8664}
31 %ifnarch i386 i486 i586 i686
36 Summary: A personal video recorder (PVR) application
37 Summary(pl): Osobista aplikacja do nagrywania obrazu (PVR)
42 Group: Applications/Multimedia
43 Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
44 # Source0-md5: ebba5829d264bb4de2f75cae936141f4
45 Source1: mythbackend.sysconfig
46 Source2: mythbackend.init
47 Source3: mythbackend.logrotate
48 Source5: mythfrontend.desktop
49 Patch0: %{name}-lib64.patch
50 Patch1: %{name}-x86_64-configure.patch
51 Patch2: %{name}-mythstream.patch
52 Patch3: %{name}-ldconfig.patch
53 Patch4: %{name}-pl.patch
54 Patch5: %{name}-sbinpath.patch
55 Patch6: %{name}-ticket-1310.patch
56 Patch7: %{name}-optflags.patch
57 Patch8: %{name}-branch.diff
58 URL: http://www.mythtv.org/
59 #BuildRequires: DirectFB-devel
60 BuildRequires: XFree86-devel
61 %{?with_alsa:BuildRequires: alsa-lib-devel}
62 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
63 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
64 %{?with_dvb:BuildRequires: libdvb-devel}
65 BuildRequires: libdvdnav-devel
66 %{?with_oggvorbis:BuildRequires: libvorbis-devel}
68 BuildRequires: libavc1394-devel
69 BuildRequires: libiec61883-devel # missing in PLD?
70 BuildRequires: libraw1394-devel
72 BuildRequires: freetype-devel >= 1:2.0.0
73 BuildRequires: lame-libs-devel
74 %{?with_xvmc:BuildRequires: libXvMCW-devel}
75 BuildRequires: linux-libc-headers >= 7:2.6.10
76 %{?with_lirc:BuildRequires: lirc-devel}
77 BuildRequires: mysql-devel
78 BuildRequires: qmake >= 6:3.2.1-4
79 BuildRequires: qt-devel >= 6:3.2.1-4
80 BuildRequires: rpmbuild(macros) >= 1.228
81 BuildRequires: sed >= 4.0
82 # for bundled libavcodec
83 BuildRequires: libdts-devel
84 #BuildConflicts: libmyth-devel
85 ExclusiveArch: %{ix86} %{x8664} ppc
86 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
91 MythTV implements the following PVR features, and more, with a unified
93 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
94 - Video compression using RTjpeg or MPEG-4
95 - Program listing retrieval using XMLTV
96 - Themable, semi-transparent on-screen display
97 - Electronic program guide
98 - Scheduled recording of TV programs
99 - Resolution of conflicts between scheduled recordings
100 - Basic video editing
103 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
104 ujednoliconym interfejsem graficznym:
105 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
106 przewijanie "¿ywej" telewizji
107 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
108 - odczyt listy programów przy u¿yciu XMLTV
109 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
110 - elektroniczny przewodnik po programie
111 - planowane nagrywanie programów telewizyjnych
112 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
113 - podstawowa edycja obrazu
116 Summary: Server component of mythtv (a PVR)
117 Summary(pl): Czê¶æ serwerowa mythtv (PVR)
118 Group: Applications/Multimedia
119 Requires(post,preun): /sbin/chkconfig
120 Requires(postun): /usr/sbin/groupdel
121 Requires(postun): /usr/sbin/userdel
122 Requires(pre): /bin/id
123 Requires(pre): /usr/bin/getgid
124 Requires(pre): /usr/sbin/groupadd
125 Requires(pre): /usr/sbin/useradd
126 Requires: libmyth = %{version}-%{release}
127 Requires: mythtv = %{version}-%{release}
128 Provides: group(mythtv)
129 Provides: user(mythtv)
132 MythTV provides a unified graphical interface for recording and
133 viewing television programs. Refer to the mythtv package for more
136 This package contains only the server software, which provides video
137 and audio capture and encoding services. In order to be useful, it
138 requires a mythtv-frontend installation, either on the same system or
139 one reachable via the network.
141 %description backend -l pl
142 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
143 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
146 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
147 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
148 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
149 albo innym osi±galnym po sieci.
152 Summary: Client component of mythtv (a PVR)
153 Summary(pl): Czê¶æ kliencka mythtv (PVR)
154 Group: Applications/Multimedia
155 Requires: libmyth = %{version}-%{release}
156 Requires: mythtv = %{version}-%{release}
157 Requires: mythtv-themes = %{version}-%{release}
158 Provides: mythtv-frontend-api = %{myth_api_version}
160 %description frontend
161 MythTV provides a unified graphical interface for recording and
162 viewing television programs. Refer to the mythtv package for more
165 This package contains only the client software, which provides a
166 front-end for playback and configuration. It requires access to a
167 mythtv-backend installation, either on the same system or one
168 reachable via the network.
170 %description frontend -l pl
171 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
172 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
175 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczaj±ce
176 frontend do odtwarzania i konfiguracji. Wymaga dostêpu do instalacji
177 mythtv-backend - na tym samym systemie, albo innym osi±galnym po
181 Summary: Setup the mythtv backend
182 Summary(pl): Konfigurator backendu mythtv
183 Group: Applications/Multimedia
184 Requires: libmyth = %{version}-%{release}
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 setup software for configuring the
194 %description setup -l pl
195 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
196 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
199 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
202 Summary: Base themes for mythtv's frontend
203 Summary(pl): Podstawowe motywy dla frontendu mythtv
204 Group: Applications/Multimedia
207 MythTV provides a unified graphical interface for recording and
208 viewing television programs. Refer to the mythtv package for more
211 This package contains only the base themes used by the frontend and
214 %description themes -l pl
215 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
216 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
219 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
223 Summary: Library providing mythtv support
224 Summary(pl): Biblioteka udostêpniaj±ca obs³ugê mythtv
226 Requires: freetype >= 1:2.0.0
228 Requires: qt >= 6:3.2.1-4
229 Requires: qt-plugin-mysql >= 6:3.2.1-4
231 %description -n libmyth
232 Common library code for MythTV and add-on modules (development) MythTV
233 provides a unified graphical interface for recording and viewing
234 television programs. Refer to the mythtv package for more information.
236 %description -n libmyth -l pl
237 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
238 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
239 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
242 %package -n libmyth-devel
243 Summary: Development files for libmyth
244 Summary(pl): Pliki nag³ówkowe libmyth
245 Group: Development/Libraries
246 Requires: libmyth = %{version}-%{release}
248 %description -n libmyth-devel
249 This package contains the header files for developing add-ons for
252 %description -n libmyth-devel -l pl
253 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
255 %package -n libmyth-static
256 Summary: Static libmyth library
257 Summary(pl): Statyczna biblioteka libmyth
258 Group: Development/Libraries
259 Requires: libmyth-devel = %{version}-%{release}
261 %description -n libmyth-static
262 Static libmyth library.
264 %description -n libmyth-static -l pl
265 Statyczna biblioteka libmyth.
268 %setup -q %{?_rev:-n %{name}}
281 rm -rf database/old # not supported in PLD
283 # lib64 fix - enable to update patch
284 %if %{_lib} != "lib" && 0
285 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
286 xargs grep -l /lib . | xargs sed -i -e '
287 s,/''usr/lib/,/%{_libdir}/,g
288 s,/''lib/mythtv,/%{_lib}/mythtv,g
289 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
295 %if %{with cpu_autodetect}
296 # Make sure we have /proc mounted
297 if [ ! -r /proc/cpuinfo ]; then
298 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
302 export QTDIR="%{_prefix}"
304 %if "%{_lib}" != "lib"
305 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
306 # help configure::has_library() to locate libs
307 export LD_LIBRARY_PATH=%{_libdir}
310 # NB: not autoconf configure
312 export CXX="%{__cxx}"
314 --prefix=%{_prefix} \
315 --libdir=%{_libdir} \
316 --mandir=%{_mandir} \
318 --disable-distcc --disable-ccache \
319 --compile-type=%{?debug:debug}%{!?debug:release} \
320 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
321 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
322 %if %{with cpu_autodetect}
329 --cpu=i386 --tune=pentium4 \
335 %{?with_mmx:--enable-mmx} \
337 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
338 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
339 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
340 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
341 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
343 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
344 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
345 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
346 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
347 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
351 # --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
352 # --disable-joystick-menu \
354 # --enable-directfb enable DirectFB (Linux non-X11 video)
355 # --enable-directx enable DirectX (Microsoft video)
361 rm -rf $RPM_BUILD_ROOT
362 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
363 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
364 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
365 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
367 export QTDIR="%{_prefix}"
369 INSTALL_ROOT=$RPM_BUILD_ROOT
371 # Install the files that we added on top of mythtv's own stuff
372 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
373 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
374 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
377 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
379 # Install settings.pro so people can see the build options we used
380 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
381 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
383 for p in mythfrontend; do
384 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
385 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
389 # glibc language codes. attempt was made to change it on libmyth side,
390 # but that was just asking for trouble due large coverage of
391 # language.lower() usage.
393 s,%%lang(en_gb),%%lang(en_GB),
394 s,%%lang(zh_tw),%%lang(zh_TW),
395 s,%%lang(pt_br),%%lang(pt_BR),
398 rm -rf mythtvosd mythwelcome mythlcdserver
399 install -d mythtvosd mythwelcome
400 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
401 cp -a programs/mythwelcome/README mythwelcome
402 cp -a programs/mythlcdserver/README mythlcdserver
405 rm -rf $RPM_BUILD_ROOT
408 %groupadd -g 149 %{name}
409 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
410 %addusertogroup %{name} video
411 %addusertogroup %{name} audio
414 /sbin/chkconfig --add mythbackend
417 if [ "$1" = "0" ]; then
418 %service -q mythbackend stop
419 /sbin/chkconfig --del mythbackend
423 if [ "$1" = "0" ]; then
428 %post -n libmyth -p /sbin/ldconfig
429 %postun -n libmyth -p /sbin/ldconfig
432 if [ "$1" = 1 ]; then
433 %banner -e %{name}-setup <<EOF
434 To grant mysql permissions to mythtv, please run
435 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
440 %defattr(644,root,root,755)
441 %doc README* UPGRADING AUTHORS FAQ
442 %doc docs contrib configfiles
443 %doc keys.txt mythtvosd mythwelcome mythlcdserver
446 %defattr(644,root,root,755)
447 %attr(755,root,root) %{_sbindir}/mythbackend
448 %attr(755,root,root) %{_sbindir}/mythcommflag
449 %attr(755,root,root) %{_bindir}/mythfilldatabase
450 %attr(755,root,root) %{_sbindir}/mythjobqueue
451 %attr(755,root,root) %{_sbindir}/mythlcdserver
452 %attr(755,root,root) %{_bindir}/mythtranscode
453 %attr(775,root,mythtv) %dir /var/lib/mythtv
454 %attr(775,root,mythtv) %dir /var/cache/mythtv
455 %attr(775,root,mythtv) %dir /var/run/mythtv
456 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
457 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
458 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
459 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
461 %files frontend -f mythfrontend.lang
462 %defattr(644,root,root,755)
463 %attr(755,root,root) %{_bindir}/mythfrontend
464 %attr(755,root,root) %{_bindir}/mythshutdown
465 %attr(755,root,root) %{_bindir}/mythtv
466 %attr(755,root,root) %{_bindir}/mythtvosd
467 %attr(755,root,root) %{_bindir}/mythwelcome
468 %dir %{_datadir}/mythtv
469 %dir %{_libdir}/mythtv
470 %{_datadir}/mythtv/*.xml
471 %dir %{_libdir}/mythtv/filters
472 %dir %{_libdir}/mythtv/plugins
473 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
474 %{_datadir}/mythtv/*.ttf
475 %dir %{_datadir}/mythtv/i18n
476 %{_desktopdir}/*.desktop
479 %defattr(644,root,root,755)
481 %attr(755,root,root) %{_bindir}/mythtv-setup
484 %defattr(644,root,root,755)
485 %{_datadir}/mythtv/themes
488 %defattr(644,root,root,755)
489 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
491 %files -n libmyth-devel
492 %defattr(644,root,root,755)
493 %attr(755,root,root) %{_libdir}/*.so
495 %{_datadir}/mythtv/build
497 %files -n libmyth-static
498 %defattr(644,root,root,755)