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