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: %{name}-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}-dvdnav-shared.patch
56 Patch7: %{name}-libs.patch
57 Patch8: %{name}-fixes.patch
58 Patch9: %{name}-ffmpeg-API.patch
59 URL: http://www.mythtv.org/
60 BuildRequires: OpenGL-devel
61 BuildRequires: OpenGL-GLU-devel
62 %{?with_alsa:BuildRequires: alsa-lib-devel}
63 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
64 BuildRequires: ffmpeg-devel
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 BuildRequires: xorg-lib-libXext-devel
84 BuildRequires: xorg-lib-libXxf86vm-devel
85 ExclusiveArch: %{ix86} %{x8664} ppc
86 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
91 MythTV implements the following PVR features, and more, with a unified
93 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
94 - Video compression using RTjpeg or MPEG-4
95 - Program listing retrieval using XMLTV
96 - Themable, semi-transparent on-screen display
97 - Electronic program guide
98 - Scheduled recording of TV programs
99 - Resolution of conflicts between scheduled recordings
100 - Basic video editing
102 %description -l pl.UTF-8
103 MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
104 ujednoliconym interfejsem graficznym:
105 - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie,
106 przewijanie "żywej" telewizji
107 - kompresja obrazu przy użyciu RTjpeg lub MPEG-4
108 - odczyt listy programów przy użyciu XMLTV
109 - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów
110 - elektroniczny przewodnik po programie
111 - planowane nagrywanie programów telewizyjnych
112 - rozwiązywanie konfliktów między planowanymi nagraniami
113 - podstawowa edycja obrazu
116 Summary: Server component of mythtv (a PVR)
117 Summary(pl.UTF-8): Część serwerowa mythtv (PVR)
118 Group: Applications/Multimedia
119 Requires(post,preun): /sbin/chkconfig
120 Requires(postun): /usr/sbin/groupdel
121 Requires(postun): /usr/sbin/userdel
122 Requires(pre): /bin/id
123 Requires(pre): /usr/bin/getgid
124 Requires(pre): /usr/sbin/groupadd
125 Requires(pre): /usr/sbin/useradd
126 Requires: libmyth = %{version}-%{release}
127 Requires: mythtv = %{version}-%{release}
128 Provides: group(mythtv)
129 Provides: user(mythtv)
132 MythTV provides a unified graphical interface for recording and
133 viewing television programs. Refer to the mythtv package for more
136 This package contains only the server software, which provides video
137 and audio capture and encoding services. In order to be useful, it
138 requires a mythtv-frontend installation, either on the same system or
139 one reachable via the network.
141 %description backend -l pl.UTF-8
142 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
143 oglądania programów telewizyjnych. Więcej informacji w pakiecie
146 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
147 usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
148 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
149 albo innym osiągalnym po sieci.
152 Summary: Client component of mythtv (a PVR)
153 Summary(pl.UTF-8): Część kliencka mythtv (PVR)
154 Group: Applications/Multimedia
155 Requires: libmyth = %{version}-%{release}
156 Requires: mythtv = %{version}-%{release}
157 Requires: mythtv-themes = %{version}-%{release}
158 Provides: mythtv-frontend-api = %{myth_api_version}
160 %description frontend
161 MythTV provides a unified graphical interface for recording and
162 viewing television programs. Refer to the mythtv package for more
165 This package contains only the client software, which provides a
166 front-end for playback and configuration. It requires access to a
167 mythtv-backend installation, either on the same system or one
168 reachable via the network.
170 %description frontend -l pl.UTF-8
171 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
172 oglądania programów telewizyjnych. Więcej informacji w pakiecie
175 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające
176 frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
177 mythtv-backend - na tym samym systemie, albo innym osiągalnym po
181 Summary: Setup the mythtv backend
182 Summary(pl.UTF-8): Konfigurator backendu mythtv
183 Group: Applications/Multimedia
184 Requires: libmyth = %{version}-%{release}
187 MythTV provides a unified graphical interface for recording and
188 viewing television programs. Refer to the mythtv package for more
191 This package contains only the setup software for configuring the
194 %description setup -l pl.UTF-8
195 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
196 oglądania programów telewizyjnych. Więcej informacji w pakiecie
199 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
202 Summary: Base themes for mythtv's frontend
203 Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv
204 Requires: %{name}-frontend = %{version}-%{release}
208 MythTV provides a unified graphical interface for recording and
209 viewing television programs. Refer to the mythtv package for more
212 This package contains only the base themes used by the frontend and
215 %description themes -l pl.UTF-8
216 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
217 oglądania programów telewizyjnych. Więcej informacji w pakiecie
220 Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
224 Summary: Library providing mythtv support
225 Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv
227 Requires: freetype >= 1:2.0.0
229 Requires: qt >= 6:3.2.1-4
230 Requires: qt-plugin-mysql >= 6:3.2.1-4
232 %description -n libmyth
233 Common library code for MythTV and add-on modules (development) MythTV
234 provides a unified graphical interface for recording and viewing
235 television programs. Refer to the mythtv package for more information.
237 %description -n libmyth -l pl.UTF-8
238 Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
239 dostarczający ujednolicony interfejs graficzny do nagrywania i
240 oglądania programów telewizyjnych. Więcej informacji w pakiecie
243 %package -n libmyth-devel
244 Summary: Development files for libmyth
245 Summary(pl.UTF-8): Pliki nagłówkowe libmyth
246 Group: Development/Libraries
247 Requires: libmyth = %{version}-%{release}
249 %description -n libmyth-devel
250 This package contains the header files for developing add-ons for
253 %description -n libmyth-devel -l pl.UTF-8
254 Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
256 %package -n libmyth-static
257 Summary: Static libmyth library
258 Summary(pl.UTF-8): Statyczna biblioteka libmyth
259 Group: Development/Libraries
260 Requires: libmyth-devel = %{version}-%{release}
262 %description -n libmyth-static
263 Static libmyth library.
265 %description -n libmyth-static -l pl.UTF-8
266 Statyczna biblioteka libmyth.
269 %setup -q %{?_rev:-n %{name}}
276 #%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) %{_bindir}/mythfilldatabase
475 %attr(755,root,root) %{_bindir}/mythtranscode
476 %attr(755,root,root) %{_bindir}/mythreplex
477 %attr(755,root,root) %{_sbindir}/mythbackend
478 %attr(755,root,root) %{_sbindir}/mythcommflag
479 %attr(755,root,root) %{_sbindir}/mythjobqueue
480 %attr(755,root,root) %{_sbindir}/mythlcdserver
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)