]> git.pld-linux.org Git - packages/mythtv.git/blob - mythtv.spec
- up to svn 10931
[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.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 Patch7:         %{name}-optflags.patch
57 Patch8:         %{name}-branch.diff
58 URL:            http://www.mythtv.org/
59 #BuildRequires: DirectFB-devel
60 BuildRequires:  XFree86-devel
61 %{?with_alsa:BuildRequires:     alsa-lib-devel}
62 %{?with_arts:BuildRequires:     arts-devel >= 13:0.9.5}
63 BuildRequires:  freetype-devel >= 1:2.0.0
64 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
65 BuildRequires:  lame-libs-devel
66 %{?with_xvmc:BuildRequires:     libXvMCW-devel}
67 %{?with_firewire:BuildRequires: libavc1394-devel}
68 %{?with_dvb:BuildRequires:      libdvb-devel}
69 BuildRequires:  libdvdnav-devel
70 %{?with_firewire:BuildRequires: libiec61883-devel}
71 %{?with_firewire:BuildRequires: libraw1394-devel}
72 %{?with_oggvorbis:BuildRequires:        libvorbis-devel}
73 BuildRequires:  linux-libc-headers >= 7:2.6.10
74 %{?with_lirc:BuildRequires:     lirc-devel}
75 BuildRequires:  mysql-devel
76 BuildRequires:  patchutils
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 %patch7 -p1
278 filterdiff -i 'mythtv/*' %{PATCH8} | %{__patch} -p1 -s
279
280 rm -rf database/old # not supported in PLD
281
282 # lib64 fix - enable to update patch
283 %if %{_lib} != "lib" && 0
284 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
285 xargs grep -l /lib . | xargs sed -i -e '
286         s,/''usr/lib/,/%{_libdir}/,g
287         s,/''lib/mythtv,/%{_lib}/mythtv,g
288         s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
289 '
290 exit 1
291 %endif
292
293 %build
294 %if %{with cpu_autodetect}
295 # Make sure we have /proc mounted
296 if [ ! -r /proc/cpuinfo ]; then
297         echo "You need to have /proc mounted in order to build with cpu_autodetect!"
298         exit 1
299 fi
300 %endif
301 export QTDIR="%{_prefix}"
302
303 %if "%{_lib}" != "lib"
304 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
305 # help configure::has_library() to locate libs
306 export LD_LIBRARY_PATH=%{_libdir}
307 %endif
308
309 # NB: not autoconf configure
310 export CC="%{__cc}"
311 export CXX="%{__cxx}"
312 ./configure \
313         --prefix=%{_prefix} \
314         --libdir=%{_libdir} \
315         --mandir=%{_mandir} \
316         --disable-opts \
317         --disable-distcc --disable-ccache \
318         --compile-type=%{?debug:debug}%{!?debug:release} \
319         --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
320         --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
321 %if %{with cpu_autodetect}
322         --enable-proc-opt \
323 %else
324         %ifarch %{ix86}
325                 %ifarch athlon
326                         --arch=athlon \
327                 %else
328                         --cpu=i386 --tune=pentium4 \
329                 %endif
330         %endif
331         %ifarch %{x8664}
332         --arch=x86_64 \
333         %endif
334         %{?with_mmx:--enable-mmx} \
335 %endif
336         %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
337         --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
338         --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
339         --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
340         --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
341         --enable-dvd \
342         --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
343         --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
344         --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
345         --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
346         --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
347         --enable-xv \
348         --enable-x11 \
349
350 #       --%{?with_oggvorbis:en}%{!?with_oggvorbis:dis}able-vorbis \
351 #       --disable-joystick-menu \
352 #       --disable-ivtv \
353 #       --enable-directfb       enable DirectFB (Linux non-X11 video)
354 #       --enable-directx        enable DirectX  (Microsoft video)
355
356 qmake mythtv.pro
357 %{__make}
358
359 %install
360 rm -rf $RPM_BUILD_ROOT
361 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
362                 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
363                 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
364                 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
365
366 export QTDIR="%{_prefix}"
367 %{__make} install \
368         INSTALL_ROOT=$RPM_BUILD_ROOT
369
370 # Install the files that we added on top of mythtv's own stuff
371 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
372 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
373 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
374
375 # desktop entries
376 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
377
378 # Install settings.pro so people can see the build options we used
379 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
380 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
381
382 for p in mythfrontend; do
383         for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
384                 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
385         done > $p.lang
386 done
387
388 # glibc language codes. attempt was made to change it on libmyth side,
389 # but that was just asking for trouble due large coverage of
390 # language.lower() usage.
391 sed -i -e '
392 s,%%lang(en_gb),%%lang(en_GB),
393 s,%%lang(zh_tw),%%lang(zh_TW),
394 s,%%lang(pt_br),%%lang(pt_BR),
395 ' *.lang
396
397 rm -rf mythtvosd mythwelcome mythlcdserver
398 install -d mythtvosd mythwelcome
399 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
400 cp -a programs/mythwelcome/README mythwelcome
401 cp -a programs/mythlcdserver/README mythlcdserver
402
403 %clean
404 rm -rf $RPM_BUILD_ROOT
405
406 %pre backend
407 %groupadd -g 149 %{name}
408 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
409 %addusertogroup %{name} video
410 %addusertogroup %{name} audio
411
412 %post backend
413 /sbin/chkconfig --add mythbackend
414
415 %preun backend
416 if [ "$1" = "0" ]; then
417         %service -q mythbackend stop
418         /sbin/chkconfig --del mythbackend
419 fi
420
421 %postun backend
422 if [ "$1" = "0" ]; then
423         %userremove %{name}
424         %groupremove %{name}
425 fi
426
427 %post   -n libmyth -p /sbin/ldconfig
428 %postun -n libmyth -p /sbin/ldconfig
429
430 %post setup
431 if [ "$1" = 1 ]; then
432 %banner -e %{name}-setup <<EOF
433 To grant mysql permissions to mythtv, please run
434 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
435 EOF
436 fi
437
438 %files
439 %defattr(644,root,root,755)
440 %doc README* UPGRADING AUTHORS FAQ
441 %doc docs contrib configfiles
442 %doc keys.txt mythtvosd mythwelcome mythlcdserver
443
444 %files backend
445 %defattr(644,root,root,755)
446 %attr(755,root,root) %{_sbindir}/mythbackend
447 %attr(755,root,root) %{_sbindir}/mythcommflag
448 %attr(755,root,root) %{_bindir}/mythfilldatabase
449 %attr(755,root,root) %{_sbindir}/mythjobqueue
450 %attr(755,root,root) %{_sbindir}/mythlcdserver
451 %attr(755,root,root) %{_bindir}/mythtranscode
452 %attr(775,root,mythtv) %dir /var/lib/mythtv
453 %attr(775,root,mythtv) %dir /var/cache/mythtv
454 %attr(775,root,mythtv) %dir /var/run/mythtv
455 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
456 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
457 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
458 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
459
460 %files frontend -f mythfrontend.lang
461 %defattr(644,root,root,755)
462 %attr(755,root,root) %{_bindir}/mythfrontend
463 %attr(755,root,root) %{_bindir}/mythshutdown
464 %attr(755,root,root) %{_bindir}/mythtv
465 %attr(755,root,root) %{_bindir}/mythtvosd
466 %attr(755,root,root) %{_bindir}/mythwelcome
467 %dir %{_datadir}/mythtv
468 %dir %{_libdir}/mythtv
469 %{_datadir}/mythtv/*.xml
470 %dir %{_libdir}/mythtv/filters
471 %dir %{_libdir}/mythtv/plugins
472 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
473 %{_datadir}/mythtv/*.ttf
474 %dir %{_datadir}/mythtv/i18n
475 %{_desktopdir}/*.desktop
476
477 %files setup
478 %defattr(644,root,root,755)
479 %doc database
480 %attr(755,root,root) %{_bindir}/mythtv-setup
481
482 %files themes
483 %defattr(644,root,root,755)
484 %{_datadir}/mythtv/themes
485
486 %files -n libmyth
487 %defattr(644,root,root,755)
488 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
489
490 %files -n libmyth-devel
491 %defattr(644,root,root,755)
492 %attr(755,root,root) %{_libdir}/*.so
493 %{_includedir}/*
494 %{_datadir}/mythtv/build
495
496 %files -n libmyth-static
497 %defattr(644,root,root,755)
498 %{_libdir}/lib*.a
This page took 0.066226 seconds and 3 git commands to generate.