]> git.pld-linux.org Git - packages/mythtv.git/blame - mythtv.spec
- adapterized
[packages/mythtv.git] / mythtv.spec
CommitLineData
8afae0cb
ER
1#
2# Specfile for MythTV
3#
4# MythTV now uses a fairly intelligent cpu-detection script, so if you are
5# building an rpm by hand on the machine it will be used on, I encourage you
6# to use "--with cpu_autodetect" to let mythtv decide for you.
7#
8
9# The name of the DVB driver package (used in a couple of places,
10# so it's not hard-coded in the spec itself)
11%define linuxtv_dvb_package linuxtv-dvb-1.1.1
12
13# Compile type: debug or release
14%define compile_type debug
15
16# Set up some custom-build parameters
910a00e3
ER
17%bcond_with lirc
18%bcond_without alsa
19%bcond_without oss
20%bcond_with opengl_vsync
21%bcond_with arts
22%bcond_with xvmc
23%bcond_with cpu_autodetect # enable cpu autodetection at compile time
24
25Name: mythtv
26Version: 0.17
27#define _snap 20050326
28Release: 0.1
29Summary: A personal video recorder (PVR) application.
30Group: Applications/Multimedia
31License: GPL v2
32URL: http://www.mythtv.org/
33Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
34# Source0-md5: c996dc690d36e946396fc5cd4b715e3b
35Source1: mythbackend.sysconfig.in
36Source2: mythbackend.init.in
37Source3: mythbackend.logrotate.in
38Source12: http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2
39# Source12-md5: 6dd599f24b7abecd1e32c203eaa7fa8a
40ExclusiveArch: i386 i686 athlon x86_64
41BuildRequires: gcc-c++
42BuildRequires: XFree86-devel
43BuildRequires: freetype-devel >= 1:2.0.0
44BuildRequires: lame-libs-devel
45BuildRequires: qt-devel >= 6:3.2.1-4
46BuildRequires: qmake >= 6:3.2.1-4
47BuildRequires: mysql-devel
48BuildRequires: desktop-file-utils
49%if %{with alsa}
50BuildRequires: alsa-lib-devel
8afae0cb 51%endif
910a00e3
ER
52%if %{with lirc}
53BuildRequires: lirc-devel
8afae0cb 54%endif
910a00e3
ER
55%if %{with arts}
56BuildRequires: arts-devel >= 13:0.9.5
8afae0cb 57%endif
910a00e3
ER
58%if %{with xvmc}
59BuildRequires: nvidia-graphics-devel
8afae0cb 60%endif
910a00e3 61#%if %{with opengl_vsync}
8afae0cb
ER
62#BuildRequires: nvidia-graphics-devel
63#%endif
910a00e3 64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
8afae0cb
ER
65
66%description
910a00e3
ER
67MythTV implements the following PVR features, and more, with a unified
68graphical interface:
8afae0cb
ER
69
70 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
71 - Video compression using RTjpeg or MPEG-4
72 - Program listing retrieval using XMLTV
73 - Themable, semi-transparent on-screen display
74 - Electronic program guide
75 - Scheduled recording of TV programs
76 - Resolution of conflicts between scheduled recordings
77 - Basic video editing
78
79%package -n libmyth
910a00e3
ER
80Summary: Library providing mythtv support.
81Group: Libraries
82Requires: freetype >= 1:2.0.0
83Requires: lame
84Requires: qt >= 6:
85Requires: qt-plugin-mysql >= 6:3.2.1-4
8afae0cb
ER
86
87%description -n libmyth
910a00e3
ER
88Common library code for MythTV and add-on modules (development) MythTV
89provides a unified graphical interface for recording and viewing
90television programs. Refer to the mythtv package for more information.
8afae0cb
ER
91
92%package -n libmyth-devel
910a00e3
ER
93Summary: Development files for libmyth.
94Group: Development/Libraries
95Requires: libmyth = %{version}-%{release}
96BuildRequires: freetype-devel >= 1:2.0.0
97BuildRequires: lame-libs-devel
98BuildRequires: qt-devel >= 6:3.2.1-4
99BuildRequires: mysql-devel
100BuildRequires: DirectFB-devel
101%if %{with alsa}
102BuildRequires: alsa-lib-devel
8afae0cb 103%endif
910a00e3
ER
104%if %{with lirc}
105BuildRequires: lirc-devel
8afae0cb 106%endif
910a00e3
ER
107%if %{with arts}
108BuildRequires: arts-devel >= 13:0.9.5
8afae0cb
ER
109%endif
110
111%description -n libmyth-devel
112This package contains the header files and libraries for developing
113add-ons for mythtv.
114
115%package themes
910a00e3
ER
116Summary: Base themes for mythtv's frontend.
117Group: Applications/Multimedia
118Obsoletes: mythtv-theme-Titivillus
8afae0cb
ER
119
120%description themes
910a00e3
ER
121MythTV provides a unified graphical interface for recording and
122viewing television programs. Refer to the mythtv package for more
123information.
8afae0cb
ER
124
125This package contains only the base themes used by the frontend and
126mythtvsetup.
127
128%package frontend
910a00e3
ER
129Summary: Client component of mythtv (a PVR).
130Group: Applications/Multimedia
131Requires: mythtv = %{version}-%{release}
132Requires: mythtv-themes = %{version}-%{release}
133Provides: mythtv-frontend-api = %(echo %{version} | cut -d. -f1,2)
8afae0cb
ER
134
135%description frontend
910a00e3
ER
136MythTV provides a unified graphical interface for recording and
137viewing television programs. Refer to the mythtv package for more
138information.
8afae0cb
ER
139
140This package contains only the client software, which provides a
910a00e3 141front-end for playback and configuration. It requires access to a
8afae0cb
ER
142mythtv-backend installation, either on the same system or one
143reachable via the network.
144
145%package backend
910a00e3
ER
146Summary: Server component of mythtv (a PVR).
147Group: Applications/Multimedia
148Conflicts: xmltv-grabbers < 0.5.34
149Requires: mythtv = %{version}-%{release}
8afae0cb
ER
150
151%description backend
910a00e3
ER
152MythTV provides a unified graphical interface for recording and
153viewing television programs. Refer to the mythtv package for more
154information.
8afae0cb
ER
155
156This package contains only the server software, which provides video
910a00e3 157and audio capture and encoding services. In order to be useful, it
8afae0cb
ER
158requires a mythtv-frontend installation, either on the same system or
159one reachable via the network.
160
161%package setup
910a00e3
ER
162Summary: Setup the mythtv backend.
163Group: Applications/Multimedia
164Requires: mythtv-backend = %{version}-%{release}
165Requires: mythtv-themes = %{version}-%{release}
166Provides: mythtvsetup
8afae0cb
ER
167
168%description setup
910a00e3
ER
169MythTV provides a unified graphical interface for recording and
170viewing television programs. Refer to the mythtv package for more
171information.
8afae0cb
ER
172
173This package contains only the setup software for configuring the
174mythtv backend.
175
176%prep
177%setup -q -a 12
178
179# Install these files that MythTV doesn't include,
180# and update them with the paths set by rpmbuild.
910a00e3 181%if 0
8afae0cb
ER
182cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} .
183for file in mythbackend.init \
184 mythbackend.sysconfig \
185 mythbackend.logrotate; do
910a00e3 186 sed -e's|@logdir@|%{_localstatedir}/log|g' \
8afae0cb 187 -e's|@rundir@|%{_rundir}|g' \
910a00e3
ER
188 -e's|@sysconfigdir@|%{_sysconfdir}|g' \
189 -e's|@initdir@|%{_initrddir}|g' \
8afae0cb
ER
190 -e's|@bindir@|%{_bindir}|g' \
191 -e's|@sbindir@|%{_sbindir}|g' \
192 -e's|@subsysdir@|%{_subsysdir}|g' \
910a00e3 193 -e's|@varlibdir@|/var/lib|g' \
8afae0cb 194 -e's|@varcachedir@|%{_varcachedir}|g' \
910a00e3 195 -e's|@logrotatedir@|%{_sysconfdir}/logrotate.d|g' \
8afae0cb
ER
196 < $file.in > $file
197done
910a00e3 198%endif
8afae0cb
ER
199
200%build
910a00e3 201export QTDIR="%{_prefix}"
8afae0cb
ER
202
203# Initialize the options string
204OPTS=""
205
206# Tune for the various processor types?
910a00e3 207%if %{with cpu_autodetect}
8afae0cb
ER
208 %ifarch i386
209 OPTS="$OPTS --cpu=i386 --tune=pentium4 --enable-mmx"
210 %endif
211 %ifarch i686
212 OPTS="$OPTS --cpu=i686 --tune=pentium4 --enable-mmx"
213 %endif
214 %ifarch athlon
215 OPTS="$OPTS --arch=athlon"
216 %endif
217 %ifarch x86_64
218 OPTS="$OPTS --arch=x86_64"
219 %endif
220%endif
221
222# Enable arts support (or make sure it's disabled)
910a00e3 223%if %{with arts}
8afae0cb
ER
224 OPTS="$OPTS --enable-audio-arts"
225%else
226 OPTS="$OPTS --disable-audio-arts"
227%endif
228
229# Enable alsa support (or make sure it's disabled)
910a00e3 230%if %{with alsa}
8afae0cb
ER
231 OPTS="$OPTS --enable-audio-alsa"
232%else
233 OPTS="$OPTS --disable-audio-alsa"
234%endif
235
236# Enable oss support (or make sure it's disabled)
910a00e3 237%if %{with oss}
8afae0cb
ER
238 OPTS="$OPTS --enable-audio-oss"
239%else
240 OPTS="$OPTS --disable-audio-oss"
241%endif
242
243# Enable xvmc support (or make sure it's disabled)
910a00e3 244%if %{with xvmc}
8afae0cb
ER
245 OPTS="$OPTS --enable-xvmc --enable-xvmc-vld"
246%else
247 OPTS="$OPTS --disable-xvmc --disable-xvmc-vld"
248%endif
249
250# Enable opengl-vsync support (or make sure it's disabled)
910a00e3 251%if %{with opengl_vsync}
8afae0cb
ER
252 OPTS="$OPTS --enable-opengl-vsync"
253%else
254 OPTS="$OPTS --disable-opengl-vsync"
255%endif
256
257# Enable lirc support (or make sure it's disabled)
910a00e3 258%if %{with lirc}
8afae0cb
ER
259 OPTS="$OPTS --enable-lirc"
260%else
261 OPTS="$OPTS --disable-lirc"
262%endif
263
264
265# Finally, actually configure
266
267%configure \
8afae0cb
ER
268 --compile-type=%{compile_type} \
269 --disable-audio-jack \
270 --enable-dvb \
271 --dvb-path=%{_builddir}/%{name}-%{version}/%{linuxtv_dvb_package}/linux/include/ \
272 $OPTS
273# --disable-joystick-menu \
274# --disable-firewire \
275# --disable-ivtv \
276# --enable-dvb-eit \
277
278# MythTV doesn't support parallel builds
279qmake mythtv.pro
910a00e3 280%{__make} %{?_smp_mflags}
8afae0cb
ER
281
282# We don't want rpm to add perl requirements to anything in contrib
283find contrib -type f | xargs -r chmod a-x
284
285%install
286rm -rf $RPM_BUILD_ROOT
910a00e3 287%{__make} install INSTALL_ROOT=$RPM_BUILD_ROOT
8afae0cb
ER
288
289# Install the files that we added on top of mythtv's own stuff
910a00e3
ER
290install -pD mythbackend.init $RPM_BUILD_ROOT%{_initrddir}/mythbackend
291install -pD mythbackend.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/mythbackend
292install -pD mythbackend.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
8afae0cb
ER
293
294# Desktop entries
295#mkdir -p %{buildroot}%{_datadir}/pixmaps
296#mkdir -p %{buildroot}%{_datadir}/applications
297#for file in %{desktop_applications}; do
298# install -p %{_sourcedir}/$file.png %{buildroot}%{_datadir}/pixmaps/$file.png
299# desktop-file-install --vendor %{desktop_vendor} \
300# --dir %{buildroot}%{_datadir}/applications \
301# --add-category X-Red-Hat-Extra \
302# --add-category Application \
303# --add-category AudioVideo \
304# %{_sourcedir}/$file.desktop
305#done
306
307# Various utility directories that we want rpm to keep track of mythtv ownership
910a00e3
ER
308install -d $RPM_BUILD_ROOT/var/lib/mythtv
309install -d $RPM_BUILD_ROOT/var/lib/cache/mythtv
310install -d $RPM_BUILD_ROOT%{_localstatedir}/log/mythtv
311install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
312install -d $RPM_BUILD_ROOT%{_initrddir}
313install -d $RPM_BUILD_ROOT%{_sysconfdir}
8afae0cb
ER
314
315# Create the plugins directory, so rpm can know mythtv owns it
910a00e3 316install -d $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
8afae0cb
ER
317
318# Install settings.pro so people can see the build options we used
319install -pD settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build/settings.pro
320
321%clean
322rm -rf $RPM_BUILD_ROOT
323
324# ldconfig's for packages that install %{_libdir}/*.so.*
325# -> Don't forget Requires(post) and Requires(postun): /sbin/ldconfig
326# ...and install-info's for ones that install %{_infodir}/*.info*
327# -> Don't forget Requires(post) and Requires(preun): /sbin/install-info
328
910a00e3
ER
329%post -p /sbin/ldconfig
330%postun -p /sbin/ldconfig
8afae0cb
ER
331
332%files
910a00e3 333%defattr(644,root,root,755)
8afae0cb
ER
334%doc README* UPGRADING AUTHORS COPYING FAQ
335%doc database keys.txt
336%doc docs contrib configfiles
337
338%files backend
910a00e3
ER
339%defattr(644,root,root,755)
340%attr(755,root,root) %{_bindir}/mythbackend
341%attr(755,root,root) %{_bindir}/mythfilldatabase
342%attr(755,root,root) %{_bindir}/mythjobqueue
343%attr(-,mythtv,mythtv) %dir /var/lib/mythtv
344%attr(-,mythtv,mythtv) %dir /var/lib/cache/mythtv
345%{_initrddir}/mythbackend
346%config %{_sysconfdir}/mythbackend
347%config /etc/logrotate.d/mythbackend
348%attr(-,mythtv,mythtv) %dir %{_localstatedir}/log/mythtv
8afae0cb
ER
349
350%files setup
910a00e3
ER
351%defattr(644,root,root,755)
352%attr(755,root,root) %{_bindir}/mythtv-setup
8afae0cb
ER
353
354%files frontend
910a00e3 355%defattr(644,root,root,755)
8afae0cb 356%{_datadir}/mythtv/*.xml
910a00e3
ER
357%attr(755,root,root) %{_bindir}/mythfrontend
358%attr(755,root,root) %{_bindir}/mythtv
359%attr(755,root,root) %{_bindir}/mythepg
360%attr(755,root,root) %{_bindir}/mythprogfind
361%attr(755,root,root) %{_bindir}/mythcommflag
362%attr(755,root,root) %{_bindir}/mythtranscode
363%attr(755,root,root) %{_bindir}/mythtvosd
8afae0cb
ER
364%{_libdir}/mythtv/filters
365%{_libdir}/mythtv/plugins
366%{_datadir}/mythtv/*.ttf
367%{_datadir}/mythtv/i18n
368#%{_datadir}/applications/*myth*.desktop
369#%{_datadir}/pixmaps/myth*.png
370
371%files themes
910a00e3 372%defattr(644,root,root,755)
8afae0cb
ER
373%{_datadir}/mythtv/themes
374
375%files -n libmyth
910a00e3
ER
376%defattr(644,root,root,755)
377%attr(755,root,root) %{_libdir}/*.so.*
8afae0cb
ER
378
379%files -n libmyth-devel
910a00e3 380%defattr(644,root,root,755)
8afae0cb 381%{_includedir}/*
910a00e3 382%attr(755,root,root) %{_libdir}/*.so
8afae0cb
ER
383%{_libdir}/*.a
384%{_datadir}/mythtv/build/settings.pro
This page took 0.111076 seconds and 4 git commands to generate.