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