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