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_with dvb # DVB support # invalid option
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 #define _snap 20060905
38 Summary: A personal video recorder (PVR) application
39 Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR)
42 Release: %{?_snap:0.%{_snap}.%{_rev}.}%{_rel}
44 Group: Applications/Multimedia
45 Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
46 # Source0-md5: db7ab2049e716349e43edf8e67458218
47 #Source0: %{name}-%{version}-fix.tar.bz2
48 #Source0: %{name}-%{_snap}.%{_rev}.tar.bz2
49 Source1: mythbackend.sysconfig
50 Source2: mythbackend.init
51 Source3: mythbackend.logrotate
52 Source5: mythfrontend.desktop
53 #Patch100: %{name}-branch.diff
54 Patch0: %{name}-lib64.patch
55 Patch1: mythtv-configure.patch
56 Patch2: %{name}-mythstream.patch
57 Patch3: %{name}-ldconfig.patch
58 #Patch4: %{name}-pl.patch
59 Patch5: %{name}-sbinpath.patch
60 Patch7: %{name}-optflags.patch
61 Patch8: mythtv-dvdnav-shared.patch
62 Patch9: %{name}-libs.patch
63 URL: http://www.mythtv.org/
64 #BuildRequires: DirectFB-devel
65 #BuildRequires: XFree86-devel
66 %{?with_alsa:BuildRequires: alsa-lib-devel}
67 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
68 BuildRequires: freetype-devel >= 1:2.0.0
69 %{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
70 BuildRequires: lame-libs-devel
71 %{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel}
72 %{?with_firewire:BuildRequires: libavc1394-devel}
73 %{?with_dvb:BuildRequires: libdvb-devel}
74 BuildRequires: libdvdnav-devel
75 %{?with_firewire:BuildRequires: libiec61883-devel}
76 %{?with_firewire:BuildRequires: libraw1394-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
105 %description -l pl.UTF-8
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.UTF-8): 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.UTF-8
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.UTF-8): 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.UTF-8
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.UTF-8): 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.UTF-8
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.UTF-8): Podstawowe motywy dla frontendu mythtv
207 Requires: %{name}-frontend = %{version}-%{release}
211 MythTV provides a unified graphical interface for recording and
212 viewing television programs. Refer to the mythtv package for more
215 This package contains only the base themes used by the frontend and
218 %description themes -l pl.UTF-8
219 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
220 oglądania programów telewizyjnych. Więcej informacji w pakiecie
223 Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
227 Summary: Library providing mythtv support
228 Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv
230 Requires: freetype >= 1:2.0.0
232 Requires: qt >= 6:3.2.1-4
233 Requires: qt-plugin-mysql >= 6:3.2.1-4
235 %description -n libmyth
236 Common library code for MythTV and add-on modules (development) MythTV
237 provides a unified graphical interface for recording and viewing
238 television programs. Refer to the mythtv package for more information.
240 %description -n libmyth -l pl.UTF-8
241 Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
242 dostarczający ujednolicony interfejs graficzny do nagrywania i
243 oglądania programów telewizyjnych. Więcej informacji w pakiecie
246 %package -n libmyth-devel
247 Summary: Development files for libmyth
248 Summary(pl.UTF-8): Pliki nagłówkowe libmyth
249 Group: Development/Libraries
250 Requires: libmyth = %{version}-%{release}
252 %description -n libmyth-devel
253 This package contains the header files for developing add-ons for
256 %description -n libmyth-devel -l pl.UTF-8
257 Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
259 %package -n libmyth-static
260 Summary: Static libmyth library
261 Summary(pl.UTF-8): Statyczna biblioteka libmyth
262 Group: Development/Libraries
263 Requires: libmyth-devel = %{version}-%{release}
265 %description -n libmyth-static
266 Static libmyth library.
268 %description -n libmyth-static -l pl.UTF-8
269 Statyczna biblioteka libmyth.
272 %setup -q %{?_rev:-n %{name}}
279 #%patch4 -p1 REDIFF and submit
286 rm -rf database/old # not supported in PLD
288 # lib64 fix - enable to update patch
289 %if %{_lib} != "lib" && 0
290 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
291 xargs grep -l /lib . | xargs sed -i -e '
292 s,/''usr/lib/,/%{_libdir}/,g
293 s,/''lib/mythtv,/%{_lib}/mythtv,g
294 s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
299 # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain
300 # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will
301 # prevent compiler finding libs from system when they should be looked
302 # from current buildtree.
303 # but that made it link with -lqt which doesn't exist, instead of -lqt-mt
304 # so we make QMAKE wrapper which will do sed subst after calling
305 # qmake. this is the wrapper.
306 cat > qmake-wrapper.sh <<'EOF'
309 while [ $# -gt 0 ]; do
323 if [ "$makefile" ]; then
325 s;-Wl,-rpath,$(QTDIR)/%{_lib};;
326 s;-L$(QTDIR)/%{_lib};;
330 chmod +x qmake-wrapper.sh
333 %if %{with cpu_autodetect}
334 # Make sure we have /proc mounted
335 if [ ! -r /proc/cpuinfo ]; then
336 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
341 export QTDIR="%{_prefix}"
343 # NB: not autoconf configure
344 # help configure::has_library() to locate libs
345 LD_LIBRARY_PATH=%{_libdir} \
349 --prefix=%{_prefix} \
350 --libdir=%{_libdir} \
351 --mandir=%{_mandir} \
353 --disable-distcc --disable-ccache \
354 --compile-type=%{?debug:debug}%{!?debug:release} \
355 --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
356 --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
357 %if %{with cpu_autodetect}
364 --cpu=i386 --tune=pentium4 \
370 %{?with_mmx:--enable-mmx} \
372 %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
373 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
374 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
375 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
376 --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
377 --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
378 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
379 --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
380 --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
381 --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
387 QMAKE_LIBDIR_X11=%{?_x_libraries}%{!?_x_libraries:%{_libdir}}
390 QMAKE=$(pwd)/qmake-wrapper.sh
393 rm -rf $RPM_BUILD_ROOT
394 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
395 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
396 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
397 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
399 export QTDIR="%{_prefix}"
401 INSTALL_ROOT=$RPM_BUILD_ROOT
403 # Install the files that we added on top of mythtv's own stuff
404 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
405 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
406 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
409 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
411 # Install settings.pro so people can see the build options we used
412 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
413 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
415 for p in mythfrontend; do
416 for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
417 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
421 # glibc language codes. attempt was made to change it on libmyth side,
422 # but that was just asking for trouble due large coverage of
423 # language.lower() usage.
425 s,%%lang(en_gb),%%lang(en_GB),
426 s,%%lang(zh_tw),%%lang(zh_TW),
427 s,%%lang(pt_br),%%lang(pt_BR),
430 rm -rf mythtvosd mythwelcome mythlcdserver
431 install -d mythtvosd mythwelcome
432 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
433 cp -a programs/mythwelcome/README mythwelcome
434 cp -a programs/mythlcdserver/README mythlcdserver
437 rm -rf $RPM_BUILD_ROOT
440 %groupadd -g 149 %{name}
441 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
442 %addusertogroup %{name} video
443 %addusertogroup %{name} audio
446 /sbin/chkconfig --add mythbackend
449 if [ "$1" = "0" ]; then
450 %service -q mythbackend stop
451 /sbin/chkconfig --del mythbackend
455 if [ "$1" = "0" ]; then
460 %post -n libmyth -p /sbin/ldconfig
461 %postun -n libmyth -p /sbin/ldconfig
464 if [ "$1" = 1 ]; then
465 %banner -e %{name}-setup <<EOF
466 To grant mysql permissions to mythtv, please run
467 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
472 %defattr(644,root,root,755)
473 %doc README* UPGRADING AUTHORS FAQ
474 %doc docs contrib configfiles
475 %doc keys.txt mythtvosd mythwelcome mythlcdserver
478 %defattr(644,root,root,755)
479 %attr(755,root,root) %{_sbindir}/mythbackend
480 %attr(755,root,root) %{_sbindir}/mythcommflag
481 %attr(755,root,root) %{_bindir}/mythfilldatabase
482 %attr(755,root,root) %{_sbindir}/mythjobqueue
483 %attr(755,root,root) %{_sbindir}/mythlcdserver
484 %attr(755,root,root) %{_bindir}/mythtranscode
485 %attr(755,root,root) %{_bindir}/mythreplex
486 %attr(775,root,mythtv) %dir /var/lib/mythtv
487 %attr(775,root,mythtv) %dir /var/cache/mythtv
488 %attr(775,root,mythtv) %dir /var/run/mythtv
489 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
490 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
491 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
492 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
494 %files frontend -f mythfrontend.lang
495 %defattr(644,root,root,755)
496 %attr(755,root,root) %{_bindir}/mythfrontend
497 %attr(755,root,root) %{_bindir}/mythshutdown
498 %attr(755,root,root) %{_bindir}/mythtv
499 %attr(755,root,root) %{_bindir}/mythtvosd
500 %attr(755,root,root) %{_bindir}/mythwelcome
501 %dir %{_datadir}/mythtv
502 %dir %{_datadir}/mythtv/themes
503 %dir %{_libdir}/mythtv
504 %{_datadir}/mythtv/*.xml
505 %dir %{_libdir}/mythtv/filters
506 %dir %{_libdir}/mythtv/plugins
507 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
508 %{_datadir}/mythtv/*.ttf
509 %dir %{_datadir}/mythtv/i18n
510 %{_desktopdir}/*.desktop
513 %defattr(644,root,root,755)
515 %attr(755,root,root) %{_bindir}/mythtv-setup
518 %defattr(644,root,root,755)
519 %{_datadir}/mythtv/themes/*
522 %defattr(644,root,root,755)
523 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
525 %files -n libmyth-devel
526 %defattr(644,root,root,755)
527 %attr(755,root,root) %{_libdir}/*.so
529 %{_datadir}/mythtv/build
531 %files -n libmyth-static
532 %defattr(644,root,root,755)