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