]>
Commit | Line | Data |
---|---|---|
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 | ||
8afae0cb | 13 | # Set up some custom-build parameters |
910a00e3 ER |
14 | %bcond_with lirc |
15 | %bcond_without alsa | |
16 | %bcond_without oss | |
17 | %bcond_with opengl_vsync | |
18 | %bcond_with arts | |
19 | %bcond_with xvmc | |
20 | %bcond_with cpu_autodetect # enable cpu autodetection at compile time | |
21 | ||
22 | Name: mythtv | |
23 | Version: 0.17 | |
24 | #define _snap 20050326 | |
a7691716 | 25 | Release: 0.2 |
910a00e3 ER |
26 | Summary: A personal video recorder (PVR) application. |
27 | Group: Applications/Multimedia | |
28 | License: GPL v2 | |
29 | URL: http://www.mythtv.org/ | |
30 | Source0: http://www.mythtv.org/mc/%{name}-%{version}.tar.bz2 | |
31 | # Source0-md5: c996dc690d36e946396fc5cd4b715e3b | |
eceeddea ER |
32 | Source1: mythbackend.sysconfig |
33 | Source2: mythbackend.init | |
34 | Source3: mythbackend.logrotate | |
910a00e3 | 35 | Source12: http://linuxtv.org/download/dvb/%{linuxtv_dvb_package}.tar.bz2 |
eceeddea | 36 | Patch0: %{name}-configure.patch |
910a00e3 ER |
37 | # Source12-md5: 6dd599f24b7abecd1e32c203eaa7fa8a |
38 | ExclusiveArch: i386 i686 athlon x86_64 | |
a7691716 ER |
39 | Requires(post): /sbin/ldconfig |
40 | Requires(postun): /sbin/ldconfig | |
910a00e3 ER |
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 | |
49 | %if %{with alsa} | |
50 | BuildRequires: alsa-lib-devel | |
8afae0cb | 51 | %endif |
910a00e3 ER |
52 | %if %{with lirc} |
53 | BuildRequires: lirc-devel | |
8afae0cb | 54 | %endif |
910a00e3 ER |
55 | %if %{with arts} |
56 | BuildRequires: arts-devel >= 13:0.9.5 | |
8afae0cb | 57 | %endif |
910a00e3 ER |
58 | %if %{with xvmc} |
59 | BuildRequires: nvidia-graphics-devel | |
8afae0cb | 60 | %endif |
a7691716 ER |
61 | %if %{with opengl_vsync} |
62 | BuildRequires: nvidia-graphics-devel | |
63 | %endif | |
910a00e3 | 64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8afae0cb ER |
65 | |
66 | %description | |
910a00e3 ER |
67 | MythTV implements the following PVR features, and more, with a unified |
68 | graphical 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 |
80 | Summary: Library providing mythtv support. |
81 | Group: Libraries | |
82 | Requires: freetype >= 1:2.0.0 | |
83 | Requires: lame | |
a7691716 | 84 | Requires: qt >= 6:3.2.1-4 |
910a00e3 | 85 | Requires: qt-plugin-mysql >= 6:3.2.1-4 |
8afae0cb ER |
86 | |
87 | %description -n libmyth | |
910a00e3 ER |
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. | |
8afae0cb ER |
91 | |
92 | %package -n libmyth-devel | |
910a00e3 ER |
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 | |
101 | %if %{with alsa} | |
102 | BuildRequires: alsa-lib-devel | |
8afae0cb | 103 | %endif |
910a00e3 ER |
104 | %if %{with lirc} |
105 | BuildRequires: lirc-devel | |
8afae0cb | 106 | %endif |
910a00e3 ER |
107 | %if %{with arts} |
108 | BuildRequires: arts-devel >= 13:0.9.5 | |
8afae0cb ER |
109 | %endif |
110 | ||
111 | %description -n libmyth-devel | |
112 | This package contains the header files and libraries for developing | |
113 | add-ons for mythtv. | |
114 | ||
a7691716 ER |
115 | %package -n libmyth-static |
116 | Summary: Static libmyth library | |
117 | Group: Development/Libraries | |
118 | Requires: lib%{name}-devel = %{version}-%{release} | |
119 | ||
120 | %description -n libmyth-static | |
121 | Static libmyth library. | |
122 | ||
8afae0cb | 123 | %package themes |
910a00e3 ER |
124 | Summary: Base themes for mythtv's frontend. |
125 | Group: Applications/Multimedia | |
126 | Obsoletes: mythtv-theme-Titivillus | |
8afae0cb ER |
127 | |
128 | %description themes | |
910a00e3 ER |
129 | MythTV provides a unified graphical interface for recording and |
130 | viewing television programs. Refer to the mythtv package for more | |
131 | information. | |
8afae0cb ER |
132 | |
133 | This package contains only the base themes used by the frontend and | |
134 | mythtvsetup. | |
135 | ||
136 | %package frontend | |
910a00e3 ER |
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) | |
8afae0cb ER |
142 | |
143 | %description frontend | |
910a00e3 ER |
144 | MythTV provides a unified graphical interface for recording and |
145 | viewing television programs. Refer to the mythtv package for more | |
146 | information. | |
8afae0cb ER |
147 | |
148 | This package contains only the client software, which provides a | |
910a00e3 | 149 | front-end for playback and configuration. It requires access to a |
8afae0cb ER |
150 | mythtv-backend installation, either on the same system or one |
151 | reachable via the network. | |
152 | ||
153 | %package backend | |
910a00e3 ER |
154 | Summary: Server component of mythtv (a PVR). |
155 | Group: Applications/Multimedia | |
156 | Conflicts: xmltv-grabbers < 0.5.34 | |
157 | Requires: mythtv = %{version}-%{release} | |
8afae0cb ER |
158 | |
159 | %description backend | |
910a00e3 ER |
160 | MythTV provides a unified graphical interface for recording and |
161 | viewing television programs. Refer to the mythtv package for more | |
162 | information. | |
8afae0cb ER |
163 | |
164 | This package contains only the server software, which provides video | |
910a00e3 | 165 | and audio capture and encoding services. In order to be useful, it |
8afae0cb ER |
166 | requires a mythtv-frontend installation, either on the same system or |
167 | one reachable via the network. | |
168 | ||
169 | %package setup | |
910a00e3 ER |
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 | |
8afae0cb ER |
175 | |
176 | %description setup | |
910a00e3 ER |
177 | MythTV provides a unified graphical interface for recording and |
178 | viewing television programs. Refer to the mythtv package for more | |
179 | information. | |
8afae0cb ER |
180 | |
181 | This package contains only the setup software for configuring the | |
182 | mythtv backend. | |
183 | ||
184 | %prep | |
185 | %setup -q -a 12 | |
eceeddea | 186 | %patch0 -p1 |
8afae0cb ER |
187 | |
188 | %build | |
910a00e3 | 189 | export QTDIR="%{_prefix}" |
eceeddea | 190 | #export QMAKESPEC="linux-g++" |
8afae0cb ER |
191 | |
192 | # Initialize the options string | |
193 | OPTS="" | |
194 | ||
eceeddea ER |
195 | |
196 | # Finally, actually configure | |
197 | ||
198 | # BTW: this is not autoconf configure | |
199 | %configure \ | |
200 | --compile-type=%{?debug:debug}%{!?debug:release} \ | |
201 | --disable-audio-jack \ | |
202 | --enable-dvb \ | |
203 | --dvb-path=%{_builddir}/%{name}-%{version}/%{linuxtv_dvb_package}/linux/include \ | |
910a00e3 | 204 | %if %{with cpu_autodetect} |
8afae0cb | 205 | %ifarch i386 |
eceeddea | 206 | --cpu=i386 --tune=pentium4 --enable-mmx \ |
8afae0cb ER |
207 | %endif |
208 | %ifarch i686 | |
eceeddea | 209 | --cpu=i686 --tune=pentium4 --enable-mmx \ |
8afae0cb ER |
210 | %endif |
211 | %ifarch athlon | |
eceeddea | 212 | --arch=athlon \ |
8afae0cb ER |
213 | %endif |
214 | %ifarch x86_64 | |
eceeddea | 215 | --arch=x86_64 \ |
8afae0cb ER |
216 | %endif |
217 | %endif | |
eceeddea ER |
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 \ | |
227 | # --disable-ivtv \ | |
228 | # --enable-dvb-eit \ | |
229 | ||
230 | #sed -i -e 's:OPTFLAGS=.*:OPTFLAGS=%{rpmcflags} -Wno-switch:g' config.mak | |
8afae0cb ER |
231 | |
232 | # MythTV doesn't support parallel builds | |
eceeddea ER |
233 | qmake -o Makefile mythtv.pro \ |
234 | QMAKE_CXX="%{__cxx}" \ | |
235 | QMAKE_LINK="%{__cxx}" \ | |
236 | QMAKE_CXXFLAGS_RELEASE="%{rpmcflags}" | |
237 | ||
238 | %{__make} qmake | |
8afae0cb ER |
239 | |
240 | # We don't want rpm to add perl requirements to anything in contrib | |
241 | find contrib -type f | xargs -r chmod a-x | |
242 | ||
243 | %install | |
244 | rm -rf $RPM_BUILD_ROOT | |
eceeddea ER |
245 | install -d $RPM_BUILD_ROOT |
246 | ||
247 | %{__make} install \ | |
248 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
249 | ||
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}} | |
8afae0cb ER |
254 | |
255 | # Install the files that we added on top of mythtv's own stuff | |
eceeddea ER |
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 | |
8afae0cb ER |
259 | |
260 | # Desktop entries | |
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 | |
271 | #done | |
272 | ||
273 | # Various utility directories that we want rpm to keep track of mythtv ownership | |
910a00e3 ER |
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} | |
eceeddea | 279 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig |
8afae0cb ER |
280 | |
281 | # Create the plugins directory, so rpm can know mythtv owns it | |
910a00e3 | 282 | install -d $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins |
8afae0cb ER |
283 | |
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 | |
286 | ||
287 | %clean | |
288 | rm -rf $RPM_BUILD_ROOT | |
289 | ||
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 | |
294 | ||
910a00e3 ER |
295 | %post -p /sbin/ldconfig |
296 | %postun -p /sbin/ldconfig | |
8afae0cb ER |
297 | |
298 | %files | |
910a00e3 | 299 | %defattr(644,root,root,755) |
8afae0cb ER |
300 | %doc README* UPGRADING AUTHORS COPYING FAQ |
301 | %doc database keys.txt | |
302 | %doc docs contrib configfiles | |
303 | ||
304 | %files backend | |
910a00e3 | 305 | %defattr(644,root,root,755) |
eceeddea | 306 | #%attr(755,root,root) %{_bindir}/mythbackend # MISSING |
910a00e3 ER |
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 | |
eceeddea | 312 | %config %{_sysconfdir}/sysconfig/mythbackend |
910a00e3 ER |
313 | %config /etc/logrotate.d/mythbackend |
314 | %attr(-,mythtv,mythtv) %dir %{_localstatedir}/log/mythtv | |
8afae0cb ER |
315 | |
316 | %files setup | |
910a00e3 | 317 | %defattr(644,root,root,755) |
eceeddea | 318 | #%attr(755,root,root) %{_bindir}/mythtv-setup MISSING |
8afae0cb ER |
319 | |
320 | %files frontend | |
910a00e3 | 321 | %defattr(644,root,root,755) |
8afae0cb | 322 | %{_datadir}/mythtv/*.xml |
eceeddea | 323 | #%attr(755,root,root) %{_bindir}/mythfrontend # MISSING |
910a00e3 ER |
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 | |
8afae0cb ER |
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 | |
336 | ||
337 | %files themes | |
910a00e3 | 338 | %defattr(644,root,root,755) |
8afae0cb ER |
339 | %{_datadir}/mythtv/themes |
340 | ||
341 | %files -n libmyth | |
910a00e3 | 342 | %defattr(644,root,root,755) |
a7691716 | 343 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* |
8afae0cb ER |
344 | |
345 | %files -n libmyth-devel | |
910a00e3 | 346 | %defattr(644,root,root,755) |
8afae0cb | 347 | %{_includedir}/* |
910a00e3 | 348 | %attr(755,root,root) %{_libdir}/*.so |
8afae0cb | 349 | %{_datadir}/mythtv/build/settings.pro |
a7691716 ER |
350 | |
351 | %files -n libmyth-static | |
352 | %defattr(644,root,root,755) | |
353 | %{_libdir}/lib*.a |