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 %define _snap 20060129
39 Summary: A personal video recorder (PVR) application
40 Summary(pl): Osobista aplikacja do nagrywania obrazu (PVR)
43 Release: 0.%{_snap}.%{_rev}.%{_rel}
45 Group: Applications/Multimedia
46 #Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
47 Source0: %{name}-%{_snap}.%{_rev}.tar.bz2
48 # Source0-md5: 51244a06a86eab2fd287690d9bd46c54
49 Source1: mythbackend.sysconfig
50 Source2: mythbackend.init
51 Source3: mythbackend.logrotate
52 Source5: mythfrontend.desktop
53 Patch0: %{name}-lib64.patch
54 Patch1: %{name}-x86_64-configure.patch
55 Patch2: %{name}-mythstream.patch
56 URL: http://www.mythtv.org/
57 #BuildRequires: DirectFB-devel
58 BuildRequires: XFree86-devel
59 %{?with_alsa:BuildRequires: alsa-lib-devel}
60 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
61 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
62 %{?with_dvb:BuildRequires: libdvb-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
83 ExclusiveArch: %{ix86} %{x8664} ppc
84 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
87 MythTV implements the following PVR features, and more, with a unified
89 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
90 - Video compression using RTjpeg or MPEG-4
91 - Program listing retrieval using XMLTV
92 - Themable, semi-transparent on-screen display
93 - Electronic program guide
94 - Scheduled recording of TV programs
95 - Resolution of conflicts between scheduled recordings
99 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
100 ujednoliconym interfejsem graficznym:
101 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
102 przewijanie "¿ywej" telewizji
103 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
104 - odczyt listy programów przy u¿yciu XMLTV
105 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
106 - elektroniczny przewodnik po programie
107 - planowane nagrywanie programów telewizyjnych
108 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
109 - podstawowa edycja obrazu
112 Summary: Server component of mythtv (a PVR)
113 Summary(pl): Czê¶æ serwerowa mythtv (PVR)
114 Group: Applications/Multimedia
115 Requires(post,preun): /sbin/chkconfig
116 Requires(postun): /usr/sbin/groupdel
117 Requires(postun): /usr/sbin/userdel
118 Requires(pre): /bin/id
119 Requires(pre): /usr/bin/getgid
120 Requires(pre): /usr/sbin/groupadd
121 Requires(pre): /usr/sbin/useradd
122 Requires: mythtv = %{version}-%{release}
123 Provides: group(mythtv)
124 Provides: user(mythtv)
127 MythTV provides a unified graphical interface for recording and
128 viewing television programs. Refer to the mythtv package for more
131 This package contains only the server software, which provides video
132 and audio capture and encoding services. In order to be useful, it
133 requires a mythtv-frontend installation, either on the same system or
134 one reachable via the network.
136 %description backend -l pl
137 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
138 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
141 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
142 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
143 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
144 albo innym osi±galnym po sieci.
147 Summary: Client component of mythtv (a PVR)
148 Summary(pl): Czê¶æ kliencka mythtv (PVR)
149 Group: Applications/Multimedia
150 Requires: mythtv = %{version}-%{release}
151 Requires: mythtv-themes = %{version}-%{release}
152 Provides: mythtv-frontend-api = %(echo %{version} | cut -d. -f1,2)
154 %description frontend
155 MythTV provides a unified graphical interface for recording and
156 viewing television programs. Refer to the mythtv package for more
159 This package contains only the client software, which provides a
160 front-end for playback and configuration. It requires access to a
161 mythtv-backend installation, either on the same system or one
162 reachable via the network.
164 %description frontend -l pl
165 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
166 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
169 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczaj±ce
170 frontend do odtwarzania i konfiguracji. Wymaga dostêpu do instalacji
171 mythtv-backend - na tym samym systemie, albo innym osi±galnym po
175 Summary: Setup the mythtv backend
176 Summary(pl): Konfigurator backendu mythtv
177 Group: Applications/Multimedia
180 MythTV provides a unified graphical interface for recording and
181 viewing television programs. Refer to the mythtv package for more
184 This package contains only the setup software for configuring the
187 %description setup -l pl
188 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
189 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
192 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
195 Summary: Base themes for mythtv's frontend
196 Summary(pl): Podstawowe motywy dla frontendu mythtv
197 Group: Applications/Multimedia
200 MythTV provides a unified graphical interface for recording and
201 viewing television programs. Refer to the mythtv package for more
204 This package contains only the base themes used by the frontend and
207 %description themes -l pl
208 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
209 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
212 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
216 Summary: Library providing mythtv support
217 Summary(pl): Biblioteka udostêpniaj±ca obs³ugê mythtv
219 Requires: freetype >= 1:2.0.0
221 Requires: qt >= 6:3.2.1-4
222 Requires: qt-plugin-mysql >= 6:3.2.1-4
224 %description -n libmyth
225 Common library code for MythTV and add-on modules (development) MythTV
226 provides a unified graphical interface for recording and viewing
227 television programs. Refer to the mythtv package for more information.
229 %description -n libmyth -l pl
230 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
231 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
232 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
235 %package -n libmyth-devel
236 Summary: Development files for libmyth
237 Summary(pl): Pliki nag³ówkowe libmyth
238 Group: Development/Libraries
239 Requires: libmyth = %{version}-%{release}
241 %description -n libmyth-devel
242 This package contains the header files for developing add-ons for
245 %description -n libmyth-devel -l pl
246 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
248 %package -n libmyth-static
249 Summary: Static libmyth library
250 Summary(pl): Statyczna biblioteka libmyth
251 Group: Development/Libraries
252 Requires: libmyth-devel = %{version}-%{release}
254 %description -n libmyth-static
255 Static libmyth library.
257 %description -n libmyth-static -l pl
258 Statyczna biblioteka libmyth.
261 %setup -q %{?_rev:-n %{name}}
268 rm -rf database/old # not supported in PLD
270 # lib64 fix - enable to update patch
271 %if %{_lib} != "lib" && 0
272 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
273 xargs grep -l /lib . | xargs sed -i -e '
274 s,/''usr/lib/,/%{_libdir}/,g
275 s,/''lib/mythtv,/%{_lib}/mythtv,g
276 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
282 %if %{with cpu_autodetect}
283 # Make sure we have /proc mounted
284 if [ ! -r /proc/cpuinfo ]; then
285 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
289 export QTDIR="%{_prefix}"
291 %if "%{_lib}" != "lib"
292 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
293 # help configure::has_library() to locate libs
294 export LD_LIBRARY_PATH=%{_libdir}
297 # NB: not autoconf configure
299 export CXX="%{__cxx}"
301 --prefix=%{_prefix} \
302 --libdir=%{_libdir} \
303 --mandir=%{_mandir} \
305 --disable-distcc --disable-ccache \
306 --compile-type=%{?debug:debug}%{!?debug:release} \
307 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
308 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
309 %if %{with cpu_autodetect}
316 --cpu=i386 --tune=pentium4 \
322 %{?with_mmx:--enable-mmx} \
324 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
325 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
326 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
327 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
328 --%{?with_oss:en}%{!?with_oss:dis}able-audio-jack \
329 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
330 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
331 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
332 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
333 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
337 # --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
338 # --disable-joystick-menu \
340 # --enable-directfb enable DirectFB (Linux non-X11 video)
341 # --enable-directx enable DirectX (Microsoft video)
347 rm -rf $RPM_BUILD_ROOT
348 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
349 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
350 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
351 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
353 export QTDIR="%{_prefix}"
355 INSTALL_ROOT=$RPM_BUILD_ROOT
357 # Install the files that we added on top of mythtv's own stuff
358 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
359 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
360 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
363 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
365 # Install settings.pro so people can see the build options we used
366 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
367 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
369 for p in mythfrontend; do
370 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
371 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
375 # glibc language codes. attempt was made to change it on libmyth side,
376 # but that was just asking for trouble due large coverage of
377 # language.lower() usage.
379 s,%%lang(en_gb),%%lang(en_GB),
380 s,%%lang(zh_tw),%%lang(zh_TW),
381 s,%%lang(pt_br),%%lang(pt_BR),
385 rm -rf $RPM_BUILD_ROOT
388 %groupadd -g 149 %{name}
389 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
390 %addusertogroup %{name} video
391 %addusertogroup %{name} audio
394 /sbin/chkconfig --add mythbackend
397 if [ "$1" = "0" ]; then
398 %service -q mythbackend stop
399 /sbin/chkconfig --del mythbackend
403 if [ "$1" = "0" ]; then
408 %post -n libmyth -p /sbin/ldconfig
409 %postun -n libmyth -p /sbin/ldconfig
412 if [ "$1" = 1 ]; then
413 %banner -e %{name}-setup <<EOF
414 To grant mysql permissions to mythtv, please run
415 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
420 %defattr(644,root,root,755)
421 %doc README* UPGRADING AUTHORS FAQ
422 %doc docs contrib configfiles
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_bindir}/mythbackend
427 %attr(755,root,root) %{_bindir}/mythcommflag
428 %attr(755,root,root) %{_bindir}/mythfilldatabase
429 %attr(755,root,root) %{_bindir}/mythjobqueue
430 %attr(755,root,root) %{_bindir}/mythlcdserver
431 %attr(755,root,root) %{_bindir}/mythtranscode
432 %attr(775,root,mythtv) %dir /var/lib/mythtv
433 %attr(775,root,mythtv) %dir /var/cache/mythtv
434 %attr(775,root,mythtv) %dir /var/run/mythtv
435 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
436 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
437 %config /etc/logrotate.d/mythbackend
438 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
440 %files frontend -f mythfrontend.lang
441 %defattr(644,root,root,755)
443 %attr(755,root,root) %{_bindir}/mythfrontend
444 %attr(755,root,root) %{_bindir}/mythshutdown
445 %attr(755,root,root) %{_bindir}/mythtv
446 %attr(755,root,root) %{_bindir}/mythtvosd
447 %attr(755,root,root) %{_bindir}/mythwelcome
448 %dir %{_datadir}/mythtv
449 %dir %{_libdir}/mythtv
450 %{_datadir}/mythtv/*.xml
451 %dir %{_libdir}/mythtv/filters
452 %dir %{_libdir}/mythtv/plugins
453 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
454 %{_datadir}/mythtv/*.ttf
455 %dir %{_datadir}/mythtv/i18n
456 %{_desktopdir}/*.desktop
459 %defattr(644,root,root,755)
461 %attr(755,root,root) %{_bindir}/mythtv-setup
464 %defattr(644,root,root,755)
465 %{_datadir}/mythtv/themes
468 %defattr(644,root,root,755)
469 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
471 %files -n libmyth-devel
472 %defattr(644,root,root,755)
473 %attr(755,root,root) %{_libdir}/*.so
475 %{_datadir}/mythtv/build
477 %files -n libmyth-static
478 %defattr(644,root,root,755)