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