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_with dvb # DVB support # invalid option
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 20060905
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-md5: 52bec1e0fadf7d24d6dcac3f773ddf74
48 #Source0: %{name}-%{_snap}.%{_rev}.tar.bz2
49 Source1: mythbackend.sysconfig
50 Source2: mythbackend.init
51 Source3: mythbackend.logrotate
52 Source5: mythfrontend.desktop
53 Patch0: %{name}-lib64.patch
55 Patch2: %{name}-mythstream.patch
56 Patch3: %{name}-ldconfig.patch
57 #Patch4: %{name}-pl.patch
58 Patch5: %{name}-sbinpath.patch
60 Patch7: %{name}-optflags.patch
61 #Patch8: %{name}-branch.diff
62 URL: http://www.mythtv.org/
63 #BuildRequires: DirectFB-devel
64 BuildRequires: XFree86-devel
65 %{?with_alsa:BuildRequires: alsa-lib-devel}
66 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
67 BuildRequires: freetype-devel >= 1:2.0.0
68 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
69 BuildRequires: lame-libs-devel
70 %{?with_xvmc:BuildRequires: libXvMCW-devel}
71 %{?with_firewire:BuildRequires: libavc1394-devel}
72 %{?with_dvb:BuildRequires: libdvb-devel}
73 BuildRequires: libdvdnav-devel
74 %{?with_firewire:BuildRequires: libiec61883-devel}
75 %{?with_firewire:BuildRequires: libraw1394-devel}
76 %{?with_oggvorbis:BuildRequires: libvorbis-devel}
77 BuildRequires: linux-libc-headers >= 7:2.6.10
78 %{?with_lirc:BuildRequires: lirc-devel}
79 BuildRequires: mysql-devel
80 BuildRequires: patchutils
81 BuildRequires: qmake >= 6:3.2.1-4
82 BuildRequires: qt-devel >= 6:3.2.1-4
83 BuildRequires: rpmbuild(macros) >= 1.228
84 BuildRequires: sed >= 4.0
85 # for bundled libavcodec
86 BuildRequires: libdts-devel
87 #BuildConflicts: libmyth-devel
88 ExclusiveArch: %{ix86} %{x8664} ppc
89 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
91 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
94 MythTV implements the following PVR features, and more, with a unified
96 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
97 - Video compression using RTjpeg or MPEG-4
98 - Program listing retrieval using XMLTV
99 - Themable, semi-transparent on-screen display
100 - Electronic program guide
101 - Scheduled recording of TV programs
102 - Resolution of conflicts between scheduled recordings
103 - Basic video editing
106 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
107 ujednoliconym interfejsem graficznym:
108 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
109 przewijanie "¿ywej" telewizji
110 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
111 - odczyt listy programów przy u¿yciu XMLTV
112 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
113 - elektroniczny przewodnik po programie
114 - planowane nagrywanie programów telewizyjnych
115 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
116 - podstawowa edycja obrazu
119 Summary: Server component of mythtv (a PVR)
120 Summary(pl): Czê¶æ serwerowa mythtv (PVR)
121 Group: Applications/Multimedia
122 Requires(post,preun): /sbin/chkconfig
123 Requires(postun): /usr/sbin/groupdel
124 Requires(postun): /usr/sbin/userdel
125 Requires(pre): /bin/id
126 Requires(pre): /usr/bin/getgid
127 Requires(pre): /usr/sbin/groupadd
128 Requires(pre): /usr/sbin/useradd
129 Requires: libmyth = %{version}-%{release}
130 Requires: mythtv = %{version}-%{release}
131 Provides: group(mythtv)
132 Provides: user(mythtv)
135 MythTV provides a unified graphical interface for recording and
136 viewing television programs. Refer to the mythtv package for more
139 This package contains only the server software, which provides video
140 and audio capture and encoding services. In order to be useful, it
141 requires a mythtv-frontend installation, either on the same system or
142 one reachable via the network.
144 %description backend -l pl
145 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
146 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
149 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
150 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
151 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
152 albo innym osi±galnym po sieci.
155 Summary: Client component of mythtv (a PVR)
156 Summary(pl): Czê¶æ kliencka mythtv (PVR)
157 Group: Applications/Multimedia
158 Requires: libmyth = %{version}-%{release}
159 Requires: mythtv = %{version}-%{release}
160 Requires: mythtv-themes = %{version}-%{release}
161 Provides: mythtv-frontend-api = %{myth_api_version}
163 %description frontend
164 MythTV provides a unified graphical interface for recording and
165 viewing television programs. Refer to the mythtv package for more
168 This package contains only the client software, which provides a
169 front-end for playback and configuration. It requires access to a
170 mythtv-backend installation, either on the same system or one
171 reachable via the network.
173 %description frontend -l pl
174 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
175 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
178 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczaj±ce
179 frontend do odtwarzania i konfiguracji. Wymaga dostêpu do instalacji
180 mythtv-backend - na tym samym systemie, albo innym osi±galnym po
184 Summary: Setup the mythtv backend
185 Summary(pl): Konfigurator backendu mythtv
186 Group: Applications/Multimedia
187 Requires: libmyth = %{version}-%{release}
190 MythTV provides a unified graphical interface for recording and
191 viewing television programs. Refer to the mythtv package for more
194 This package contains only the setup software for configuring the
197 %description setup -l pl
198 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
199 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
202 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
205 Summary: Base themes for mythtv's frontend
206 Summary(pl): Podstawowe motywy dla frontendu mythtv
207 Group: Applications/Multimedia
210 MythTV provides a unified graphical interface for recording and
211 viewing television programs. Refer to the mythtv package for more
214 This package contains only the base themes used by the frontend and
217 %description themes -l pl
218 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
219 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
222 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
226 Summary: Library providing mythtv support
227 Summary(pl): Biblioteka udostêpniaj±ca obs³ugê mythtv
229 Requires: freetype >= 1:2.0.0
231 Requires: qt >= 6:3.2.1-4
232 Requires: qt-plugin-mysql >= 6:3.2.1-4
234 %description -n libmyth
235 Common library code for MythTV and add-on modules (development) MythTV
236 provides a unified graphical interface for recording and viewing
237 television programs. Refer to the mythtv package for more information.
239 %description -n libmyth -l pl
240 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
241 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
242 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
245 %package -n libmyth-devel
246 Summary: Development files for libmyth
247 Summary(pl): Pliki nag³ówkowe libmyth
248 Group: Development/Libraries
249 Requires: libmyth = %{version}-%{release}
251 %description -n libmyth-devel
252 This package contains the header files for developing add-ons for
255 %description -n libmyth-devel -l pl
256 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
258 %package -n libmyth-static
259 Summary: Static libmyth library
260 Summary(pl): Statyczna biblioteka libmyth
261 Group: Development/Libraries
262 Requires: libmyth-devel = %{version}-%{release}
264 %description -n libmyth-static
265 Static libmyth library.
267 %description -n libmyth-static -l pl
268 Statyczna biblioteka libmyth.
271 %setup -q %{?_rev:-n %{name}}
278 #%patch4 -p1 REDIFF and submit
283 rm -rf database/old # not supported in PLD
285 # lib64 fix - enable to update patch
286 %if %{_lib} != "lib" && 0
287 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
288 xargs grep -l /lib . | xargs sed -i -e '
289 s,/''usr/lib/,/%{_libdir}/,g
290 s,/''lib/mythtv,/%{_lib}/mythtv,g
291 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
297 %if %{with cpu_autodetect}
298 # Make sure we have /proc mounted
299 if [ ! -r /proc/cpuinfo ]; then
300 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
304 export QTDIR="%{_prefix}"
306 %if "%{_lib}" != "lib"
307 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
308 # help configure::has_library() to locate libs
309 export LD_LIBRARY_PATH=%{_libdir}
312 # NB: not autoconf configure
314 export CXX="%{__cxx}"
316 --prefix=%{_prefix} \
317 --libdir=%{_libdir} \
318 --mandir=%{_mandir} \
320 --disable-distcc --disable-ccache \
321 --compile-type=%{?debug:debug}%{!?debug:release} \
322 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
323 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
324 %if %{with cpu_autodetect}
331 --cpu=i386 --tune=pentium4 \
337 %{?with_mmx:--enable-mmx} \
339 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
340 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
341 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
342 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
343 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
344 %{?with_new:--enable-dvd} \
345 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
346 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
347 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
348 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
349 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
353 # --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
354 # --disable-joystick-menu \
356 # --enable-directfb enable DirectFB (Linux non-X11 video)
357 # --enable-directx enable DirectX (Microsoft video)
363 rm -rf $RPM_BUILD_ROOT
364 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
365 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
366 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
367 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
369 export QTDIR="%{_prefix}"
371 INSTALL_ROOT=$RPM_BUILD_ROOT
373 # Install the files that we added on top of mythtv's own stuff
374 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
375 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
376 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
379 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
381 # Install settings.pro so people can see the build options we used
382 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
383 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
385 for p in mythfrontend; do
386 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
387 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
391 # glibc language codes. attempt was made to change it on libmyth side,
392 # but that was just asking for trouble due large coverage of
393 # language.lower() usage.
395 s,%%lang(en_gb),%%lang(en_GB),
396 s,%%lang(zh_tw),%%lang(zh_TW),
397 s,%%lang(pt_br),%%lang(pt_BR),
400 rm -rf mythtvosd mythwelcome mythlcdserver
401 install -d mythtvosd mythwelcome
402 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
403 cp -a programs/mythwelcome/README mythwelcome
404 cp -a programs/mythlcdserver/README mythlcdserver
407 rm -rf $RPM_BUILD_ROOT
410 %groupadd -g 149 %{name}
411 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
412 %addusertogroup %{name} video
413 %addusertogroup %{name} audio
416 /sbin/chkconfig --add mythbackend
419 if [ "$1" = "0" ]; then
420 %service -q mythbackend stop
421 /sbin/chkconfig --del mythbackend
425 if [ "$1" = "0" ]; then
430 %post -n libmyth -p /sbin/ldconfig
431 %postun -n libmyth -p /sbin/ldconfig
434 if [ "$1" = 1 ]; then
435 %banner -e %{name}-setup <<EOF
436 To grant mysql permissions to mythtv, please run
437 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
442 %defattr(644,root,root,755)
443 %doc README* UPGRADING AUTHORS FAQ
444 %doc docs contrib configfiles
445 %doc keys.txt mythtvosd mythwelcome mythlcdserver
448 %defattr(644,root,root,755)
449 %attr(755,root,root) %{_sbindir}/mythbackend
450 %attr(755,root,root) %{_sbindir}/mythcommflag
451 %attr(755,root,root) %{_bindir}/mythfilldatabase
452 %attr(755,root,root) %{_sbindir}/mythjobqueue
453 %attr(755,root,root) %{_sbindir}/mythlcdserver
454 %attr(755,root,root) %{_bindir}/mythtranscode
455 %attr(775,root,mythtv) %dir /var/lib/mythtv
456 %attr(775,root,mythtv) %dir /var/cache/mythtv
457 %attr(775,root,mythtv) %dir /var/run/mythtv
458 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
459 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
460 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
461 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
463 %files frontend -f mythfrontend.lang
464 %defattr(644,root,root,755)
465 %attr(755,root,root) %{_bindir}/mythfrontend
466 %attr(755,root,root) %{_bindir}/mythshutdown
467 %attr(755,root,root) %{_bindir}/mythtv
468 %attr(755,root,root) %{_bindir}/mythtvosd
469 %attr(755,root,root) %{_bindir}/mythwelcome
470 %dir %{_datadir}/mythtv
471 %dir %{_libdir}/mythtv
472 %{_datadir}/mythtv/*.xml
473 %dir %{_libdir}/mythtv/filters
474 %dir %{_libdir}/mythtv/plugins
475 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
476 %{_datadir}/mythtv/*.ttf
477 %dir %{_datadir}/mythtv/i18n
478 %{_desktopdir}/*.desktop
481 %defattr(644,root,root,755)
483 %attr(755,root,root) %{_bindir}/mythtv-setup
486 %defattr(644,root,root,755)
487 %{_datadir}/mythtv/themes
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
493 %files -n libmyth-devel
494 %defattr(644,root,root,755)
495 %attr(755,root,root) %{_libdir}/*.so
497 %{_datadir}/mythtv/build
499 %files -n libmyth-static
500 %defattr(644,root,root,755)