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