]> git.pld-linux.org Git - packages/mythtv.git/blob - mythtv.spec
- BR: OpenGL-GL-devel -> OpenGL-devel
[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  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 %bcond_with     mmx                     # enable mmx
27
28 # enable mmx automatically on arches having it
29 %ifarch %{ix86} %{x8664}
30 %ifnarch i386 i486 i586 i686
31 %define with_mmx 1
32 %endif
33 %endif
34
35 Summary:        A personal video recorder (PVR) application
36 Summary(pl.UTF-8):      Osobista aplikacja do nagrywania obrazu (PVR)
37 Name:           mythtv
38 Version:        0.21
39 Release:        4
40 License:        GPL v2
41 Group:          Applications/Multimedia
42 Source0:        http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
43 # Source0-md5:  49fc135e1cde90cd935c1229467fa37e
44 Source1:        mythbackend.sysconfig
45 Source2:        mythbackend.init
46 Source3:        mythbackend.logrotate
47 Source5:        mythfrontend.desktop
48 #Patch100:              %{name}-branch.diff
49 Patch0:         %{name}-lib64.patch
50 Patch1:         mythtv-configure.patch
51 Patch2:         %{name}-mythstream.patch
52 Patch3:         %{name}-ldconfig.patch
53 #Patch4:                %{name}-pl.patch
54 Patch5:         %{name}-sbinpath.patch
55 Patch6:         mythtv-dvdnav-shared.patch
56 Patch7:         %{name}-libs.patch
57 Patch8:         %{name}-fixes.patch
58 URL:            http://www.mythtv.org/
59 #BuildRequires: DirectFB-devel
60 #BuildRequires: XFree86-devel
61 BuildRequires:  OpenGL-devel
62 BuildRequires:  OpenGL-GLU-devel
63 %{?with_alsa:BuildRequires:     alsa-lib-devel}
64 %{?with_arts:BuildRequires:     arts-devel >= 13:0.9.5}
65 BuildRequires:  freetype-devel >= 1:2.0.0
66 %{?with_jack:BuildRequires:     jack-audio-connection-kit-devel}
67 BuildRequires:  lame-libs-devel
68 %{?with_xvmc:BuildRequires:     xorg-lib-libXvMC-devel}
69 %{?with_firewire:BuildRequires: libavc1394-devel}
70 %{?with_dvb:BuildRequires:      libdvb-devel}
71 BuildRequires:  libdvdnav-devel
72 %{?with_firewire:BuildRequires: libiec61883-devel}
73 %{?with_firewire:BuildRequires: libraw1394-devel}
74 BuildRequires:  linux-libc-headers >= 7:2.6.10
75 %{?with_lirc:BuildRequires:     lirc-devel}
76 BuildRequires:  mysql-devel
77 BuildRequires:  qmake >= 6:3.2.1-4
78 BuildRequires:  qt-devel >= 6:3.2.1-4
79 BuildRequires:  rpmbuild(macros) >= 1.228
80 BuildRequires:  sed >= 4.0
81 # for bundled libavcodec
82 BuildRequires:  libdts-devel
83 #BuildConflicts:        libmyth-devel
84 BuildRequires:  xorg-lib-libXext-devel
85 BuildRequires:  xorg-lib-libXxf86vm-devel
86 ExclusiveArch:  %{ix86} %{x8664} ppc
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 %define myth_api_version %(echo %{version} | cut -d. -f1,2)
90
91 %description
92 MythTV implements the following PVR features, and more, with a unified
93 graphical interface:
94 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
95 - Video compression using RTjpeg or MPEG-4
96 - Program listing retrieval using XMLTV
97 - Themable, semi-transparent on-screen display
98 - Electronic program guide
99 - Scheduled recording of TV programs
100 - Resolution of conflicts between scheduled recordings
101 - Basic video editing
102
103 %description -l pl.UTF-8
104 MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
105 ujednoliconym interfejsem graficznym:
106 - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie,
107   przewijanie "żywej" telewizji
108 - kompresja obrazu przy użyciu RTjpeg lub MPEG-4
109 - odczyt listy programów przy użyciu XMLTV
110 - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów
111 - elektroniczny przewodnik po programie
112 - planowane nagrywanie programów telewizyjnych
113 - rozwiązywanie konfliktów między planowanymi nagraniami
114 - podstawowa edycja obrazu
115
116 %package backend
117 Summary:        Server component of mythtv (a PVR)
118 Summary(pl.UTF-8):      Część serwerowa mythtv (PVR)
119 Group:          Applications/Multimedia
120 Requires(post,preun):   /sbin/chkconfig
121 Requires(postun):       /usr/sbin/groupdel
122 Requires(postun):       /usr/sbin/userdel
123 Requires(pre):  /bin/id
124 Requires(pre):  /usr/bin/getgid
125 Requires(pre):  /usr/sbin/groupadd
126 Requires(pre):  /usr/sbin/useradd
127 Requires:       libmyth = %{version}-%{release}
128 Requires:       mythtv = %{version}-%{release}
129 Provides:       group(mythtv)
130 Provides:       user(mythtv)
131
132 %description backend
133 MythTV provides a unified graphical interface for recording and
134 viewing television programs. Refer to the mythtv package for more
135 information.
136
137 This package contains only the server software, which provides video
138 and audio capture and encoding services. In order to be useful, it
139 requires a mythtv-frontend installation, either on the same system or
140 one reachable via the network.
141
142 %description backend -l pl.UTF-8
143 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
144 oglądania programów telewizyjnych. Więcej informacji w pakiecie
145 mythtv.
146
147 Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
148 usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
149 przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
150 albo innym osiągalnym po sieci.
151
152 %package frontend
153 Summary:        Client component of mythtv (a PVR)
154 Summary(pl.UTF-8):      Część kliencka mythtv (PVR)
155 Group:          Applications/Multimedia
156 Requires:       libmyth = %{version}-%{release}
157 Requires:       mythtv = %{version}-%{release}
158 Requires:       mythtv-themes = %{version}-%{release}
159 Provides:       mythtv-frontend-api = %{myth_api_version}
160
161 %description frontend
162 MythTV provides a unified graphical interface for recording and
163 viewing television programs. Refer to the mythtv package for more
164 information.
165
166 This package contains only the client software, which provides a
167 front-end for playback and configuration. It requires access to a
168 mythtv-backend installation, either on the same system or one
169 reachable via the network.
170
171 %description frontend -l pl.UTF-8
172 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
173 oglądania programów telewizyjnych. Więcej informacji w pakiecie
174 mythtv.
175
176 Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające
177 frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
178 mythtv-backend - na tym samym systemie, albo innym osiągalnym po
179 sieci.
180
181 %package setup
182 Summary:        Setup the mythtv backend
183 Summary(pl.UTF-8):      Konfigurator backendu mythtv
184 Group:          Applications/Multimedia
185 Requires:       libmyth = %{version}-%{release}
186
187 %description setup
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 setup software for configuring the
193 mythtv backend.
194
195 %description setup -l pl.UTF-8
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 program do konfigurowania backendu mythtv.
201
202 %package themes
203 Summary:        Base themes for mythtv's frontend
204 Summary(pl.UTF-8):      Podstawowe motywy dla frontendu mythtv
205 Requires:       %{name}-frontend = %{version}-%{release}
206 Group:          Themes
207
208 %description themes
209 MythTV provides a unified graphical interface for recording and
210 viewing television programs. Refer to the mythtv package for more
211 information.
212
213 This package contains only the base themes used by the frontend and
214 mythtvsetup.
215
216 %description themes -l pl.UTF-8
217 MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
218 oglądania programów telewizyjnych. Więcej informacji w pakiecie
219 mythtv.
220
221 Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
222 mythtvsetup.
223
224 %package -n libmyth
225 Summary:        Library providing mythtv support
226 Summary(pl.UTF-8):      Biblioteka udostępniająca obsługę mythtv
227 Group:          Libraries
228 Requires:       freetype >= 1:2.0.0
229 Requires:       lame
230 Requires:       qt >= 6:3.2.1-4
231 Requires:       qt-plugin-mysql >= 6:3.2.1-4
232
233 %description -n libmyth
234 Common library code for MythTV and add-on modules (development) MythTV
235 provides a unified graphical interface for recording and viewing
236 television programs. Refer to the mythtv package for more information.
237
238 %description -n libmyth -l pl.UTF-8
239 Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
240 dostarczający ujednolicony interfejs graficzny do nagrywania i
241 oglądania programów telewizyjnych. Więcej informacji w pakiecie
242 mythtv.
243
244 %package -n libmyth-devel
245 Summary:        Development files for libmyth
246 Summary(pl.UTF-8):      Pliki nagłówkowe libmyth
247 Group:          Development/Libraries
248 Requires:       libmyth = %{version}-%{release}
249
250 %description -n libmyth-devel
251 This package contains the header files for developing add-ons for
252 mythtv.
253
254 %description -n libmyth-devel -l pl.UTF-8
255 Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
256
257 %package -n libmyth-static
258 Summary:        Static libmyth library
259 Summary(pl.UTF-8):      Statyczna biblioteka libmyth
260 Group:          Development/Libraries
261 Requires:       libmyth-devel = %{version}-%{release}
262
263 %description -n libmyth-static
264 Static libmyth library.
265
266 %description -n libmyth-static -l pl.UTF-8
267 Statyczna biblioteka libmyth.
268
269 %prep
270 %setup -q %{?_rev:-n %{name}}
271 %if %{_lib} != "lib"
272 #%patch0 -p1
273 %endif
274 %patch1 -p1
275 %patch2 -p1
276 %patch3 -p1
277 #%patch4 -p1 REDIFF and submit
278 %patch5 -p1
279 %patch6 -p1
280 %patch7 -p1
281 %patch8 -p1
282
283 rm -rf database/old # not supported in PLD
284
285 # lib64 fix - enable to update patch
286 %if %{_lib} != "lib" && 0
287 find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
288 xargs grep -l /lib . | xargs sed -i -e '
289         s,/''usr/lib/,/%{_libdir}/,g
290         s,/''lib/mythtv,/%{_lib}/mythtv,g
291         s,{PREFIX}/lib$,{PREFIX}/%{_lib},g
292 '
293 exit 1
294 %endif
295
296 # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain
297 # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will
298 # prevent compiler finding libs from system when they should be looked
299 # from current buildtree.
300 # but that made it link with -lqt which doesn't exist, instead of -lqt-mt
301 # so we make QMAKE wrapper which will do sed subst after calling
302 # qmake. this is the wrapper.
303 cat > qmake-wrapper.sh <<'EOF'
304 #!/bin/sh
305 getmakefile() {
306         while [ $# -gt 0 ]; do
307                 case "$1" in
308                 -o)
309                         shift
310                         makefile="$1"
311                         return
312                         ;;
313                 esac
314                 shift
315         done
316 }
317
318 qmake "$@"
319 getmakefile "$@"
320 if [ "$makefile" ]; then
321         %{__sed} -i -e '
322                 s;-Wl,-rpath,$(QTDIR)/%{_lib};;
323                 s;-L$(QTDIR)/%{_lib};;
324         ' $makefile
325 fi
326 EOF
327 chmod +x qmake-wrapper.sh
328
329 %build
330 %if %{with cpu_autodetect}
331 # Make sure we have /proc mounted
332 if [ ! -r /proc/cpuinfo ]; then
333         echo "You need to have /proc mounted in order to build with cpu_autodetect!"
334         exit 1
335 fi
336 %endif
337
338 # NB: not autoconf configure
339 # help configure::has_library() to locate libs
340 LD_LIBRARY_PATH=%{_libdir} \
341 CC="%{__cc}" \
342 CXX="%{__cxx}" \
343 ./configure \
344         --prefix=%{_prefix} \
345         --libdir=%{_libdir} \
346         --mandir=%{_mandir} \
347         --disable-distcc --disable-ccache \
348         --compile-type=%{?debug:debug}%{!?debug:release} \
349         --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \
350         --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \
351 %if %{with cpu_autodetect}
352         --enable-proc-opt \
353 %else
354         %ifarch %{ix86}
355                 %ifarch athlon
356                         --arch=athlon \
357                 %else
358                         --cpu=i386 --tune=pentium4 \
359                 %endif
360         %endif
361         %ifarch %{x8664}
362         --arch=x86_64 \
363         %endif
364         %{?with_mmx:--enable-mmx} \
365 %endif
366         %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \
367         --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
368         --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
369         --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
370         --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \
371         --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \
372         --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
373         --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \
374         --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \
375         --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \
376         --enable-xv \
377         --enable-x11 \
378
379 qmake mythtv.pro \
380 QTDIR="%{_prefix}" \
381 QMAKE_LIBDIR_X11=%{?_x_libraries}%{!?_x_libraries:%{_libdir}}
382
383 %{__make} \
384         QTDIR="%{_prefix}" \
385         QMAKE=$(pwd)/qmake-wrapper.sh
386
387 %install
388 rm -rf $RPM_BUILD_ROOT
389 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
390                 $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \
391                 $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \
392                 $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
393
394 export QTDIR="%{_prefix}"
395 %{__make} install \
396         INSTALL_ROOT=$RPM_BUILD_ROOT
397
398 # Install the files that we added on top of mythtv's own stuff
399 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
400 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
401 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend
402
403 # desktop entries
404 install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
405
406 # Install settings.pro so people can see the build options we used
407 install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
408 install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
409
410 for p in mythfrontend; do
411         for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do
412                 echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1,"
413         done > $p.lang
414 done
415
416 # glibc language codes. attempt was made to change it on libmyth side,
417 # but that was just asking for trouble due large coverage of
418 # language.lower() usage.
419 sed -i -e '
420 s,%%lang(en_gb),%%lang(en_GB),
421 s,%%lang(zh_tw),%%lang(zh_TW),
422 s,%%lang(pt_br),%%lang(pt_BR),
423 ' *.lang
424
425 rm -rf mythtvosd mythwelcome mythlcdserver
426 install -d mythtvosd mythwelcome
427 cp -a programs/mythtvosd/{README,*.xml} mythtvosd
428 cp -a programs/mythwelcome/README mythwelcome
429 cp -a programs/mythlcdserver/README mythlcdserver
430
431 %clean
432 rm -rf $RPM_BUILD_ROOT
433
434 %pre backend
435 %groupadd -g 149 %{name}
436 %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name}
437 %addusertogroup %{name} video
438 %addusertogroup %{name} audio
439
440 %post backend
441 /sbin/chkconfig --add mythbackend
442
443 %preun backend
444 if [ "$1" = "0" ]; then
445         %service -q mythbackend stop
446         /sbin/chkconfig --del mythbackend
447 fi
448
449 %postun backend
450 if [ "$1" = "0" ]; then
451         %userremove %{name}
452         %groupremove %{name}
453 fi
454
455 %post   -n libmyth -p /sbin/ldconfig
456 %postun -n libmyth -p /sbin/ldconfig
457
458 %post setup
459 if [ "$1" = 1 ]; then
460 %banner -e %{name}-setup <<EOF
461 To grant mysql permissions to mythtv, please run
462 zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
463 EOF
464 fi
465
466 %files
467 %defattr(644,root,root,755)
468 %doc README* UPGRADING AUTHORS FAQ
469 #%doc docs contrib configfiles
470 %doc keys.txt mythtvosd mythwelcome mythlcdserver
471
472 %files backend
473 %defattr(644,root,root,755)
474 %attr(755,root,root) %{_sbindir}/mythbackend
475 %attr(755,root,root) %{_sbindir}/mythcommflag
476 %attr(755,root,root) %{_bindir}/mythfilldatabase
477 %attr(755,root,root) %{_sbindir}/mythjobqueue
478 %attr(755,root,root) %{_sbindir}/mythlcdserver
479 %attr(755,root,root) %{_bindir}/mythtranscode
480 %attr(755,root,root) %{_bindir}/mythreplex
481 %attr(775,root,mythtv) %dir /var/lib/mythtv
482 %attr(775,root,mythtv) %dir /var/cache/mythtv
483 %attr(775,root,mythtv) %dir /var/run/mythtv
484 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
485 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
486 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend
487 %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv
488
489 %files frontend -f mythfrontend.lang
490 %defattr(644,root,root,755)
491 %attr(755,root,root) %{_bindir}/mythfrontend
492 %attr(755,root,root) %{_bindir}/mythshutdown
493 %attr(755,root,root) %{_bindir}/mythtv
494 %attr(755,root,root) %{_bindir}/mythtvosd
495 %attr(755,root,root) %{_bindir}/mythwelcome
496 %dir %{_datadir}/mythtv
497 %dir %{_datadir}/mythtv/themes
498 %dir %{_libdir}/mythtv
499 %{_datadir}/mythtv/*.xml
500 %dir %{_libdir}/mythtv/filters
501 %dir %{_libdir}/mythtv/plugins
502 %attr(755,root,root) %{_libdir}/mythtv/filters/*.so
503 %{_datadir}/mythtv/*.ttf
504 %dir %{_datadir}/mythtv/i18n
505 %{_desktopdir}/*.desktop
506
507 %files setup
508 %defattr(644,root,root,755)
509 %doc database
510 %attr(755,root,root) %{_bindir}/mythtv-setup
511
512 %files themes
513 %defattr(644,root,root,755)
514 %{_datadir}/mythtv/themes/*
515
516 %files -n libmyth
517 %defattr(644,root,root,755)
518 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
519
520 %files -n libmyth-devel
521 %defattr(644,root,root,755)
522 %attr(755,root,root) %{_libdir}/*.so
523 %{_includedir}/*
524 %{_datadir}/mythtv/build
525
526 %files -n libmyth-static
527 %defattr(644,root,root,755)
This page took 0.075965 seconds and 4 git commands to generate.