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