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.
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
13 # Set up some custom-build parameters
17 %bcond_with opengl_vsync
20 %bcond_with cpu_autodetect # enable cpu autodetection at compile time
24 #define _snap 20050326
26 Summary: A personal video recorder (PVR) application.
27 Group: Applications/Multimedia
29 URL: http://www.mythtv.org/
30 Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
31 # Source0-md5: c996dc690d36e946396fc5cd4b715e3b
32 Source1: mythbackend.sysconfig
33 Source2: mythbackend.init
34 Source3: mythbackend.logrotate
35 Source12: http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2
36 Patch0: %{name}-configure.patch
37 # Source12-md5: 6dd599f24b7abecd1e32c203eaa7fa8a
38 ExclusiveArch: i386 i686 athlon x86_64
39 Requires(post): /sbin/ldconfig
40 Requires(postun): /sbin/ldconfig
41 BuildRequires: gcc-c++
42 BuildRequires: XFree86-devel
43 BuildRequires: freetype-devel >= 1:2.0.0
44 BuildRequires: lame-libs-devel
45 BuildRequires: qt-devel >= 6:3.2.1-4
46 BuildRequires: qmake >= 6:3.2.1-4
47 BuildRequires: mysql-devel
48 BuildRequires: desktop-file-utils
50 BuildRequires: alsa-lib-devel
53 BuildRequires: lirc-devel
56 BuildRequires: arts-devel >= 13:0.9.5
59 BuildRequires: nvidia-graphics-devel
61 %if %{with opengl_vsync}
62 BuildRequires: nvidia-graphics-devel
64 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67 MythTV implements the following PVR features, and more, with a unified
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
80 Summary: Library providing mythtv support.
82 Requires: freetype >= 1:2.0.0
84 Requires: qt >= 6:3.2.1-4
85 Requires: qt-plugin-mysql >= 6:3.2.1-4
87 %description -n libmyth
88 Common library code for MythTV and add-on modules (development) MythTV
89 provides a unified graphical interface for recording and viewing
90 television programs. Refer to the mythtv package for more information.
92 %package -n libmyth-devel
93 Summary: Development files for libmyth.
94 Group: Development/Libraries
95 Requires: libmyth = %{version}-%{release}
96 BuildRequires: freetype-devel >= 1:2.0.0
97 BuildRequires: lame-libs-devel
98 BuildRequires: qt-devel >= 6:3.2.1-4
99 BuildRequires: mysql-devel
100 BuildRequires: DirectFB-devel
102 BuildRequires: alsa-lib-devel
105 BuildRequires: lirc-devel
108 BuildRequires: arts-devel >= 13:0.9.5
111 %description -n libmyth-devel
112 This package contains the header files and libraries for developing
115 %package -n libmyth-static
116 Summary: Static libmyth library
117 Group: Development/Libraries
118 Requires: lib%{name}-devel = %{version}-%{release}
120 %description -n libmyth-static
121 Static libmyth library.
124 Summary: Base themes for mythtv's frontend.
125 Group: Applications/Multimedia
126 Obsoletes: mythtv-theme-Titivillus
129 MythTV provides a unified graphical interface for recording and
130 viewing television programs. Refer to the mythtv package for more
133 This package contains only the base themes used by the frontend and
137 Summary: Client component of mythtv (a PVR).
138 Group: Applications/Multimedia
139 Requires: mythtv = %{version}-%{release}
140 Requires: mythtv-themes = %{version}-%{release}
141 Provides: mythtv-frontend-api = %(echo %{version} | cut -d. -f1,2)
143 %description frontend
144 MythTV provides a unified graphical interface for recording and
145 viewing television programs. Refer to the mythtv package for more
148 This package contains only the client software, which provides a
149 front-end for playback and configuration. It requires access to a
150 mythtv-backend installation, either on the same system or one
151 reachable via the network.
154 Summary: Server component of mythtv (a PVR).
155 Group: Applications/Multimedia
156 Conflicts: xmltv-grabbers < 0.5.34
157 Requires: mythtv = %{version}-%{release}
160 MythTV provides a unified graphical interface for recording and
161 viewing television programs. Refer to the mythtv package for more
164 This package contains only the server software, which provides video
165 and audio capture and encoding services. In order to be useful, it
166 requires a mythtv-frontend installation, either on the same system or
167 one reachable via the network.
170 Summary: Setup the mythtv backend.
171 Group: Applications/Multimedia
172 Requires: mythtv-backend = %{version}-%{release}
173 Requires: mythtv-themes = %{version}-%{release}
174 Provides: mythtvsetup
177 MythTV provides a unified graphical interface for recording and
178 viewing television programs. Refer to the mythtv package for more
181 This package contains only the setup software for configuring the
189 export QTDIR="%{_prefix}"
190 #export QMAKESPEC="linux-g++"
192 # Initialize the options string
196 # Finally, actually configure
198 # BTW: this is not autoconf configure
200 --compile-type=%{?debug:debug}%{!?debug:release} \
201 --disable-audio-jack \
203 --dvb-path=%{_builddir}/%{name}-%{version}/%{linuxtv_dvb_package}/linux/include \
204 %if %{with cpu_autodetect}
206 --cpu=i386 --tune=pentium4 --enable-mmx \
209 --cpu=i686 --tune=pentium4 --enable-mmx \
218 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
219 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
220 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
221 --%{?with_opengl_vsync:en}%{!?with_openvl_vsync:dis}able-opengl-vsync \
222 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
223 %{?with_xvmc:--enable-xvmc --enable-xvmc-vld} \
224 %{!?with_xvmc:--disable-xvmc --disable-xvmc-vld} \
225 # --disable-joystick-menu \
226 # --disable-firewire \
230 #sed -i -e 's:OPTFLAGS=.*:OPTFLAGS=%{rpmcflags} -Wno-switch:g' config.mak
232 # MythTV doesn't support parallel builds
233 qmake -o Makefile mythtv.pro \
234 QMAKE_CXX="%{__cxx}" \
235 QMAKE_LINK="%{__cxx}" \
236 QMAKE_CXXFLAGS_RELEASE="%{rpmcflags}"
240 # We don't want rpm to add perl requirements to anything in contrib
241 find contrib -type f | xargs -r chmod a-x
244 rm -rf $RPM_BUILD_ROOT
245 install -d $RPM_BUILD_ROOT
248 INSTALL_ROOT=$RPM_BUILD_ROOT
250 mv $RPM_BUILD_ROOT{/usr/local/bin,%{_bindir}}
251 mv $RPM_BUILD_ROOT{/usr/local/include,%{_includedir}}
252 mv $RPM_BUILD_ROOT{/usr/local/share,%{_datadir}}
253 mv $RPM_BUILD_ROOT{/usr/local/lib,%{_libdir}}
255 # Install the files that we added on top of mythtv's own stuff
256 install -pD %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/mythbackend
257 install -pD %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mythbackend
258 install -pD %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
261 #mkdir -p %{buildroot}%{_datadir}/pixmaps
262 #mkdir -p %{buildroot}%{_datadir}/applications
263 #for file in %{desktop_applications}; do
264 # install -p %{_sourcedir}/$file.png %{buildroot}%{_datadir}/pixmaps/$file.png
265 # desktop-file-install --vendor %{desktop_vendor} \
266 # --dir %{buildroot}%{_datadir}/applications \
267 # --add-category X-Red-Hat-Extra \
268 # --add-category Application \
269 # --add-category AudioVideo \
270 # %{_sourcedir}/$file.desktop
273 # Various utility directories that we want rpm to keep track of mythtv ownership
274 install -d $RPM_BUILD_ROOT/var/lib/mythtv
275 install -d $RPM_BUILD_ROOT/var/lib/cache/mythtv
276 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/mythtv
277 install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
278 install -d $RPM_BUILD_ROOT%{_initrddir}
279 install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
281 # Create the plugins directory, so rpm can know mythtv owns it
282 install -d $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
284 # Install settings.pro so people can see the build options we used
285 install -pD settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build/settings.pro
288 rm -rf $RPM_BUILD_ROOT
290 # ldconfig's for packages that install %{_libdir}/*.so.*
291 # -> Don't forget Requires(post) and Requires(postun): /sbin/ldconfig
292 # ...and install-info's for ones that install %{_infodir}/*.info*
293 # -> Don't forget Requires(post) and Requires(preun): /sbin/install-info
295 %post -p /sbin/ldconfig
296 %postun -p /sbin/ldconfig
299 %defattr(644,root,root,755)
300 %doc README* UPGRADING AUTHORS COPYING FAQ
301 %doc database keys.txt
302 %doc docs contrib configfiles
305 %defattr(644,root,root,755)
306 #%attr(755,root,root) %{_bindir}/mythbackend # MISSING
307 %attr(755,root,root) %{_bindir}/mythfilldatabase
308 %attr(755,root,root) %{_bindir}/mythjobqueue
309 %attr(-,mythtv,mythtv) %dir /var/lib/mythtv
310 %attr(-,mythtv,mythtv) %dir /var/lib/cache/mythtv
311 %{_initrddir}/mythbackend
312 %config %{_sysconfdir}/sysconfig/mythbackend
313 %config /etc/logrotate.d/mythbackend
314 %attr(-,mythtv,mythtv) %dir %{_localstatedir}/log/mythtv
317 %defattr(644,root,root,755)
318 #%attr(755,root,root) %{_bindir}/mythtv-setup MISSING
321 %defattr(644,root,root,755)
322 %{_datadir}/mythtv/*.xml
323 #%attr(755,root,root) %{_bindir}/mythfrontend # MISSING
324 %attr(755,root,root) %{_bindir}/mythtv
325 %attr(755,root,root) %{_bindir}/mythepg
326 %attr(755,root,root) %{_bindir}/mythprogfind
327 %attr(755,root,root) %{_bindir}/mythcommflag
328 %attr(755,root,root) %{_bindir}/mythtranscode
329 %attr(755,root,root) %{_bindir}/mythtvosd
330 %{_libdir}/mythtv/filters
331 %{_libdir}/mythtv/plugins
332 %{_datadir}/mythtv/*.ttf
333 %{_datadir}/mythtv/i18n
334 #%{_datadir}/applications/*myth*.desktop
335 #%{_datadir}/pixmaps/myth*.png
338 %defattr(644,root,root,755)
339 %{_datadir}/mythtv/themes
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
345 %files -n libmyth-devel
346 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/*.so
349 %{_datadir}/mythtv/build/settings.pro
351 %files -n libmyth-static
352 %defattr(644,root,root,755)