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_without opengl # opengl vsync
21 %bcond_without dvb # DVB support
22 %bcond_without xrandr # disable X11 resolution switching
23 %bcond_with ivtv # ivtv support (PVR-250, PVR-350) NFY
24 %bcond_with firewire # ieee1394 (NFY)
25 %bcond_without xvmc # do not use XvMCW
26 %bcond_with mmx # enable mmx
28 # enable mmx automatically on arches having it
29 %ifarch %{ix86} %{x8664}
30 %ifnarch i386 i486 i586 i686
35 Summary: A personal video recorder (PVR) application
36 Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR)
41 Group: Applications/Multimedia
42 Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
43 # Source0-md5: 49fc135e1cde90cd935c1229467fa37e
44 Source1: mythbackend.sysconfig
45 Source2: mythbackend.init
46 Source3: mythbackend.logrotate
47 Source5: mythfrontend.desktop
48 #Patch100: %{name}-branch.diff
49 Patch0: %{name}-lib64.patch
50 Patch1: mythtv-configure.patch
51 Patch2: %{name}-mythstream.patch
52 Patch3: %{name}-ldconfig.patch
53 #Patch4: %{name}-pl.patch
54 Patch5: %{name}-sbinpath.patch
55 Patch6: mythtv-dvdnav-shared.patch
56 Patch7: %{name}-libs.patch
57 Patch8: %{name}-fixes.patch
58 URL: http://www.mythtv.org/
59 #BuildRequires: DirectFB-devel
60 #BuildRequires: XFree86-devel
61 BuildRequires: OpenGL-devel
62 BuildRequires: OpenGL-GLU-devel
63 %{?with_alsa:BuildRequires: alsa-lib-devel}
64 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
65 BuildRequires: freetype-devel >= 1:2.0.0
66 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
67 BuildRequires: lame-libs-devel
68 %{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel}
69 %{?with_firewire:BuildRequires: libavc1394-devel}
70 %{?with_dvb:BuildRequires: libdvb-devel}
71 BuildRequires: libdvdnav-devel
72 %{?with_firewire:BuildRequires: libiec61883-devel}
73 %{?with_firewire:BuildRequires: libraw1394-devel}
74 BuildRequires: linux-libc-headers >= 7:2.6.10
75 %{?with_lirc:BuildRequires: lirc-devel}
76 BuildRequires: mysql-devel
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 BuildRequires: xorg-lib-libXext-devel
85 BuildRequires: xorg-lib-libXxf86vm-devel
86 ExclusiveArch: %{ix86} %{x8664} ppc
87 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
89 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
92 MythTV implements the following PVR features, and more, with a unified
94 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
95 - Video compression using RTjpeg or MPEG-4
96 - Program listing retrieval using XMLTV
97 - Themable, semi-transparent on-screen display
98 - Electronic program guide
99 - Scheduled recording of TV programs
100 - Resolution of conflicts between scheduled recordings
101 - Basic video editing
103 %description -l pl.UTF-8
104 MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
105 ujednoliconym interfejsem graficznym:
106 - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie,
107 przewijanie "żywej" telewizji
108 - kompresja obrazu przy użyciu RTjpeg lub MPEG-4
109 - odczyt listy programów przy użyciu XMLTV
110 - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów
111 - elektroniczny przewodnik po programie
112 - planowane nagrywanie programów telewizyjnych
113 - rozwiązywanie konfliktów między planowanymi nagraniami
114 - podstawowa edycja obrazu
117 Summary: Server component of mythtv (a PVR)
118 Summary(pl.UTF-8): Część serwerowa mythtv (PVR)
119 Group: Applications/Multimedia
120 Requires(post,preun): /sbin/chkconfig
121 Requires(postun): /usr/sbin/groupdel
122 Requires(postun): /usr/sbin/userdel
123 Requires(pre): /bin/id
124 Requires(pre): /usr/bin/getgid
125 Requires(pre): /usr/sbin/groupadd
126 Requires(pre): /usr/sbin/useradd
127 Requires: libmyth = %{version}-%{release}
128 Requires: mythtv = %{version}-%{release}
129 Provides: group(mythtv)
130 Provides: user(mythtv)
133 MythTV provides a unified graphical interface for recording and
134 viewing television programs. Refer to the mythtv package for more
137 This package contains only the server software, which provides video
138 and audio capture and encoding services. In order to be useful, it
139 requires a mythtv-frontend installation, either on the same system or
140 one reachable via the network.
142 %description backend -l pl.UTF-8
143 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
144 oglądania programów telewizyjnych. Więcej informacji w pakiecie
147 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
148 usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
149 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
150 albo innym osiągalnym po sieci.
153 Summary: Client component of mythtv (a PVR)
154 Summary(pl.UTF-8): Część kliencka mythtv (PVR)
155 Group: Applications/Multimedia
156 Requires: libmyth = %{version}-%{release}
157 Requires: mythtv = %{version}-%{release}
158 Requires: mythtv-themes = %{version}-%{release}
159 Provides: mythtv-frontend-api = %{myth_api_version}
161 %description frontend
162 MythTV provides a unified graphical interface for recording and
163 viewing television programs. Refer to the mythtv package for more
166 This package contains only the client software, which provides a
167 front-end for playback and configuration. It requires access to a
168 mythtv-backend installation, either on the same system or one
169 reachable via the network.
171 %description frontend -l pl.UTF-8
172 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
173 oglądania programów telewizyjnych. Więcej informacji w pakiecie
176 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające
177 frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
178 mythtv-backend - na tym samym systemie, albo innym osiągalnym po
182 Summary: Setup the mythtv backend
183 Summary(pl.UTF-8): Konfigurator backendu mythtv
184 Group: Applications/Multimedia
185 Requires: libmyth = %{version}-%{release}
188 MythTV provides a unified graphical interface for recording and
189 viewing television programs. Refer to the mythtv package for more
192 This package contains only the setup software for configuring the
195 %description setup -l pl.UTF-8
196 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
197 oglądania programów telewizyjnych. Więcej informacji w pakiecie
200 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
203 Summary: Base themes for mythtv's frontend
204 Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv
205 Requires: %{name}-frontend = %{version}-%{release}
209 MythTV provides a unified graphical interface for recording and
210 viewing television programs. Refer to the mythtv package for more
213 This package contains only the base themes used by the frontend and
216 %description themes -l pl.UTF-8
217 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
218 oglądania programów telewizyjnych. Więcej informacji w pakiecie
221 Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
225 Summary: Library providing mythtv support
226 Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv
228 Requires: freetype >= 1:2.0.0
230 Requires: qt >= 6:3.2.1-4
231 Requires: qt-plugin-mysql >= 6:3.2.1-4
233 %description -n libmyth
234 Common library code for MythTV and add-on modules (development) MythTV
235 provides a unified graphical interface for recording and viewing
236 television programs. Refer to the mythtv package for more information.
238 %description -n libmyth -l pl.UTF-8
239 Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
240 dostarczający ujednolicony interfejs graficzny do nagrywania i
241 oglądania programów telewizyjnych. Więcej informacji w pakiecie
244 %package -n libmyth-devel
245 Summary: Development files for libmyth
246 Summary(pl.UTF-8): Pliki nagłówkowe libmyth
247 Group: Development/Libraries
248 Requires: libmyth = %{version}-%{release}
250 %description -n libmyth-devel
251 This package contains the header files for developing add-ons for
254 %description -n libmyth-devel -l pl.UTF-8
255 Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
257 %package -n libmyth-static
258 Summary: Static libmyth library
259 Summary(pl.UTF-8): Statyczna biblioteka libmyth
260 Group: Development/Libraries
261 Requires: libmyth-devel = %{version}-%{release}
263 %description -n libmyth-static
264 Static libmyth library.
266 %description -n libmyth-static -l pl.UTF-8
267 Statyczna biblioteka libmyth.
270 %setup -q %{?_rev:-n %{name}}
277 #%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
296 # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain
297 # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will
298 # prevent compiler finding libs from system when they should be looked
299 # from current buildtree.
300 # but that made it link with -lqt which doesn't exist, instead of -lqt-mt
301 # so we make QMAKE wrapper which will do sed subst after calling
302 # qmake. this is the wrapper.
303 cat > qmake-wrapper.sh <<'EOF'
306 while [ $# -gt 0 ]; do
320 if [ "$makefile" ]; then
322 s;-Wl,-rpath,$(QTDIR)/%{_lib};;
323 s;-L$(QTDIR)/%{_lib};;
327 chmod +x qmake-wrapper.sh
330 %if %{with cpu_autodetect}
331 # Make sure we have /proc mounted
332 if [ ! -r /proc/cpuinfo ]; then
333 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
338 # NB: not autoconf configure
339 # help configure::has_library() to locate libs
340 LD_LIBRARY_PATH=%{_libdir} \
344 --prefix=%{_prefix} \
345 --libdir=%{_libdir} \
346 --mandir=%{_mandir} \
347 --disable-distcc --disable-ccache \
348 --compile-type=%{?debug:debug}%{!?debug:release} \
349 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
350 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
351 %if %{with cpu_autodetect}
358 --cpu=i386 --tune=pentium4 \
364 %{?with_mmx:--enable-mmx} \
366 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \
367 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
368 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
369 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
370 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
371 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
372 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
373 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
374 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
375 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
381 QMAKE_LIBDIR_X11=%{?_x_libraries}%{!?_x_libraries:%{_libdir}}
385 QMAKE=$(pwd)/qmake-wrapper.sh
388 rm -rf $RPM_BUILD_ROOT
389 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
390 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
391 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
392 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
394 export QTDIR="%{_prefix}"
396 INSTALL_ROOT=$RPM_BUILD_ROOT
398 # Install the files that we added on top of mythtv's own stuff
399 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
400 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
401 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
404 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
406 # Install settings.pro so people can see the build options we used
407 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
408 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
410 for p in mythfrontend; do
411 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
412 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
416 # glibc language codes. attempt was made to change it on libmyth side,
417 # but that was just asking for trouble due large coverage of
418 # language.lower() usage.
420 s,%%lang(en_gb),%%lang(en_GB),
421 s,%%lang(zh_tw),%%lang(zh_TW),
422 s,%%lang(pt_br),%%lang(pt_BR),
425 rm -rf mythtvosd mythwelcome mythlcdserver
426 install -d mythtvosd mythwelcome
427 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
428 cp -a programs/mythwelcome/README mythwelcome
429 cp -a programs/mythlcdserver/README mythlcdserver
432 rm -rf $RPM_BUILD_ROOT
435 %groupadd -g 149 %{name}
436 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
437 %addusertogroup %{name} video
438 %addusertogroup %{name} audio
441 /sbin/chkconfig --add mythbackend
444 if [ "$1" = "0" ]; then
445 %service -q mythbackend stop
446 /sbin/chkconfig --del mythbackend
450 if [ "$1" = "0" ]; then
455 %post -n libmyth -p /sbin/ldconfig
456 %postun -n libmyth -p /sbin/ldconfig
459 if [ "$1" = 1 ]; then
460 %banner -e %{name}-setup <<EOF
461 To grant mysql permissions to mythtv, please run
462 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
467 %defattr(644,root,root,755)
468 %doc README* UPGRADING AUTHORS FAQ
469 #%doc docs contrib configfiles
470 %doc keys.txt mythtvosd mythwelcome mythlcdserver
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_sbindir}/mythbackend
475 %attr(755,root,root) %{_sbindir}/mythcommflag
476 %attr(755,root,root) %{_bindir}/mythfilldatabase
477 %attr(755,root,root) %{_sbindir}/mythjobqueue
478 %attr(755,root,root) %{_sbindir}/mythlcdserver
479 %attr(755,root,root) %{_bindir}/mythtranscode
480 %attr(755,root,root) %{_bindir}/mythreplex
481 %attr(775,root,mythtv) %dir /var/lib/mythtv
482 %attr(775,root,mythtv) %dir /var/cache/mythtv
483 %attr(775,root,mythtv) %dir /var/run/mythtv
484 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
485 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
486 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
487 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
489 %files frontend -f mythfrontend.lang
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_bindir}/mythfrontend
492 %attr(755,root,root) %{_bindir}/mythshutdown
493 %attr(755,root,root) %{_bindir}/mythtv
494 %attr(755,root,root) %{_bindir}/mythtvosd
495 %attr(755,root,root) %{_bindir}/mythwelcome
496 %dir %{_datadir}/mythtv
497 %dir %{_datadir}/mythtv/themes
498 %dir %{_libdir}/mythtv
499 %{_datadir}/mythtv/*.xml
500 %dir %{_libdir}/mythtv/filters
501 %dir %{_libdir}/mythtv/plugins
502 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
503 %{_datadir}/mythtv/*.ttf
504 %dir %{_datadir}/mythtv/i18n
505 %{_desktopdir}/*.desktop
508 %defattr(644,root,root,755)
510 %attr(755,root,root) %{_bindir}/mythtv-setup
513 %defattr(644,root,root,755)
514 %{_datadir}/mythtv/themes/*
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
520 %files -n libmyth-devel
521 %defattr(644,root,root,755)
522 %attr(755,root,root) %{_libdir}/*.so
524 %{_datadir}/mythtv/build
526 %files -n libmyth-static
527 %defattr(644,root,root,755)