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