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