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