]> git.pld-linux.org Git - packages/mythtv.git/blame - mythtv.spec
- raw import from http://forevermore.net/files/mythtv_misc/mythtv.spec
[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
17%define with_lirc %{?_without_lirc: 0}%{!?_without_lirc: 1}
18%define with_alsa %{?_without_alsa: 0}%{!?_without_alsa: 1}
19%define with_oss %{?_without_oss: 0}%{!?_without_oss: 1}
20%define with_opengl_vsync %{?_with_opengl_vsync: 1}%{!?_with_opengl_vsync: 0}
21%define with_arts %{?_with_arts: 1}%{!?_with_arts: 0}
22%define with_xvmc %{?_with_xvmc: 1}%{!?_with_xvmc: 0}
23
24Name: mythtv
25Version: 0.18
26Release: 0.20050326.snapshot
27Summary: A personal video recorder (PVR) application.
28
29Group: Applications/Multimedia
30License: GPL2
31URL: http://www.mythtv.org/
32
33Source0: %{name}-%{version}.tar.bz2
34Source1: mythbackend.sysconfig.in
35Source2: mythbackend.init.in
36Source3: mythbackend.logrotate.in
37Source12: http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2
38
39BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
40
41ExclusiveArch: i386 i686 athlon x86_64
42
43BuildRequires: gcc-c++
44BuildRequires: XFree86-devel
45BuildRequires: freetype-devel >= 2
46BuildRequires: lame-devel
47BuildRequires: qt-devel >= 3
48BuildRequires: mysql-devel
49BuildRequires: desktop-file-utils
50
51%if %{with_alsa}
52BuildRequires: alsa-lib-devel
53%endif
54
55%if %{with_lirc}
56BuildRequires: lirc-lib-devel
57%endif
58
59%if %{with_arts}
60BuildRequires: arts-devel
61%endif
62
63%if %{with_xvmc}
64BuildRequires: nvidia-graphics-devel
65%endif
66
67#%if %{with_opengl_vsync}
68#BuildRequires: nvidia-graphics-devel
69#%endif
70
71%description
72MythTV implements the following PVR features, and more, with a
73unified graphical interface:
74
75 - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
76 - Video compression using RTjpeg or MPEG-4
77 - Program listing retrieval using XMLTV
78 - Themable, semi-transparent on-screen display
79 - Electronic program guide
80 - Scheduled recording of TV programs
81 - Resolution of conflicts between scheduled recordings
82 - Basic video editing
83
84%package -n libmyth
85Summary: Library providing mythtv support.
86Group: System Environment/Libraries
87Requires: freetype >= 2
88Requires: lame
89Requires: qt >= 3
90Requires: qt-MySQL
91
92%description -n libmyth
93Common library code for MythTV and add-on modules (development)
94MythTV provides a unified graphical interface for recording and viewing
95television programs. Refer to the mythtv package for more information.
96
97%package -n libmyth-devel
98Summary: Development files for libmyth.
99Group: Development/Libraries
100Requires: libmyth = %{version}
101BuildRequires: freetype-devel >= 2
102BuildRequires: lame-devel
103BuildRequires: qt-devel >= 3
104BuildRequires: mysql-devel
105BuildRequires: directfb-devel
106%if %{with_alsa}
107BuildRequires: alsa-lib-devel
108%endif
109%if %{with_lirc}
110BuildRequires: lirc-lib-devel
111%endif
112%if %{with_arts}
113BuildRequires: arts-devel
114%endif
115
116%description -n libmyth-devel
117This package contains the header files and libraries for developing
118add-ons for mythtv.
119
120%package themes
121Summary: Base themes for mythtv's frontend.
122Group: Applications/Multimedia
123Obsoletes: mythtv-theme-Titivillus
124
125%description themes
126MythTV provides a unified graphical interface for recording and viewing
127television programs. Refer to the mythtv package for more information.
128
129This package contains only the base themes used by the frontend and
130mythtvsetup.
131
132%package frontend
133Summary: Client component of mythtv (a PVR).
134Group: Applications/Multimedia
135Requires: mythtv = %{version}
136Requires: mythtv-themes = %{version}
137Provides: mythtv-frontend-api = %(echo %{version} | awk -F. '{print $1 "." $2}')
138
139%description frontend
140MythTV provides a unified graphical interface for recording and viewing
141television programs. Refer to the mythtv package for more information.
142
143This package contains only the client software, which provides a
144front-end for playback and configuration. It requires access to a
145mythtv-backend installation, either on the same system or one
146reachable via the network.
147
148%package backend
149Summary: Server component of mythtv (a PVR).
150Group: A pplications/Multimedia
151Conflicts: xmltv-grabbers < 0.5.34
152Requires: mythtv = %{version}
153
154%description backend
155MythTV provides a unified graphical interface for recording and viewing
156television programs. Refer to the mythtv package for more information.
157
158This package contains only the server software, which provides video
159and audio capture and encoding services. In order to be useful, it
160requires a mythtv-frontend installation, either on the same system or
161one reachable via the network.
162
163%package setup
164Summary: Setup the mythtv backend.
165Group: Applications/Multimedia
166Requires: mythtv-backend = %{version}
167Requires: mythtv-themes = %{version}
168Provides: mythtvsetup
169
170%description setup
171MythTV provides a unified graphical interface for recording and viewing
172television programs. Refer to the mythtv package for more information.
173
174This package contains only the setup software for configuring the
175mythtv backend.
176
177%prep
178%setup -q -a 12
179
180# Install these files that MythTV doesn't include,
181# and update them with the paths set by rpmbuild.
182cp -a %{SOURCE1} %{SOURCE2} %{SOURCE3} .
183for file in mythbackend.init \
184 mythbackend.sysconfig \
185 mythbackend.logrotate; do
186 sed -e's|@logdir@|%{_logdir}|g' \
187 -e's|@rundir@|%{_rundir}|g' \
188 -e's|@sysconfigdir@|%{_sysconfigdir}|g' \
189 -e's|@initdir@|%{_initdir}|g' \
190 -e's|@bindir@|%{_bindir}|g' \
191 -e's|@sbindir@|%{_sbindir}|g' \
192 -e's|@subsysdir@|%{_subsysdir}|g' \
193 -e's|@varlibdir@|%{_varlibdir}|g' \
194 -e's|@varcachedir@|%{_varcachedir}|g' \
195 -e's|@logrotatedir@|%{_logrotatedir}|g' \
196 < $file.in > $file
197done
198
199%build
200[ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
201
202# Initialize the options string
203OPTS=""
204
205# Tune for the various processor types?
206%if %{?_with_cpu_autodetect:0}%{!?_with_cpu_autodetect:1}
207 %ifarch i386
208 OPTS="$OPTS --cpu=i386 --tune=pentium4 --enable-mmx"
209 %endif
210 %ifarch i686
211 OPTS="$OPTS --cpu=i686 --tune=pentium4 --enable-mmx"
212 %endif
213 %ifarch athlon
214 OPTS="$OPTS --arch=athlon"
215 %endif
216 %ifarch x86_64
217 OPTS="$OPTS --arch=x86_64"
218 %endif
219%endif
220
221# Enable arts support (or make sure it's disabled)
222%if %{with_arts}
223 OPTS="$OPTS --enable-audio-arts"
224%else
225 OPTS="$OPTS --disable-audio-arts"
226%endif
227
228# Enable alsa support (or make sure it's disabled)
229%if %{with_alsa}
230 OPTS="$OPTS --enable-audio-alsa"
231%else
232 OPTS="$OPTS --disable-audio-alsa"
233%endif
234
235# Enable oss support (or make sure it's disabled)
236%if %{with_oss}
237 OPTS="$OPTS --enable-audio-oss"
238%else
239 OPTS="$OPTS --disable-audio-oss"
240%endif
241
242# Enable xvmc support (or make sure it's disabled)
243%if %{with_xvmc}
244 OPTS="$OPTS --enable-xvmc --enable-xvmc-vld"
245%else
246 OPTS="$OPTS --disable-xvmc --disable-xvmc-vld"
247%endif
248
249# Enable opengl-vsync support (or make sure it's disabled)
250%if %{with_opengl_vsync}
251 OPTS="$OPTS --enable-opengl-vsync"
252%else
253 OPTS="$OPTS --disable-opengl-vsync"
254%endif
255
256# Enable lirc support (or make sure it's disabled)
257%if %{with_lirc}
258 OPTS="$OPTS --enable-lirc"
259%else
260 OPTS="$OPTS --disable-lirc"
261%endif
262
263
264# Finally, actually configure
265
266%configure \
267 --prefix=%{_prefix} \
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
280make %{?_smp_mflags}
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
287make install INSTALL_ROOT=$RPM_BUILD_ROOT
288
289# Install the files that we added on top of mythtv's own stuff
290install -pD mythbackend.init $RPM_BUILD_ROOT%{_initdir}/mythbackend
291install -pD mythbackend.sysconfig $RPM_BUILD_ROOT%{_sysconfigdir}/mythbackend
292install -pD mythbackend.logrotate $RPM_BUILD_ROOT%{_logrotatedir}/mythbackend
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
308mkdir -p $RPM_BUILD_ROOT%{_varlibdir}/mythtv
309mkdir -p $RPM_BUILD_ROOT%{_varcachedir}/mythtv
310mkdir -p $RPM_BUILD_ROOT%{_logdir}/mythtv
311mkdir -p $RPM_BUILD_ROOT%{_logrotatedir}
312mkdir -p $RPM_BUILD_ROOT%{_initdir}
313mkdir -p $RPM_BUILD_ROOT%{_sysconfigdir}
314
315# Create the plugins directory, so rpm can know mythtv owns it
316mkdir -p $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
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
329%post
330/sbin/ldconfig
331
332%postun -p /sbin/ldconfig
333
334%files
335%defattr(-,root,root,-)
336%doc README* UPGRADING AUTHORS COPYING FAQ
337%doc database keys.txt
338%doc docs contrib configfiles
339
340%files backend
341%defattr(-,root,root,-)
342%{_bindir}/mythbackend
343%{_bindir}/mythfilldatabase
344%{_bindir}/mythjobqueue
345%attr(-,mythtv,mythtv) %dir %{_varlibdir}/mythtv
346%attr(-,mythtv,mythtv) %dir %{_varcachedir}/mythtv
347%{_initdir}/mythbackend
348%config %{_sysconfigdir}/mythbackend
349%config %{_logrotatedir}/mythbackend
350%attr(-,mythtv,mythtv) %dir %{_logdir}/mythtv
351
352%files setup
353%defattr(-,root,root,-)
354%{_bindir}/mythtv-setup
355
356%files frontend
357%defattr(-,root,root,-)
358%{_datadir}/mythtv/*.xml
359%{_bindir}/mythfrontend
360%{_bindir}/mythtv
361%{_bindir}/mythepg
362%{_bindir}/mythprogfind
363%{_bindir}/mythcommflag
364%{_bindir}/mythtranscode
365%{_bindir}/mythtvosd
366%{_libdir}/mythtv/filters
367%{_libdir}/mythtv/plugins
368%{_datadir}/mythtv/*.ttf
369%{_datadir}/mythtv/i18n
370#%{_datadir}/applications/*myth*.desktop
371#%{_datadir}/pixmaps/myth*.png
372
373%files themes
374%defattr(-,root,root,-)
375%{_datadir}/mythtv/themes
376
377%files -n libmyth
378%defattr(-,root,root,-)
379%{_libdir}/*.so.*
380
381%files -n libmyth-devel
382%defattr(-,root,root,-)
383%{_includedir}/*
384%{_libdir}/*.so
385%{_libdir}/*.a
386%{_datadir}/mythtv/build/settings.pro
387
388
389%changelog
390
391* Sat Mar 26 2005 Chris Petersen <rpm@forevermore.net> - 0.18-0.20050326.snapshot
392- Finished first revision of new specfile according to new Fedora guidelines.
393- Some portions of this file are based on Axel Thimm's mythtv spec, which was
394- made incompatible by updates to mythtv's build process.
This page took 0.077063 seconds and 4 git commands to generate.