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