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