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)
40 Release: 0.20060213.0.1
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 URL: http://www.mythtv.org/
56 #BuildRequires: DirectFB-devel
57 BuildRequires: XFree86-devel
58 %{?with_alsa:BuildRequires: alsa-lib-devel}
59 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
60 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
61 %{?with_dvb:BuildRequires: libdvb-devel}
62 BuildRequires: libdvdnav-devel
63 %{?with_oggvorbis:BuildRequires: libvorbis-devel}
65 BuildRequires: libavc1394-devel
66 BuildRequires: libiec61883-devel # missing in PLD?
67 BuildRequires: libraw1394-devel
69 BuildRequires: freetype-devel >= 1:2.0.0
70 BuildRequires: gcc-c++
71 BuildRequires: lame-libs-devel
72 %{?with_xvmc:BuildRequires: libXvMCW-devel}
73 BuildRequires: linux-libc-headers >= 7:2.6.10
74 %{?with_lirc:BuildRequires: lirc-devel}
75 BuildRequires: mysql-devel
76 BuildRequires: qmake >= 6:3.2.1-4
77 BuildRequires: qt-devel >= 6:3.2.1-4
78 BuildRequires: rpmbuild(macros) >= 1.228
79 BuildRequires: sed >= 4.0
80 # for bundled libavcodec
81 BuildRequires: libdts-devel
82 BuildConflicts: libmyth-devel
83 ExclusiveArch: %{ix86} %{x8664} ppc
84 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
86 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
89 MythTV implements the following PVR features, and more, with a unified
91 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
92 - Video compression using RTjpeg or MPEG-4
93 - Program listing retrieval using XMLTV
94 - Themable, semi-transparent on-screen display
95 - Electronic program guide
96 - Scheduled recording of TV programs
97 - Resolution of conflicts between scheduled recordings
101 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
102 ujednoliconym interfejsem graficznym:
103 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
104 przewijanie "¿ywej" telewizji
105 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
106 - odczyt listy programów przy u¿yciu XMLTV
107 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
108 - elektroniczny przewodnik po programie
109 - planowane nagrywanie programów telewizyjnych
110 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
111 - podstawowa edycja obrazu
114 Summary: Server component of mythtv (a PVR)
115 Summary(pl): Czê¶æ serwerowa mythtv (PVR)
116 Group: Applications/Multimedia
117 Requires(post,preun): /sbin/chkconfig
118 Requires(postun): /usr/sbin/groupdel
119 Requires(postun): /usr/sbin/userdel
120 Requires(pre): /bin/id
121 Requires(pre): /usr/bin/getgid
122 Requires(pre): /usr/sbin/groupadd
123 Requires(pre): /usr/sbin/useradd
124 Requires: libmyth = %{version}-%{release}
125 Requires: mythtv = %{version}-%{release}
126 Provides: group(mythtv)
127 Provides: user(mythtv)
130 MythTV provides a unified graphical interface for recording and
131 viewing television programs. Refer to the mythtv package for more
134 This package contains only the server software, which provides video
135 and audio capture and encoding services. In order to be useful, it
136 requires a mythtv-frontend installation, either on the same system or
137 one reachable via the network.
139 %description backend -l pl
140 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
141 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
144 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
145 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
146 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
147 albo innym osi±galnym po sieci.
150 Summary: Client component of mythtv (a PVR)
151 Summary(pl): Czê¶æ kliencka mythtv (PVR)
152 Group: Applications/Multimedia
153 Requires: libmyth = %{version}-%{release}
154 Requires: mythtv = %{version}-%{release}
155 Requires: mythtv-themes = %{version}-%{release}
156 Provides: mythtv-frontend-api = %{myth_api_version}
158 %description frontend
159 MythTV provides a unified graphical interface for recording and
160 viewing television programs. Refer to the mythtv package for more
163 This package contains only the client software, which provides a
164 front-end for playback and configuration. It requires access to a
165 mythtv-backend installation, either on the same system or one
166 reachable via the network.
168 %description frontend -l pl
169 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
170 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
173 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczaj±ce
174 frontend do odtwarzania i konfiguracji. Wymaga dostêpu do instalacji
175 mythtv-backend - na tym samym systemie, albo innym osi±galnym po
179 Summary: Setup the mythtv backend
180 Summary(pl): Konfigurator backendu mythtv
181 Group: Applications/Multimedia
182 Requires: libmyth = %{version}-%{release}
185 MythTV provides a unified graphical interface for recording and
186 viewing television programs. Refer to the mythtv package for more
189 This package contains only the setup software for configuring the
192 %description setup -l pl
193 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
194 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
197 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
200 Summary: Base themes for mythtv's frontend
201 Summary(pl): Podstawowe motywy dla frontendu mythtv
202 Group: Applications/Multimedia
205 MythTV provides a unified graphical interface for recording and
206 viewing television programs. Refer to the mythtv package for more
209 This package contains only the base themes used by the frontend and
212 %description themes -l pl
213 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
214 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
217 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
221 Summary: Library providing mythtv support
222 Summary(pl): Biblioteka udostêpniaj±ca obs³ugê mythtv
224 Requires: freetype >= 1:2.0.0
226 Requires: qt >= 6:3.2.1-4
227 Requires: qt-plugin-mysql >= 6:3.2.1-4
229 %description -n libmyth
230 Common library code for MythTV and add-on modules (development) MythTV
231 provides a unified graphical interface for recording and viewing
232 television programs. Refer to the mythtv package for more information.
234 %description -n libmyth -l pl
235 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
236 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
237 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
240 %package -n libmyth-devel
241 Summary: Development files for libmyth
242 Summary(pl): Pliki nag³ówkowe libmyth
243 Group: Development/Libraries
244 Requires: libmyth = %{version}-%{release}
246 %description -n libmyth-devel
247 This package contains the header files for developing add-ons for
250 %description -n libmyth-devel -l pl
251 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
253 %package -n libmyth-static
254 Summary: Static libmyth library
255 Summary(pl): Statyczna biblioteka libmyth
256 Group: Development/Libraries
257 Requires: libmyth-devel = %{version}-%{release}
259 %description -n libmyth-static
260 Static libmyth library.
262 %description -n libmyth-static -l pl
263 Statyczna biblioteka libmyth.
266 %setup -q %{?_rev:-n %{name}}
276 rm -rf database/old # not supported in PLD
278 # lib64 fix - enable to update patch
279 %if %{_lib} != "lib" && 0
280 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
281 xargs grep -l /lib . | xargs sed -i -e '
282 s,/''usr/lib/,/%{_libdir}/,g
283 s,/''lib/mythtv,/%{_lib}/mythtv,g
284 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
290 %if %{with cpu_autodetect}
291 # Make sure we have /proc mounted
292 if [ ! -r /proc/cpuinfo ]; then
293 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
297 export QTDIR="%{_prefix}"
299 %if "%{_lib}" != "lib"
300 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
301 # help configure::has_library() to locate libs
302 export LD_LIBRARY_PATH=%{_libdir}
305 # NB: not autoconf configure
307 export CXX="%{__cxx}"
309 --prefix=%{_prefix} \
310 --libdir=%{_libdir} \
311 --mandir=%{_mandir} \
313 --disable-distcc --disable-ccache \
314 --compile-type=%{?debug:debug}%{!?debug:release} \
315 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
316 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
317 %if %{with cpu_autodetect}
324 --cpu=i386 --tune=pentium4 \
330 %{?with_mmx:--enable-mmx} \
332 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
333 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
334 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
335 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
336 --%{?with_oss:en}%{!?with_oss:dis}able-audio-jack \
338 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
339 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
340 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
341 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
342 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
346 # --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
347 # --disable-joystick-menu \
349 # --enable-directfb enable DirectFB (Linux non-X11 video)
350 # --enable-directx enable DirectX (Microsoft video)
356 rm -rf $RPM_BUILD_ROOT
357 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
358 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
359 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
360 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
362 export QTDIR="%{_prefix}"
364 INSTALL_ROOT=$RPM_BUILD_ROOT
366 # Install the files that we added on top of mythtv's own stuff
367 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
368 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
369 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
372 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
374 # Install settings.pro so people can see the build options we used
375 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
376 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
378 for p in mythfrontend; do
379 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
380 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
384 # glibc language codes. attempt was made to change it on libmyth side,
385 # but that was just asking for trouble due large coverage of
386 # language.lower() usage.
388 s,%%lang(en_gb),%%lang(en_GB),
389 s,%%lang(zh_tw),%%lang(zh_TW),
390 s,%%lang(pt_br),%%lang(pt_BR),
393 rm -rf mythtvosd mythwelcome mythlcdserver
394 mkdir -p mythtvosd mythwelcome
395 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
396 cp -a programs/mythwelcome/README mythwelcome
397 cp -a programs/mythlcdserver/README mythlcdserver
400 rm -rf $RPM_BUILD_ROOT
403 %groupadd -g 149 %{name}
404 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
405 %addusertogroup %{name} video
406 %addusertogroup %{name} audio
409 /sbin/chkconfig --add mythbackend
412 if [ "$1" = "0" ]; then
413 %service -q mythbackend stop
414 /sbin/chkconfig --del mythbackend
418 if [ "$1" = "0" ]; then
423 %post -n libmyth -p /sbin/ldconfig
424 %postun -n libmyth -p /sbin/ldconfig
427 if [ "$1" = 1 ]; then
428 %banner -e %{name}-setup <<EOF
429 To grant mysql permissions to mythtv, please run
430 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
435 %defattr(644,root,root,755)
436 %doc README* UPGRADING AUTHORS FAQ
437 %doc docs contrib configfiles
438 %doc keys.txt mythtvosd mythwelcome mythlcdserver
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_sbindir}/mythbackend
443 %attr(755,root,root) %{_sbindir}/mythcommflag
444 %attr(755,root,root) %{_bindir}/mythfilldatabase
445 %attr(755,root,root) %{_sbindir}/mythjobqueue
446 %attr(755,root,root) %{_sbindir}/mythlcdserver
447 %attr(755,root,root) %{_bindir}/mythtranscode
448 %attr(775,root,mythtv) %dir /var/lib/mythtv
449 %attr(775,root,mythtv) %dir /var/cache/mythtv
450 %attr(775,root,mythtv) %dir /var/run/mythtv
451 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
452 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
453 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
454 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
456 %files frontend -f mythfrontend.lang
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_bindir}/mythfrontend
459 %attr(755,root,root) %{_bindir}/mythshutdown
460 %attr(755,root,root) %{_bindir}/mythtv
461 %attr(755,root,root) %{_bindir}/mythtvosd
462 %attr(755,root,root) %{_bindir}/mythwelcome
463 %dir %{_datadir}/mythtv
464 %dir %{_libdir}/mythtv
465 %{_datadir}/mythtv/*.xml
466 %dir %{_libdir}/mythtv/filters
467 %dir %{_libdir}/mythtv/plugins
468 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
469 %{_datadir}/mythtv/*.ttf
470 %dir %{_datadir}/mythtv/i18n
471 %{_desktopdir}/*.desktop
474 %defattr(644,root,root,755)
476 %attr(755,root,root) %{_bindir}/mythtv-setup
479 %defattr(644,root,root,755)
480 %{_datadir}/mythtv/themes
483 %defattr(644,root,root,755)
484 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
486 %files -n libmyth-devel
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_libdir}/*.so
490 %{_datadir}/mythtv/build
492 %files -n libmyth-static
493 %defattr(644,root,root,755)