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 BuildRequires: freetype-devel >= 1:2.0.0
64 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
65 BuildRequires: lame-libs-devel
66 %{?with_xvmc:BuildRequires: libXvMCW-devel}
67 %{?with_firewire:BuildRequires: libavc1394-devel}
68 %{?with_dvb:BuildRequires: libdvb-devel}
69 BuildRequires: libdvdnav-devel
70 %{?with_firewire:BuildRequires: libiec61883-devel}
71 %{?with_firewire:BuildRequires: libraw1394-devel}
72 %{?with_oggvorbis:BuildRequires: libvorbis-devel}
73 BuildRequires: linux-libc-headers >= 7:2.6.10
74 %{?with_lirc:BuildRequires: lirc-devel}
75 BuildRequires: mysql-devel
76 BuildRequires: patchutils
77 BuildRequires: qmake >= 6:3.2.1-4
78 BuildRequires: qt-devel >= 6:3.2.1-4
79 BuildRequires: rpmbuild(macros) >= 1.228
80 BuildRequires: sed >= 4.0
81 # for bundled libavcodec
82 BuildRequires: libdts-devel
83 #BuildConflicts: libmyth-devel
84 ExclusiveArch: %{ix86} %{x8664} ppc
85 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
87 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
90 MythTV implements the following PVR features, and more, with a unified
92 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
93 - Video compression using RTjpeg or MPEG-4
94 - Program listing retrieval using XMLTV
95 - Themable, semi-transparent on-screen display
96 - Electronic program guide
97 - Scheduled recording of TV programs
98 - Resolution of conflicts between scheduled recordings
102 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
103 ujednoliconym interfejsem graficznym:
104 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
105 przewijanie "¿ywej" telewizji
106 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
107 - odczyt listy programów przy u¿yciu XMLTV
108 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
109 - elektroniczny przewodnik po programie
110 - planowane nagrywanie programów telewizyjnych
111 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
112 - podstawowa edycja obrazu
115 Summary: Server component of mythtv (a PVR)
116 Summary(pl): Czê¶æ serwerowa mythtv (PVR)
117 Group: Applications/Multimedia
118 Requires(post,preun): /sbin/chkconfig
119 Requires(postun): /usr/sbin/groupdel
120 Requires(postun): /usr/sbin/userdel
121 Requires(pre): /bin/id
122 Requires(pre): /usr/bin/getgid
123 Requires(pre): /usr/sbin/groupadd
124 Requires(pre): /usr/sbin/useradd
125 Requires: libmyth = %{version}-%{release}
126 Requires: mythtv = %{version}-%{release}
127 Provides: group(mythtv)
128 Provides: user(mythtv)
131 MythTV provides a unified graphical interface for recording and
132 viewing television programs. Refer to the mythtv package for more
135 This package contains only the server software, which provides video
136 and audio capture and encoding services. In order to be useful, it
137 requires a mythtv-frontend installation, either on the same system or
138 one reachable via the network.
140 %description backend -l pl
141 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
142 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
145 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
146 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
147 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
148 albo innym osi±galnym po sieci.
151 Summary: Client component of mythtv (a PVR)
152 Summary(pl): Czê¶æ kliencka mythtv (PVR)
153 Group: Applications/Multimedia
154 Requires: libmyth = %{version}-%{release}
155 Requires: mythtv = %{version}-%{release}
156 Requires: mythtv-themes = %{version}-%{release}
157 Provides: mythtv-frontend-api = %{myth_api_version}
159 %description frontend
160 MythTV provides a unified graphical interface for recording and
161 viewing television programs. Refer to the mythtv package for more
164 This package contains only the client software, which provides a
165 front-end for playback and configuration. It requires access to a
166 mythtv-backend installation, either on the same system or one
167 reachable via the network.
169 %description frontend -l pl
170 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
171 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
174 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczaj±ce
175 frontend do odtwarzania i konfiguracji. Wymaga dostêpu do instalacji
176 mythtv-backend - na tym samym systemie, albo innym osi±galnym po
180 Summary: Setup the mythtv backend
181 Summary(pl): Konfigurator backendu mythtv
182 Group: Applications/Multimedia
183 Requires: libmyth = %{version}-%{release}
186 MythTV provides a unified graphical interface for recording and
187 viewing television programs. Refer to the mythtv package for more
190 This package contains only the setup software for configuring the
193 %description setup -l pl
194 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
195 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
198 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
201 Summary: Base themes for mythtv's frontend
202 Summary(pl): Podstawowe motywy dla frontendu mythtv
203 Group: Applications/Multimedia
206 MythTV provides a unified graphical interface for recording and
207 viewing television programs. Refer to the mythtv package for more
210 This package contains only the base themes used by the frontend and
213 %description themes -l pl
214 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
215 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
218 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
222 Summary: Library providing mythtv support
223 Summary(pl): Biblioteka udostêpniaj±ca obs³ugê mythtv
225 Requires: freetype >= 1:2.0.0
227 Requires: qt >= 6:3.2.1-4
228 Requires: qt-plugin-mysql >= 6:3.2.1-4
230 %description -n libmyth
231 Common library code for MythTV and add-on modules (development) MythTV
232 provides a unified graphical interface for recording and viewing
233 television programs. Refer to the mythtv package for more information.
235 %description -n libmyth -l pl
236 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
237 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
238 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
241 %package -n libmyth-devel
242 Summary: Development files for libmyth
243 Summary(pl): Pliki nag³ówkowe libmyth
244 Group: Development/Libraries
245 Requires: libmyth = %{version}-%{release}
247 %description -n libmyth-devel
248 This package contains the header files for developing add-ons for
251 %description -n libmyth-devel -l pl
252 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
254 %package -n libmyth-static
255 Summary: Static libmyth library
256 Summary(pl): Statyczna biblioteka libmyth
257 Group: Development/Libraries
258 Requires: libmyth-devel = %{version}-%{release}
260 %description -n libmyth-static
261 Static libmyth library.
263 %description -n libmyth-static -l pl
264 Statyczna biblioteka libmyth.
267 %setup -q %{?_rev:-n %{name}}
278 filterdiff -i 'mythtv/*' %{PATCH8} | %{__patch} -p1 -s
280 rm -rf database/old # not supported in PLD
282 # lib64 fix - enable to update patch
283 %if %{_lib} != "lib" && 0
284 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
285 xargs grep -l /lib . | xargs sed -i -e '
286 s,/''usr/lib/,/%{_libdir}/,g
287 s,/''lib/mythtv,/%{_lib}/mythtv,g
288 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
294 %if %{with cpu_autodetect}
295 # Make sure we have /proc mounted
296 if [ ! -r /proc/cpuinfo ]; then
297 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
301 export QTDIR="%{_prefix}"
303 %if "%{_lib}" != "lib"
304 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
305 # help configure::has_library() to locate libs
306 export LD_LIBRARY_PATH=%{_libdir}
309 # NB: not autoconf configure
311 export CXX="%{__cxx}"
313 --prefix=%{_prefix} \
314 --libdir=%{_libdir} \
315 --mandir=%{_mandir} \
317 --disable-distcc --disable-ccache \
318 --compile-type=%{?debug:debug}%{!?debug:release} \
319 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
320 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
321 %if %{with cpu_autodetect}
328 --cpu=i386 --tune=pentium4 \
334 %{?with_mmx:--enable-mmx} \
336 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
337 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
338 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
339 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
340 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
342 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
343 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
344 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
345 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
346 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
350 # --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
351 # --disable-joystick-menu \
353 # --enable-directfb enable DirectFB (Linux non-X11 video)
354 # --enable-directx enable DirectX (Microsoft video)
360 rm -rf $RPM_BUILD_ROOT
361 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
362 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
363 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
364 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
366 export QTDIR="%{_prefix}"
368 INSTALL_ROOT=$RPM_BUILD_ROOT
370 # Install the files that we added on top of mythtv's own stuff
371 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
372 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
373 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
376 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
378 # Install settings.pro so people can see the build options we used
379 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
380 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
382 for p in mythfrontend; do
383 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
384 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
388 # glibc language codes. attempt was made to change it on libmyth side,
389 # but that was just asking for trouble due large coverage of
390 # language.lower() usage.
392 s,%%lang(en_gb),%%lang(en_GB),
393 s,%%lang(zh_tw),%%lang(zh_TW),
394 s,%%lang(pt_br),%%lang(pt_BR),
397 rm -rf mythtvosd mythwelcome mythlcdserver
398 install -d mythtvosd mythwelcome
399 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
400 cp -a programs/mythwelcome/README mythwelcome
401 cp -a programs/mythlcdserver/README mythlcdserver
404 rm -rf $RPM_BUILD_ROOT
407 %groupadd -g 149 %{name}
408 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
409 %addusertogroup %{name} video
410 %addusertogroup %{name} audio
413 /sbin/chkconfig --add mythbackend
416 if [ "$1" = "0" ]; then
417 %service -q mythbackend stop
418 /sbin/chkconfig --del mythbackend
422 if [ "$1" = "0" ]; then
427 %post -n libmyth -p /sbin/ldconfig
428 %postun -n libmyth -p /sbin/ldconfig
431 if [ "$1" = 1 ]; then
432 %banner -e %{name}-setup <<EOF
433 To grant mysql permissions to mythtv, please run
434 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
439 %defattr(644,root,root,755)
440 %doc README* UPGRADING AUTHORS FAQ
441 %doc docs contrib configfiles
442 %doc keys.txt mythtvosd mythwelcome mythlcdserver
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_sbindir}/mythbackend
447 %attr(755,root,root) %{_sbindir}/mythcommflag
448 %attr(755,root,root) %{_bindir}/mythfilldatabase
449 %attr(755,root,root) %{_sbindir}/mythjobqueue
450 %attr(755,root,root) %{_sbindir}/mythlcdserver
451 %attr(755,root,root) %{_bindir}/mythtranscode
452 %attr(775,root,mythtv) %dir /var/lib/mythtv
453 %attr(775,root,mythtv) %dir /var/cache/mythtv
454 %attr(775,root,mythtv) %dir /var/run/mythtv
455 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
456 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
457 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
458 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
460 %files frontend -f mythfrontend.lang
461 %defattr(644,root,root,755)
462 %attr(755,root,root) %{_bindir}/mythfrontend
463 %attr(755,root,root) %{_bindir}/mythshutdown
464 %attr(755,root,root) %{_bindir}/mythtv
465 %attr(755,root,root) %{_bindir}/mythtvosd
466 %attr(755,root,root) %{_bindir}/mythwelcome
467 %dir %{_datadir}/mythtv
468 %dir %{_libdir}/mythtv
469 %{_datadir}/mythtv/*.xml
470 %dir %{_libdir}/mythtv/filters
471 %dir %{_libdir}/mythtv/plugins
472 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
473 %{_datadir}/mythtv/*.ttf
474 %dir %{_datadir}/mythtv/i18n
475 %{_desktopdir}/*.desktop
478 %defattr(644,root,root,755)
480 %attr(755,root,root) %{_bindir}/mythtv-setup
483 %defattr(644,root,root,755)
484 %{_datadir}/mythtv/themes
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
490 %files -n libmyth-devel
491 %defattr(644,root,root,755)
492 %attr(755,root,root) %{_libdir}/*.so
494 %{_datadir}/mythtv/build
496 %files -n libmyth-static
497 %defattr(644,root,root,755)