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