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