]> git.pld-linux.org Git - packages/mythtv.git/blob - mythtv.spec
- merged from DEVEL
[packages/mythtv.git] / mythtv.spec
1 # TODO
2 # - bconds: altivec joystick lcd
3 # - lcd? (app-misc/lcdproc)
4 # - icons for desktop entries
5 # - alpha, sparc, ppc arches?
6 #
7 # Specfile for MythTV
8 #
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.
12 #
13 # Conditional build:
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
28
29 # enable mmx automatically on arches having it
30 %ifarch %{ix86} %{x8664}
31 %ifnarch i386 i486 i586 i686
32 %define with_mmx 1
33 %endif
34 %endif
35
36 Summary:        A personal video recorder (PVR) application
37 Summary(pl):    Osobista aplikacja do nagrywania obrazu (PVR)
38 Name:           mythtv
39 Version:        0.19
40 Release:        0.20060213.0.1
41 License:        GPL v2
42 Group:          Applications/Multimedia
43 Source0:        http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
44 # Source0-md5:  ebba5829d264bb4de2f75cae936141f4
45 Source1:        mythbackend.sysconfig
46 Source2:        mythbackend.init
47 Source3:        mythbackend.logrotate
48 Source5:        mythfrontend.desktop
49 Patch0:         %{name}-lib64.patch
50 Patch1:         %{name}-x86_64-configure.patch
51 Patch2:         %{name}-mythstream.patch
52 Patch3:         %{name}-ldconfig.patch
53 Patch4:         %{name}-pl.patch
54 Patch5:         %{name}-sbinpath.patch
55 URL:            http://www.mythtv.org/
56 #BuildRequires: DirectFB-devel
57 BuildRequires:  XFree86-devel
58 %{?with_alsa:BuildRequires:     alsa-lib-devel}
59 %{?with_arts:BuildRequires:     arts-devel >= 13:0.9.5}
60 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
61 %{?with_dvb:BuildRequires:      libdvb-devel}
62 BuildRequires:  libdvdnav-devel
63 %{?with_oggvorbis:BuildRequires:        libvorbis-devel}
64 %if %{with firewire}
65 BuildRequires:  libavc1394-devel
66 BuildRequires:  libiec61883-devel # missing in PLD?
67 BuildRequires:  libraw1394-devel
68 %endif
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-devel
83 ExclusiveArch:  %{ix86} %{x8664} ppc
84 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
85
86 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
87
88 %description
89 MythTV implements the following PVR features, and more, with a unified
90 graphical interface:
91 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
92 - Video compression using RTjpeg or MPEG-4
93 - Program listing retrieval using XMLTV
94 - Themable, semi-transparent on-screen display
95 - Electronic program guide
96 - Scheduled recording of TV programs
97 - Resolution of conflicts between scheduled recordings
98 - Basic video editing
99
100 %description -l pl
101 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
102 ujednoliconym interfejsem graficznym:
103 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
104   przewijanie "¿ywej" telewizji
105 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
106 - odczyt listy programów przy u¿yciu XMLTV
107 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
108 - elektroniczny przewodnik po programie
109 - planowane nagrywanie programów telewizyjnych
110 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
111 - podstawowa edycja obrazu
112
113 %package backend
114 Summary:        Server component of mythtv (a PVR)
115 Summary(pl):    Czê¶æ serwerowa mythtv (PVR)
116 Group:          Applications/Multimedia
117 Requires(post,preun):   /sbin/chkconfig
118 Requires(postun):       /usr/sbin/groupdel
119 Requires(postun):       /usr/sbin/userdel
120 Requires(pre):  /bin/id
121 Requires(pre):  /usr/bin/getgid
122 Requires(pre):  /usr/sbin/groupadd
123 Requires(pre):  /usr/sbin/useradd
124 Requires:       libmyth = %{version}-%{release}
125 Requires:       mythtv = %{version}-%{release}
126 Provides:       group(mythtv)
127 Provides:       user(mythtv)
128
129 %description backend
130 MythTV provides a unified graphical interface for recording and
131 viewing television programs. Refer to the mythtv package for more
132 information.
133
134 This package contains only the server software, which provides video
135 and audio capture and encoding services. In order to be useful, it
136 requires a mythtv-frontend installation, either on the same system or
137 one reachable via the network.
138
139 %description backend -l pl
140 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
141 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
142 mythtv.
143
144 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
145 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
146 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
147 albo innym osi±galnym po sieci.
148
149 %package frontend
150 Summary:        Client component of mythtv (a PVR)
151 Summary(pl):    Czê¶æ kliencka mythtv (PVR)
152 Group:          Applications/Multimedia
153 Requires:       libmyth = %{version}-%{release}
154 Requires:       mythtv = %{version}-%{release}
155 Requires:       mythtv-themes = %{version}-%{release}
156 Provides:       mythtv-frontend-api = %{myth_api_version}
157
158 %description frontend
159 MythTV provides a unified graphical interface for recording and
160 viewing television programs. Refer to the mythtv package for more
161 information.
162
163 This package contains only the client software, which provides a
164 front-end for playback and configuration. It requires access to a
165 mythtv-backend installation, either on the same system or one
166 reachable via the network.
167
168 %description frontend -l pl
169 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
170 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
171 mythtv.
172
173 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczaj±ce
174 frontend do odtwarzania i konfiguracji. Wymaga dostêpu do instalacji
175 mythtv-backend - na tym samym systemie, albo innym osi±galnym po
176 sieci.
177
178 %package setup
179 Summary:        Setup the mythtv backend
180 Summary(pl):    Konfigurator backendu mythtv
181 Group:          Applications/Multimedia
182 Requires:       libmyth = %{version}-%{release}
183
184 %description setup
185 MythTV provides a unified graphical interface for recording and
186 viewing television programs. Refer to the mythtv package for more
187 information.
188
189 This package contains only the setup software for configuring the
190 mythtv backend.
191
192 %description setup -l pl
193 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
194 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
195 mythtv.
196
197 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
198
199 %package themes
200 Summary:        Base themes for mythtv's frontend
201 Summary(pl):    Podstawowe motywy dla frontendu mythtv
202 Group:          Applications/Multimedia
203
204 %description themes
205 MythTV provides a unified graphical interface for recording and
206 viewing television programs. Refer to the mythtv package for more
207 information.
208
209 This package contains only the base themes used by the frontend and
210 mythtvsetup.
211
212 %description themes -l pl
213 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
214 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
215 mythtv.
216
217 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
218 mythtvsetup.
219
220 %package -n libmyth
221 Summary:        Library providing mythtv support
222 Summary(pl):    Biblioteka udostêpniaj±ca obs³ugê mythtv
223 Group:          Libraries
224 Requires:       freetype >= 1:2.0.0
225 Requires:       lame
226 Requires:       qt >= 6:3.2.1-4
227 Requires:       qt-plugin-mysql >= 6:3.2.1-4
228
229 %description -n libmyth
230 Common library code for MythTV and add-on modules (development) MythTV
231 provides a unified graphical interface for recording and viewing
232 television programs. Refer to the mythtv package for more information.
233
234 %description -n libmyth -l pl
235 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
236 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
237 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
238 mythtv.
239
240 %package -n libmyth-devel
241 Summary:        Development files for libmyth
242 Summary(pl):    Pliki nag³ówkowe libmyth
243 Group:          Development/Libraries
244 Requires:       libmyth = %{version}-%{release}
245
246 %description -n libmyth-devel
247 This package contains the header files for developing add-ons for
248 mythtv.
249
250 %description -n libmyth-devel -l pl
251 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
252
253 %package -n libmyth-static
254 Summary:        Static libmyth library
255 Summary(pl):    Statyczna biblioteka libmyth
256 Group:          Development/Libraries
257 Requires:       libmyth-devel = %{version}-%{release}
258
259 %description -n libmyth-static
260 Static libmyth library.
261
262 %description -n libmyth-static -l pl
263 Statyczna biblioteka libmyth.
264
265 %prep
266 %setup -q %{?_rev:-n %{name}}
267 %if %{_lib} != "lib"
268 %patch0 -p1
269 %endif
270 %patch1 -p1
271 %patch2 -p1
272 %patch3 -p1
273 %patch4 -p1
274 %patch5 -p1
275
276 rm -rf database/old # not supported in PLD
277
278 # lib64 fix - enable to update patch
279 %if %{_lib} != "lib" && 0
280 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
281 xargs grep -l /lib . | xargs sed -i -e '
282         s,/''usr/lib/,/%{_libdir}/,g
283         s,/''lib/mythtv,/%{_lib}/mythtv,g
284         s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
285 '
286 exit 1
287 %endif
288
289 %build
290 %if %{with cpu_autodetect}
291 # Make sure we have /proc mounted
292 if [ ! -r /proc/cpuinfo ]; then
293         echo "You need to have /proc mounted in order to build with cpu_autodetect!"
294         exit 1
295 fi
296 %endif
297 export QTDIR="%{_prefix}"
298
299 %if "%{_lib}" != "lib"
300 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
301 # help configure::has_library() to locate libs
302 export LD_LIBRARY_PATH=%{_libdir}
303 %endif
304
305 # NB: not autoconf configure
306 export CC="%{__cc}"
307 export CXX="%{__cxx}"
308 ./configure \
309         --prefix=%{_prefix} \
310         --libdir=%{_libdir} \
311         --mandir=%{_mandir} \
312         --disable-opts \
313         --disable-distcc --disable-ccache \
314         --compile-type=%{?debug:debug}%{!?debug:release} \
315         --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
316         --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
317 %if %{with cpu_autodetect}
318         --enable-proc-opt \
319 %else
320     %ifarch %{ix86}
321                 %ifarch athlon
322                         --arch=athlon \
323                 %else
324                         --cpu=i386 --tune=pentium4 \
325                 %endif
326     %endif
327     %ifarch %{x8664}
328         --arch=x86_64 \
329     %endif
330         %{?with_mmx:--enable-mmx} \
331 %endif
332         %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
333         --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
334         --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
335         --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
336         --%{?with_oss:en}%{!?with_oss:dis}able-audio-jack \
337         --enable-dvd \
338         --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
339         --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
340         --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
341         --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
342         --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
343         --enable-xv \
344         --enable-x11 \
345
346 #       --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
347 #       --disable-joystick-menu \
348 #       --disable-ivtv \
349 #       --enable-directfb       enable DirectFB (Linux non-X11 video)
350 #       --enable-directx        enable DirectX  (Microsoft video)
351
352 qmake mythtv.pro
353 %{__make}
354
355 %install
356 rm -rf $RPM_BUILD_ROOT
357 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
358                 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
359                 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
360                 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
361
362 export QTDIR="%{_prefix}"
363 %{__make} install \
364         INSTALL_ROOT=$RPM_BUILD_ROOT
365
366 # Install the files that we added on top of mythtv's own stuff
367 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
368 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
369 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
370
371 # desktop entries
372 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
373
374 # Install settings.pro so people can see the build options we used
375 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
376 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
377
378 for p in mythfrontend; do
379         for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
380                 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
381         done > $p.lang
382 done
383
384 # glibc language codes. attempt was made to change it on libmyth side,
385 # but that was just asking for trouble due large coverage of
386 # language.lower() usage.
387 sed -i -e '
388 s,%%lang(en_gb),%%lang(en_GB),
389 s,%%lang(zh_tw),%%lang(zh_TW),
390 s,%%lang(pt_br),%%lang(pt_BR),
391 ' *.lang
392
393 rm -rf mythtvosd mythwelcome mythlcdserver
394 mkdir -p mythtvosd mythwelcome
395 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
396 cp -a programs/mythwelcome/README mythwelcome
397 cp -a programs/mythlcdserver/README mythlcdserver
398
399 %clean
400 rm -rf $RPM_BUILD_ROOT
401
402 %pre backend
403 %groupadd -g 149 %{name}
404 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
405 %addusertogroup %{name} video
406 %addusertogroup %{name} audio
407
408 %post backend
409 /sbin/chkconfig --add mythbackend
410
411 %preun backend
412 if [ "$1" = "0" ]; then
413         %service -q mythbackend stop
414         /sbin/chkconfig --del mythbackend
415 fi
416
417 %postun backend
418 if [ "$1" = "0" ]; then
419         %userremove %{name}
420         %groupremove %{name}
421 fi
422
423 %post   -n libmyth -p /sbin/ldconfig
424 %postun -n libmyth -p /sbin/ldconfig
425
426 %post setup
427 if [ "$1" = 1 ]; then
428 %banner -e %{name}-setup <<EOF
429 To grant mysql permissions to mythtv, please run
430 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
431 EOF
432 fi
433
434 %files
435 %defattr(644,root,root,755)
436 %doc README* UPGRADING AUTHORS FAQ
437 %doc docs contrib configfiles
438 %doc keys.txt mythtvosd mythwelcome mythlcdserver
439
440 %files backend
441 %defattr(644,root,root,755)
442 %attr(755,root,root) %{_sbindir}/mythbackend
443 %attr(755,root,root) %{_sbindir}/mythcommflag
444 %attr(755,root,root) %{_bindir}/mythfilldatabase
445 %attr(755,root,root) %{_sbindir}/mythjobqueue
446 %attr(755,root,root) %{_sbindir}/mythlcdserver
447 %attr(755,root,root) %{_bindir}/mythtranscode
448 %attr(775,root,mythtv) %dir /var/lib/mythtv
449 %attr(775,root,mythtv) %dir /var/cache/mythtv
450 %attr(775,root,mythtv) %dir /var/run/mythtv
451 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
452 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
453 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
454 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
455
456 %files frontend -f mythfrontend.lang
457 %defattr(644,root,root,755)
458 %attr(755,root,root) %{_bindir}/mythfrontend
459 %attr(755,root,root) %{_bindir}/mythshutdown
460 %attr(755,root,root) %{_bindir}/mythtv
461 %attr(755,root,root) %{_bindir}/mythtvosd
462 %attr(755,root,root) %{_bindir}/mythwelcome
463 %dir %{_datadir}/mythtv
464 %dir %{_libdir}/mythtv
465 %{_datadir}/mythtv/*.xml
466 %dir %{_libdir}/mythtv/filters
467 %dir %{_libdir}/mythtv/plugins
468 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
469 %{_datadir}/mythtv/*.ttf
470 %dir %{_datadir}/mythtv/i18n
471 %{_desktopdir}/*.desktop
472
473 %files setup
474 %defattr(644,root,root,755)
475 %doc database
476 %attr(755,root,root) %{_bindir}/mythtv-setup
477
478 %files themes
479 %defattr(644,root,root,755)
480 %{_datadir}/mythtv/themes
481
482 %files -n libmyth
483 %defattr(644,root,root,755)
484 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
485
486 %files -n libmyth-devel
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_libdir}/*.so
489 %{_includedir}/*
490 %{_datadir}/mythtv/build
491
492 %files -n libmyth-static
493 %defattr(644,root,root,755)
494 %{_libdir}/lib*.a
This page took 0.12282 seconds and 3 git commands to generate.