]> git.pld-linux.org Git - packages/mythtv.git/blob - mythtv.spec
- fixed desktop files
[packages/mythtv.git] / mythtv.spec
1 # TODO
2 # - bconds: altivec joystick lcd unichrome xrandr
3 # - lcd? ( app-misc/lcdproc )
4 #
5 # Specfile for MythTV
6 #
7 #  MythTV now uses a fairly intelligent cpu-detection script, so if you are
8 #  building an rpm by hand on the machine it will be used on, I encourage you
9 #  to use "--with cpu_autodetect" to let mythtv decide for you.
10 #
11 # Conditional build:
12 %bcond_with     cpu_autodetect  # enable CPU autodetection at compile time
13 %bcond_without  lirc            # lirc support
14 %bcond_without  alsa            # alsa support
15 %bcond_without  oss             # oss support
16 %bcond_without  arts            # arts support
17 %bcond_without  jack            # jack audio connection kit
18 %bcond_without  oggvorbis       # ogg vorbis
19 %bcond_without  opengl          # opengl vsync
20 %bcond_without  nvidia          # MPEG accel.
21 %bcond_without  dvb             # DVB
22 %bcond_with     firewire        # ieee1394 (NFY)
23
24 %if %{with nvidia}
25 %define with_opengl 1
26 %endif
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.17
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 BuildRequires:  linux-libc-headers >= 7:2.6.10
64 %{?with_lirc:BuildRequires:     lirc-devel}
65 BuildRequires:  mysql-devel
66 %{?with_nvidia:BuildRequires:   X11-driver-nvidia-devel}
67 %{?with_opengl:BuildRequires:   X11-driver-nvidia-devel}
68 BuildRequires:  qmake >= 6:3.2.1-4
69 BuildRequires:  qt-devel >= 6:3.2.1-4
70 BuildRequires:  rpmbuild(macros) >= 1.228
71 BuildRequires:  sed >= 4.0
72 ExclusiveArch:  %{ix86} %{x8664}
73 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75 %description
76 MythTV implements the following PVR features, and more, with a unified
77 graphical interface:
78 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
79 - Video compression using RTjpeg or MPEG-4
80 - Program listing retrieval using XMLTV
81 - Themable, semi-transparent on-screen display
82 - Electronic program guide
83 - Scheduled recording of TV programs
84 - Resolution of conflicts between scheduled recordings
85 - Basic video editing
86
87 %description -l pl
88 MythTV implementuje nastêpuj±ce mo¿liwo¶ci PVR, a nawet wiêcej, wraz z
89 ujednoliconym interfejsem graficznym:
90 - podstawowa funkcjonalno¶æ "live-tv"; pauza, szybkie przewijanie,
91   przewijanie "¿ywej" telewizji
92 - kompresja obrazu przy u¿yciu RTjpeg lub MPEG-4
93 - odczyt listy programów przy u¿yciu XMLTV
94 - pseudoprzezroczyste wy¶wietlanie na obrazie (OSD) z obs³ug± motywów
95 - elektroniczny przewodnik po programie
96 - planowane nagrywanie programów telewizyjnych
97 - rozwi±zywanie konfliktów miêdzy planowanymi nagraniami
98 - podstawowa edycja obrazu
99
100 %package backend
101 Summary:        Server component of mythtv (a PVR)
102 Summary(pl):    Czê¶æ serwerowa mythtv (PVR)
103 Group:          Applications/Multimedia
104 Requires(pre):  /bin/id
105 Requires(pre):  /usr/bin/getgid
106 Requires(pre):  /usr/sbin/groupadd
107 Requires(pre):  /usr/sbin/useradd
108 Requires(postun):       /usr/sbin/groupdel
109 Requires(postun):       /usr/sbin/userdel
110 Requires(post,preun):   /sbin/chkconfig
111 Requires:       mythtv = %{version}-%{release}
112 Provides:       user(mythtv)
113 Provides:       group(mythtv)
114
115 %description backend
116 MythTV provides a unified graphical interface for recording and
117 viewing television programs. Refer to the mythtv package for more
118 information.
119
120 This package contains only the server software, which provides video
121 and audio capture and encoding services. In order to be useful, it
122 requires a mythtv-frontend installation, either on the same system or
123 one reachable via the network.
124
125 %description backend -l pl
126 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
127 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
128 mythtv.
129
130 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostêpniaj±ce
131 us³ugi przechwytywania i kodowania obrazu i d¼wiêku. Aby by³o
132 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
133 albo innym osi±galnym po sieci.
134
135 %package frontend
136 Summary:        Client component of mythtv (a PVR)
137 Summary(pl):    Czê¶æ kliencka mythtv (PVR)
138 Group:          Applications/Multimedia
139 Requires:       mythtv = %{version}-%{release}
140 Requires:       mythtv-themes = %{version}-%{release}
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 Requires:       mythtv-backend = %{version}-%{release}
167 Requires:       mythtv-themes = %{version}-%{release}
168
169 %description setup
170 MythTV provides a unified graphical interface for recording and
171 viewing television programs. Refer to the mythtv package for more
172 information.
173
174 This package contains only the setup software for configuring the
175 mythtv backend.
176
177 %description setup -l pl
178 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
179 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
180 mythtv.
181
182 Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
183
184 %package themes
185 Summary:        Base themes for mythtv's frontend
186 Summary(pl):    Podstawowe motywy dla frontendu mythtv
187 Group:          Applications/Multimedia
188 Obsoletes:      mythtv-theme-Titivillus
189
190 %description themes
191 MythTV provides a unified graphical interface for recording and
192 viewing television programs. Refer to the mythtv package for more
193 information.
194
195 This package contains only the base themes used by the frontend and
196 mythtvsetup.
197
198 %description themes -l pl
199 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
200 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
201 mythtv.
202
203 Ten pakiet zawiera tylko podstawowe motywy u¿ywane przez frontend oraz
204 mythtvsetup.
205
206 %package -n libmyth
207 Summary:        Library providing mythtv support
208 Summary(pl):    Biblioteka udostêpniaj±ca obs³ugê mythtv
209 Group:          Libraries
210 Requires:       freetype >= 1:2.0.0
211 Requires:       lame
212 Requires:       qt >= 6:3.2.1-4
213 Requires:       qt-plugin-mysql >= 6:3.2.1-4
214
215 %description -n libmyth
216 Common library code for MythTV and add-on modules (development) MythTV
217 provides a unified graphical interface for recording and viewing
218 television programs. Refer to the mythtv package for more information.
219
220 %description -n libmyth -l pl
221 Wspólny kod biblioteki dla MythTV i dodatkowych modu³ów MythTV
222 dostarczaj±cy ujednolicony interfejs graficzny do nagrywania i
223 ogl±dania programów telewizyjnych. Wiêcej informacji w pakiecie
224 mythtv.
225
226 %package -n libmyth-devel
227 Summary:        Development files for libmyth
228 Summary(pl):    Pliki nag³ówkowe libmyth
229 Group:          Development/Libraries
230 Requires:       libmyth = %{version}-%{release}
231
232 %description -n libmyth-devel
233 This package contains the header files for developing add-ons for
234 mythtv.
235
236 %description -n libmyth-devel -l pl
237 Ten pakiet zawiera pliki nag³ówkowe do tworzenia dodatków dla mythtv.
238
239 %package -n libmyth-static
240 Summary:        Static libmyth library
241 Summary(pl):    Statyczna biblioteka libmyth
242 Group:          Development/Libraries
243 Requires:       libmyth-devel = %{version}-%{release}
244
245 %description -n libmyth-static
246 Static libmyth library.
247
248 %description -n libmyth-static -l pl
249 Statyczna biblioteka libmyth.
250
251 %prep
252 %setup -q
253 %patch0 -p1
254 %patch1 -p1
255 %patch2 -p1
256
257 rm -rf database/old # not supported in PLD
258
259 %build
260 %if %{with cpu_autodetect}
261 # Make sure we have /proc mounted
262 if [ ! -r /proc/cpuinfo ]; then
263         echo "You need to have /proc mounted in order to build with cpu_autodetect!"
264         exit 1
265 fi
266 %endif
267 export QTDIR="%{_prefix}"
268 export QMAKESPEC="linux-g++"
269
270 %if "%{_lib}" != "lib"
271 export QMAKE_LIBDIR_X11=%{_prefix}/X11R6/%{_lib}
272 %endif
273 #export CFLAGS="%{rpmcflags} -fomit-frame-pointer"
274
275 # BTW: this is not autoconf configure
276 _lib=%{_lib} \
277 %configure \
278         --compile-type=%{?debug:debug}%{!?debug:release} \
279         %{?with_dvb:--enable-dvb --dvb-path=%{_includedir} --enable-dvb-eit} \
280         --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
281         --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
282 %if %{with cpu_autodetect}
283         --enable-proc-opt \
284 %else
285     %ifarch i386 i486 i586 i686 pentium3 pentium4
286         --cpu=i386 --tune=pentium4 --enable-mmx \
287     %endif
288     %ifarch athlon
289         --arch=athlon --enable-mmx \
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_nvidia:--enable-xvmc --enable-xvmc-vld} \
304         %{!?with_nvidia:--disable-xvmc --disable-xvmc-vld} \
305         --enable-xv \
306         --enable-x11 \
307 #       --disable-joystick-menu \
308 #       --disable-ivtv \
309 #       --disable-xrandr        disable X11 resolution switching
310 #       --enable-directfb       enable DirectFB (Linux non-X11 video)
311 #       --enable-directx        enable DirectX  (Microsoft video)
312
313 qmake mythtv.pro
314 %{__make} qmake
315
316 %install
317 rm -rf $RPM_BUILD_ROOT
318 install -d $RPM_BUILD_ROOT%{_sysconfdir}/{logrotate.d,sysconfig} \
319                 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
320                 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
321                 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
322
323 export QTDIR="%{_prefix}"
324 %{__make} install \
325         INSTALL_ROOT=$RPM_BUILD_ROOT
326
327 # Install the files that we added on top of mythtv's own stuff
328 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
329 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
330 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mythbackend
331
332 # desktop entries
333 install %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}
334 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
335 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
336 install %{SOURCE7} $RPM_BUILD_ROOT%{_desktopdir}
337
338 # Install settings.pro so people can see the build options we used
339 install -pD settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build/settings.pro
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 # NFY
352 #/sbin/chkconfig --add mythbackend
353
354 %preun backend
355 if [ "$1" = "0" ]; then
356         %service -q mythbackend stop
357         /sbin/chkconfig --del mythbackend
358 fi
359
360 %postun backend
361 if [ "$1" = "0" ]; then
362         %userremove %{name}
363         %groupremove %{name}
364 fi
365
366 %post   -n libmyth -p /sbin/ldconfig
367 %postun -n libmyth -p /sbin/ldconfig
368
369 %post setup
370 if [ "$1" = 1 ]; then
371 %banner -e %{name}-setup <<EOF
372 To grant mysql permissions to mythtv, please run
373 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
374 EOF
375 fi
376
377 %files
378 %defattr(644,root,root,755)
379 %doc README* UPGRADING AUTHORS FAQ
380 %doc keys.txt
381 %doc docs contrib configfiles
382
383 %files backend
384 %defattr(644,root,root,755)
385 %attr(755,root,root) %{_bindir}/mythbackend
386 %attr(755,root,root) %{_bindir}/mythfilldatabase
387 %attr(755,root,root) %{_bindir}/mythjobqueue
388 %attr(775,root,mythtv) %dir /var/lib/mythtv
389 %attr(775,root,mythtv) %dir /var/cache/mythtv
390 %attr(775,root,mythtv) %dir /var/run/mythtv
391 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
392 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
393 %config /etc/logrotate.d/mythbackend
394 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
395
396 %files frontend
397 %defattr(644,root,root,755)
398 %dir %{_datadir}/mythtv
399 %dir %{_libdir}/mythtv
400 %{_datadir}/mythtv/*.xml
401 %attr(755,root,root) %{_bindir}/mythfrontend
402 %attr(755,root,root) %{_bindir}/mythtv
403 %attr(755,root,root) %{_bindir}/mythepg
404 %attr(755,root,root) %{_bindir}/mythprogfind
405 %attr(755,root,root) %{_bindir}/mythcommflag
406 %attr(755,root,root) %{_bindir}/mythtranscode
407 %attr(755,root,root) %{_bindir}/mythtvosd
408 %dir %{_libdir}/mythtv/filters
409 %dir %{_libdir}/mythtv/plugins
410 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
411 %{_datadir}/mythtv/*.ttf
412 %{_datadir}/mythtv/i18n
413 %{_desktopdir}/*.desktop
414
415 %files setup
416 %defattr(644,root,root,755)
417 %doc database
418 %attr(755,root,root) %{_bindir}/mythtv-setup
419
420 %files themes
421 %defattr(644,root,root,755)
422 %{_datadir}/mythtv/themes
423
424 %files -n libmyth
425 %defattr(644,root,root,755)
426 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
427
428 %files -n libmyth-devel
429 %defattr(644,root,root,755)
430 %attr(755,root,root) %{_libdir}/*.so
431 %{_includedir}/*
432 %dir %{_datadir}/mythtv/build
433 %{_datadir}/mythtv/build/settings.pro
434
435 %files -n libmyth-static
436 %defattr(644,root,root,755)
437 %{_libdir}/lib*.a
This page took 0.154877 seconds and 3 git commands to generate.