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