2 # - CFLAGS doesn't get passed
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.
13 # Set up some custom-build parameters
14 %bcond_with lirc # lirc
15 %bcond_without alsa # alsa
16 %bcond_without oss # oss
17 %bcond_with opengl_vsync # opengl vsync
18 %bcond_with arts # arts
19 %bcond_with xvmc # xvmc
20 %bcond_with cpu_autodetect # enable cpu autodetection at compile time
23 #define _snap 20050326
25 Summary: A personal video recorder (PVR) application.
26 Group: Applications/Multimedia
28 URL: http://www.mythtv.org/
29 Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2
30 # Source0-md5: c996dc690d36e946396fc5cd4b715e3b
31 Source1: mythbackend.sysconfig
32 Source2: mythbackend.init
33 Source3: mythbackend.logrotate
34 Patch0: %{name}-configure.patch
35 ExclusiveArch: i386 i686 athlon x86_64
36 Requires(post): /sbin/ldconfig
37 Requires(postun): /sbin/ldconfig
38 BuildRequires: gcc-c++
39 BuildRequires: XFree86-devel
40 BuildRequires: freetype-devel >= 1:2.0.0
41 BuildRequires: lame-libs-devel
42 BuildRequires: qt-devel >= 6:3.2.1-4
43 BuildRequires: qmake >= 6:3.2.1-4
44 BuildRequires: mysql-devel
45 BuildRequires: desktop-file-utils
46 BuildRequires: sed >= 4.0
47 BuildRequires: linux-libc-headers >= 7:2.6.10
48 BuildRequires: rpmbuild(macros) >= 1.200
49 %{?with_alsa:BuildRequires: alsa-lib-devel}
50 %{?with_lirc:BuildRequires: lirc-devel}
51 %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5}
52 %{?with_xvmc:BuildRequires: nvidia-graphics-devel}
53 %{?with_opengl_vsync:BuildRequires: nvidia-graphics-devel}
54 Requires(pre): /bin/id
55 Requires(pre): /usr/sbin/useradd
56 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 MythTV implements the following PVR features, and more, with a unified
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
75 Summary: Library providing mythtv support.
77 Requires: freetype >= 1:2.0.0
79 Requires: qt >= 6:3.2.1-4
80 Requires: qt-plugin-mysql >= 6:3.2.1-4
82 %description -n libmyth
83 Common library code for MythTV and add-on modules (development) MythTV
84 provides a unified graphical interface for recording and viewing
85 television programs. Refer to the mythtv package for more information.
87 %package -n libmyth-devel
88 Summary: Development files for libmyth.
89 Group: Development/Libraries
90 Requires: libmyth = %{version}-%{release}
91 BuildRequires: freetype-devel >= 1:2.0.0
92 BuildRequires: lame-libs-devel
93 BuildRequires: qt-devel >= 6:3.2.1-4
94 BuildRequires: mysql-devel
95 BuildRequires: DirectFB-devel
97 BuildRequires: alsa-lib-devel
100 BuildRequires: lirc-devel
103 BuildRequires: arts-devel >= 13:0.9.5
106 %description -n libmyth-devel
107 This package contains the header files and libraries for developing
110 %package -n libmyth-static
111 Summary: Static libmyth library
112 Group: Development/Libraries
113 Requires: lib%{name}-devel = %{version}-%{release}
115 %description -n libmyth-static
116 Static libmyth library.
119 Summary: Base themes for mythtv's frontend.
120 Group: Applications/Multimedia
121 Obsoletes: mythtv-theme-Titivillus
124 MythTV provides a unified graphical interface for recording and
125 viewing television programs. Refer to the mythtv package for more
128 This package contains only the base themes used by the frontend and
132 Summary: Client component of mythtv (a PVR).
133 Group: Applications/Multimedia
134 Requires: mythtv = %{version}-%{release}
135 Requires: mythtv-themes = %{version}-%{release}
136 Provides: mythtv-frontend-api = %(echo %{version} | cut -d. -f1,2)
138 %description frontend
139 MythTV provides a unified graphical interface for recording and
140 viewing television programs. Refer to the mythtv package for more
143 This package contains only the client software, which provides a
144 front-end for playback and configuration. It requires access to a
145 mythtv-backend installation, either on the same system or one
146 reachable via the network.
149 Summary: Server component of mythtv (a PVR).
150 Group: Applications/Multimedia
151 Conflicts: xmltv-grabbers < 0.5.34
152 Requires: mythtv = %{version}-%{release}
153 Provides: user(mythtv)
154 Provides: group(mythtv)
157 MythTV provides a unified graphical interface for recording and
158 viewing television programs. Refer to the mythtv package for more
161 This package contains only the server software, which provides video
162 and audio capture and encoding services. In order to be useful, it
163 requires a mythtv-frontend installation, either on the same system or
164 one reachable via the network.
167 Summary: Setup the mythtv backend.
168 Group: Applications/Multimedia
169 Requires: mythtv-backend = %{version}-%{release}
170 Requires: mythtv-themes = %{version}-%{release}
171 Provides: mythtvsetup
174 MythTV provides a unified graphical interface for recording and
175 viewing television programs. Refer to the mythtv package for more
178 This package contains only the setup software for configuring the
186 export QTDIR="%{_prefix}"
187 export QMAKESPEC="linux-g++"
188 export CFLAGS="%{rpmcflags} -fomit-frame-pointer"
190 # BTW: this is not autoconf configure
192 --compile-type=%{?debug:debug}%{!?debug:release} \
193 --disable-audio-jack \
194 --enable-dvb --dvb-path=%{_includedir} \
195 %if %{with cpu_autodetect}
197 --cpu=i386 --tune=pentium4 --enable-mmx \
206 --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \
207 --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \
208 --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \
209 --%{?with_opengl_vsync:en}%{!?with_openvl_vsync:dis}able-opengl-vsync \
210 --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \
211 %{?with_xvmc:--enable-xvmc --enable-xvmc-vld} \
212 %{!?with_xvmc:--disable-xvmc --disable-xvmc-vld} \
213 # --disable-joystick-menu \
214 # --disable-firewire \
218 #sed -i -e 's:OPTFLAGS=.*:OPTFLAGS=%{rpmcflags} -Wno-switch:g' config.mak
219 # dunno. the configure doesn't take --prefix...
220 sed -i -e 's:PREFIX =.*:PREFIX = %{_prefix}:g' settings.pro
222 # MythTV doesn't support parallel builds
223 #qmake -o Makefile mythtv.pro \
224 # QMAKE_CXX="%{__cxx}" \
225 # QMAKE_LINK="%{__cxx}" \
226 # QMAKE_CXXFLAGS_RELEASE="%{rpmcflags}"
232 # We don't want rpm to add perl requirements to anything in contrib
233 find contrib -type f | xargs -r chmod a-x
236 rm -rf $RPM_BUILD_ROOT
237 install -d $RPM_BUILD_ROOT
239 export QTDIR="%{_prefix}"
241 INSTALL_ROOT=$RPM_BUILD_ROOT
243 # Install the files that we added on top of mythtv's own stuff
244 install -pD %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
245 install -pD %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mythbackend
246 install -pD %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
249 #mkdir -p %{buildroot}%{_datadir}/pixmaps
250 #mkdir -p %{buildroot}%{_datadir}/applications
251 #for file in %{desktop_applications}; do
252 # install -p %{_sourcedir}/$file.png %{buildroot}%{_datadir}/pixmaps/$file.png
253 # desktop-file-install --vendor %{desktop_vendor} \
254 # --dir %{buildroot}%{_datadir}/applications \
255 # --add-category X-Red-Hat-Extra \
256 # --add-category Application \
257 # --add-category AudioVideo \
258 # %{_sourcedir}/$file.desktop
261 # Various utility directories that we want rpm to keep track of mythtv ownership
262 install -d $RPM_BUILD_ROOT/var/lib/mythtv
263 install -d $RPM_BUILD_ROOT/var/lib/cache/mythtv
264 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/mythtv
265 install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
266 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
267 install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
269 # Create the plugins directory, so rpm can know mythtv owns it
270 install -d $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins
272 # Install settings.pro so people can see the build options we used
273 install -pD settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build/settings.pro
276 rm -rf $RPM_BUILD_ROOT
279 %groupadd -g %{gid} %{name}
280 %useradd -u %{uid} -d /usr/share/empty -g %{name} -c "Mythtv User" %{name}
282 %post -p /sbin/ldconfig
286 if [ "$1" = "0" ]; then
292 %defattr(644,root,root,755)
293 %doc README* UPGRADING AUTHORS COPYING FAQ
294 %doc database keys.txt
295 %doc docs contrib configfiles
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_bindir}/mythbackend
300 %attr(755,root,root) %{_bindir}/mythfilldatabase
301 %attr(755,root,root) %{_bindir}/mythjobqueue
302 %attr(755,mythtv,mythtv) %dir /var/lib/mythtv
303 %attr(755,mythtv,mythtv) %dir /var/lib/cache/mythtv
304 %attr(754,root,root) /etc/rc.d/init.d/mythbackend
305 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend
306 %config /etc/logrotate.d/mythbackend
307 %attr(755,mythtv,mythtv) %dir %{_localstatedir}/log/mythtv
310 %defattr(644,root,root,755)
311 #%attr(755,root,root) %{_bindir}/mythtv-setup MISSING
314 %defattr(644,root,root,755)
315 %{_datadir}/mythtv/*.xml
316 %attr(755,root,root) %{_bindir}/mythfrontend
317 %attr(755,root,root) %{_bindir}/mythtv
318 %attr(755,root,root) %{_bindir}/mythepg
319 %attr(755,root,root) %{_bindir}/mythprogfind
320 %attr(755,root,root) %{_bindir}/mythcommflag
321 %attr(755,root,root) %{_bindir}/mythtranscode
322 %attr(755,root,root) %{_bindir}/mythtvosd
323 %{_libdir}/mythtv/filters
324 %{_libdir}/mythtv/plugins
325 %{_datadir}/mythtv/*.ttf
326 %{_datadir}/mythtv/i18n
327 #%{_datadir}/applications/*myth*.desktop
328 #%{_datadir}/pixmaps/myth*.png
331 %defattr(644,root,root,755)
332 %{_datadir}/mythtv/themes
335 %defattr(644,root,root,755)
336 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
338 %files -n libmyth-devel
339 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libdir}/*.so
342 %{_datadir}/mythtv/build/settings.pro
344 %files -n libmyth-static
345 %defattr(644,root,root,755)