]>
Commit | Line | Data |
---|---|---|
aa6db6e7 | 1 | # TODO |
bc34ab39 | 2 | # - bconds: altivec joystick lcd |
58422b0a | 3 | # - lcd? (app-misc/lcdproc) |
58422b0a | 4 | # - alpha, sparc, ppc arches? |
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 | # | |
ed630fed | 12 | # Conditional build: |
af73c10e | 13 | %bcond_with cpu_autodetect # enable CPU autodetection at compile time (sets "-march", "-mcpu" compile flags really) |
cb059bf8 ER |
14 | %bcond_without lirc # lirc support |
15 | %bcond_without alsa # alsa support | |
9dc1d1be | 16 | %bcond_without oss # oss support |
8c0ea56f | 17 | %bcond_with arts # arts support |
cb059bf8 | 18 | %bcond_without jack # jack audio connection kit |
cb059bf8 | 19 | %bcond_without opengl # opengl vsync |
72445c7f | 20 | %bcond_without dvb # DVB support |
bc34ab39 | 21 | %bcond_without xrandr # disable X11 resolution switching |
8c0ea56f | 22 | %bcond_without ivtv # ivtv support (PVR-250, PVR-350) NFY |
23 | %bcond_without iptv | |
9dc1d1be | 24 | %bcond_with firewire # ieee1394 (NFY) |
bc34ab39 | 25 | %bcond_without xvmc # do not use XvMCW |
2dea5de0 | 26 | %bcond_without vdpau # disable nvidia vdpau support |
3650d7d4 | 27 | %bcond_with mmx # enable MMX |
8c0ea56f | 28 | %bcond_with dshowserver # enable directshow codecs server |
29 | %bcond_with directfb | |
e856e86e | 30 | %bcond_with nvidia_headers |
32b3b293 ER |
31 | |
32 | # enable mmx automatically on arches having it | |
33 | %ifarch %{ix86} %{x8664} | |
34 | %ifnarch i386 i486 i586 i686 | |
35 | %define with_mmx 1 | |
36 | %endif | |
37 | %endif | |
cb059bf8 | 38 | |
8c0ea56f | 39 | # dshowserver is exclusive arch for x86 x86_64 only |
40 | %ifnarch %{ix86} %{x8664} | |
41 | %undefine with_dshowserver | |
42 | %endif | |
43 | ||
89dae42c | 44 | %define snap rc1 |
8c0ea56f | 45 | #%define rel 0.1 |
b2c9e730 | 46 | Summary: A personal video recorder (PVR) application |
7456895a | 47 | Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR) |
910a00e3 | 48 | Name: mythtv |
8c0ea56f | 49 | Version: 0.22 |
2dea5de0 | 50 | Release: 0.%{snap}.1 |
910a00e3 | 51 | License: GPL v2 |
b2c9e730 | 52 | Group: Applications/Multimedia |
2dea5de0 | 53 | Source0: ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}%{snap}.tar.bz2 |
54 | # Source0-md5: 049e93d78d5370351539c9a23b47e1af | |
eceeddea ER |
55 | Source1: mythbackend.sysconfig |
56 | Source2: mythbackend.init | |
57 | Source3: mythbackend.logrotate | |
8c0ea56f | 58 | Source5: pld-mythfrontend.desktop |
59 | # Source5-md5: f37a903ac97463683bebacdf29406951 | |
60 | Source6: pld-mythfrontend.png | |
61 | # Source6-md5: bf76bd1463a022e174e4af976a03e678 | |
62 | Source20: dshowcodecs | |
63 | # Source20-md5: 48327772b9e150f69e1ab8ff44b9a76c | |
64 | #Patch100: %{name}-branch.diff | |
65 | Patch0: %{name}-configure.patch | |
66 | #Patch1: %{name}-mythstream.patch | |
67 | #Patch2: %{name}-pl.patch | |
68 | Patch3: %{name}-sbinpath.patch | |
69 | #Patch4: %{name}-dvdnav-shared.patch | |
70 | Patch20: %{name}-dshowserver_trunk.patch | |
b2c9e730 | 71 | URL: http://www.mythtv.org/ |
e856e86e | 72 | %{?without_nvidia_headers:BuildConflicts: xorg-driver-video-nvidia-libs} |
73 | %{?without_nvidia_headers:BuildConflicts: xorg-driver-video-nvidia-devel} | |
8c0ea56f | 74 | BuildRequires: Mesa-libGLU-devel |
2dea5de0 | 75 | #BuildRequires: OpenGL-GLU-devel |
c54e5d8a | 76 | BuildRequires: OpenGL-devel |
8c0ea56f | 77 | BuildRequires: Qt3Support-devel |
78 | BuildRequires: QtCore-devel | |
79 | BuildRequires: QtGui-devel | |
80 | BuildRequires: QtNetwork-devel | |
81 | BuildRequires: QtOpenGL-devel | |
82 | BuildRequires: QtScript-devel | |
83 | BuildRequires: QtSql-devel | |
84 | BuildRequires: QtWebKit-devel | |
85 | BuildRequires: QtXml-devel | |
ed630fed JB |
86 | %{?with_alsa:BuildRequires: alsa-lib-devel} |
87 | %{?with_arts:BuildRequires: arts-devel >= 13:0.9.5} | |
8c0ea56f | 88 | BuildRequires: ffmpeg-devel |
c0517663 | 89 | BuildRequires: freetype-devel >= 1:2.0.0 |
cb059bf8 | 90 | %{?with_jack:BuildRequires: jack-audio-connection-kit-devel} |
c0517663 | 91 | BuildRequires: lame-libs-devel |
c0517663 | 92 | %{?with_firewire:BuildRequires: libavc1394-devel} |
8c0ea56f | 93 | BuildRequires: libdts-devel |
96b717a5 ER |
94 | %{?with_dvb:BuildRequires: libdvb-devel} |
95 | BuildRequires: libdvdnav-devel | |
c0517663 ER |
96 | %{?with_firewire:BuildRequires: libiec61883-devel} |
97 | %{?with_firewire:BuildRequires: libraw1394-devel} | |
a3ec4ed6 | 98 | BuildRequires: linux-libc-headers >= 7:2.6.10 |
f3707f19 | 99 | %{?with_lirc:BuildRequires: lirc-devel} |
ed630fed | 100 | BuildRequires: mysql-devel |
8c0ea56f | 101 | #BuildRequires: patchutils |
102 | BuildRequires: perl-devel | |
103 | BuildRequires: perl-tools-pod | |
2dea5de0 | 104 | BuildRequires: pkgconfig |
8c0ea56f | 105 | BuildRequires: python-devel |
106 | BuildRequires: qt4-build | |
107 | BuildRequires: qt4-qmake | |
108 | BuildRequires: rpm-pythonprov | |
4cd4742b | 109 | BuildRequires: rpmbuild(macros) >= 1.228 |
ed630fed | 110 | BuildRequires: sed >= 4.0 |
c54e5d8a | 111 | %{?with_vdpau:BuildRequires: libvdpau-devel} |
5df4c947 | 112 | BuildRequires: xorg-lib-libXext-devel |
8c0ea56f | 113 | %{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel} |
ca754245 | 114 | BuildRequires: xorg-lib-libXxf86vm-devel |
8c0ea56f | 115 | # for Perl bindings |
116 | BuildRequires: perl-ExtUtils-MakeMaker | |
97b6efdd | 117 | ExclusiveArch: %{ix86} %{x8664} ppc |
910a00e3 | 118 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8afae0cb | 119 | |
96b717a5 ER |
120 | %define myth_api_version %(echo %{version} | cut -d. -f1,2) |
121 | ||
8afae0cb | 122 | %description |
910a00e3 ER |
123 | MythTV implements the following PVR features, and more, with a unified |
124 | graphical interface: | |
5eccad13 ER |
125 | - Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV. |
126 | - Video compression using RTjpeg or MPEG-4 | |
127 | - Program listing retrieval using XMLTV | |
128 | - Themable, semi-transparent on-screen display | |
129 | - Electronic program guide | |
130 | - Scheduled recording of TV programs | |
131 | - Resolution of conflicts between scheduled recordings | |
132 | - Basic video editing | |
8afae0cb | 133 | |
17176342 JR |
134 | %description -l pl.UTF-8 |
135 | MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z | |
ed630fed | 136 | ujednoliconym interfejsem graficznym: |
17176342 JR |
137 | - podstawowa funkcjonalność "live-tv"; pauza, szybkie przewijanie, |
138 | przewijanie "żywej" telewizji | |
139 | - kompresja obrazu przy użyciu RTjpeg lub MPEG-4 | |
140 | - odczyt listy programów przy użyciu XMLTV | |
141 | - pseudoprzezroczyste wyświetlanie na obrazie (OSD) z obsługą motywów | |
ed630fed | 142 | - elektroniczny przewodnik po programie |
17176342 JR |
143 | - planowane nagrywanie programów telewizyjnych |
144 | - rozwiązywanie konfliktów między planowanymi nagraniami | |
ed630fed | 145 | - podstawowa edycja obrazu |
a7691716 | 146 | |
ed630fed JB |
147 | %package backend |
148 | Summary: Server component of mythtv (a PVR) | |
7456895a | 149 | Summary(pl.UTF-8): Część serwerowa mythtv (PVR) |
910a00e3 | 150 | Group: Applications/Multimedia |
96b717a5 ER |
151 | Requires(post,preun): /sbin/chkconfig |
152 | Requires(postun): /usr/sbin/groupdel | |
153 | Requires(postun): /usr/sbin/userdel | |
ed630fed | 154 | Requires(pre): /bin/id |
f2f4277e | 155 | Requires(pre): /usr/bin/getgid |
ed630fed JB |
156 | Requires(pre): /usr/sbin/groupadd |
157 | Requires(pre): /usr/sbin/useradd | |
96b717a5 | 158 | Requires: libmyth = %{version}-%{release} |
ed630fed | 159 | Requires: mythtv = %{version}-%{release} |
2dea5de0 | 160 | Suggests: mysql |
ed630fed | 161 | Provides: group(mythtv) |
96b717a5 | 162 | Provides: user(mythtv) |
8afae0cb | 163 | |
ed630fed | 164 | %description backend |
910a00e3 ER |
165 | MythTV provides a unified graphical interface for recording and |
166 | viewing television programs. Refer to the mythtv package for more | |
167 | information. | |
8afae0cb | 168 | |
ed630fed JB |
169 | This package contains only the server software, which provides video |
170 | and audio capture and encoding services. In order to be useful, it | |
171 | requires a mythtv-frontend installation, either on the same system or | |
172 | one reachable via the network. | |
173 | ||
17176342 | 174 | %description backend -l pl.UTF-8 |
ed630fed | 175 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 176 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed JB |
177 | mythtv. |
178 | ||
17176342 JR |
179 | Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające |
180 | usługi przechwytywania i kodowania obrazu i dźwięku. Aby było | |
ed630fed | 181 | przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie, |
17176342 | 182 | albo innym osiągalnym po sieci. |
8afae0cb ER |
183 | |
184 | %package frontend | |
ed630fed | 185 | Summary: Client component of mythtv (a PVR) |
7456895a | 186 | Summary(pl.UTF-8): Część kliencka mythtv (PVR) |
910a00e3 | 187 | Group: Applications/Multimedia |
96b717a5 | 188 | Requires: libmyth = %{version}-%{release} |
910a00e3 ER |
189 | Requires: mythtv = %{version}-%{release} |
190 | Requires: mythtv-themes = %{version}-%{release} | |
96b717a5 | 191 | Provides: mythtv-frontend-api = %{myth_api_version} |
8afae0cb ER |
192 | |
193 | %description frontend | |
910a00e3 ER |
194 | MythTV provides a unified graphical interface for recording and |
195 | viewing television programs. Refer to the mythtv package for more | |
196 | information. | |
8afae0cb ER |
197 | |
198 | This package contains only the client software, which provides a | |
910a00e3 | 199 | front-end for playback and configuration. It requires access to a |
8afae0cb ER |
200 | mythtv-backend installation, either on the same system or one |
201 | reachable via the network. | |
202 | ||
17176342 | 203 | %description frontend -l pl.UTF-8 |
ed630fed | 204 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 205 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed | 206 | mythtv. |
8afae0cb | 207 | |
17176342 JR |
208 | Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające |
209 | frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji | |
210 | mythtv-backend - na tym samym systemie, albo innym osiągalnym po | |
ed630fed | 211 | sieci. |
8afae0cb ER |
212 | |
213 | %package setup | |
ed630fed | 214 | Summary: Setup the mythtv backend |
7456895a | 215 | Summary(pl.UTF-8): Konfigurator backendu mythtv |
910a00e3 | 216 | Group: Applications/Multimedia |
96b717a5 | 217 | Requires: libmyth = %{version}-%{release} |
8afae0cb ER |
218 | |
219 | %description setup | |
910a00e3 ER |
220 | MythTV provides a unified graphical interface for recording and |
221 | viewing television programs. Refer to the mythtv package for more | |
222 | information. | |
8afae0cb ER |
223 | |
224 | This package contains only the setup software for configuring the | |
225 | mythtv backend. | |
226 | ||
17176342 | 227 | %description setup -l pl.UTF-8 |
ed630fed | 228 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 229 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed JB |
230 | mythtv. |
231 | ||
232 | Ten pakiet zawiera tylko program do konfigurowania backendu mythtv. | |
233 | ||
234 | %package themes | |
235 | Summary: Base themes for mythtv's frontend | |
7456895a | 236 | Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv |
bbba3c1d | 237 | Group: Themes |
8c0ea56f | 238 | Requires: %{name}-frontend = %{version}-%{release} |
ed630fed JB |
239 | |
240 | %description themes | |
241 | MythTV provides a unified graphical interface for recording and | |
242 | viewing television programs. Refer to the mythtv package for more | |
243 | information. | |
244 | ||
245 | This package contains only the base themes used by the frontend and | |
246 | mythtvsetup. | |
247 | ||
17176342 | 248 | %description themes -l pl.UTF-8 |
ed630fed | 249 | MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i |
17176342 | 250 | oglądania programów telewizyjnych. Więcej informacji w pakiecie |
ed630fed JB |
251 | mythtv. |
252 | ||
17176342 | 253 | Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz |
ed630fed JB |
254 | mythtvsetup. |
255 | ||
256 | %package -n libmyth | |
257 | Summary: Library providing mythtv support | |
7456895a | 258 | Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv |
ed630fed | 259 | Group: Libraries |
8c0ea56f | 260 | Requires: QtSql-mysql |
ed630fed JB |
261 | Requires: freetype >= 1:2.0.0 |
262 | Requires: lame | |
ed630fed JB |
263 | |
264 | %description -n libmyth | |
265 | Common library code for MythTV and add-on modules (development) MythTV | |
266 | provides a unified graphical interface for recording and viewing | |
267 | television programs. Refer to the mythtv package for more information. | |
268 | ||
17176342 JR |
269 | %description -n libmyth -l pl.UTF-8 |
270 | Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV | |
271 | dostarczający ujednolicony interfejs graficzny do nagrywania i | |
272 | oglądania programów telewizyjnych. Więcej informacji w pakiecie | |
ed630fed JB |
273 | mythtv. |
274 | ||
275 | %package -n libmyth-devel | |
276 | Summary: Development files for libmyth | |
7456895a | 277 | Summary(pl.UTF-8): Pliki nagłówkowe libmyth |
ed630fed JB |
278 | Group: Development/Libraries |
279 | Requires: libmyth = %{version}-%{release} | |
ed630fed JB |
280 | |
281 | %description -n libmyth-devel | |
282 | This package contains the header files for developing add-ons for | |
283 | mythtv. | |
284 | ||
17176342 JR |
285 | %description -n libmyth-devel -l pl.UTF-8 |
286 | Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv. | |
ed630fed JB |
287 | |
288 | %package -n libmyth-static | |
289 | Summary: Static libmyth library | |
7456895a | 290 | Summary(pl.UTF-8): Statyczna biblioteka libmyth |
ed630fed JB |
291 | Group: Development/Libraries |
292 | Requires: libmyth-devel = %{version}-%{release} | |
293 | ||
294 | %description -n libmyth-static | |
295 | Static libmyth library. | |
296 | ||
17176342 | 297 | %description -n libmyth-static -l pl.UTF-8 |
ed630fed JB |
298 | Statyczna biblioteka libmyth. |
299 | ||
8c0ea56f | 300 | %package -n perl-MythTV |
301 | Summary: MythTV Perl bindings | |
302 | Summary(pl.UTF-8): Interfejs Perla dla MythTV | |
303 | Group: Libraries | |
304 | ||
305 | %description -n perl-MythTV | |
306 | MythTV Perl bindings. | |
307 | ||
308 | %description -n perl-MythTV -l pl.UTF-8 | |
309 | Ten pakiet zawiera moduły Perla do tworzenia dodatków dla mythtv. | |
310 | ||
3f7f03f8 JK |
311 | %package -n python-MythTV |
312 | Summary: MythTV Python bindings | |
8c0ea56f | 313 | Summary(pl.UTF-8): Interfejs Pythona dla MythTV |
314 | Group: Libraries | |
315 | Requires: MySQL-python | |
3f7f03f8 JK |
316 | |
317 | %description -n python-MythTV | |
8c0ea56f | 318 | MythTV Python bindings. |
3f7f03f8 JK |
319 | |
320 | %description -n python-MythTV -l pl.UTF-8 | |
321 | Ten pakiet zawiera moduły Pythona do tworzenia dodatków dla mythtv. | |
322 | ||
8afae0cb | 323 | %prep |
8c0ea56f | 324 | |
2dea5de0 | 325 | %setup -q -n %{name}-%{version}%{snap} |
8c0ea56f | 326 | |
327 | ||
2dea5de0 | 328 | %patch0 -p1 |
8c0ea56f | 329 | #%patch1 -p1 |
330 | #%patch2 -p1 | |
0ea777bd | 331 | %patch3 -p1 |
8c0ea56f | 332 | #%patch4 -p1 |
8afae0cb | 333 | |
8c0ea56f | 334 | %{?with_dshowserver:%patch20 -p1} |
6e738c98 ER |
335 | rm -rf database/old # not supported in PLD |
336 | ||
96b717a5 ER |
337 | # lib64 fix - enable to update patch |
338 | %if %{_lib} != "lib" && 0 | |
339 | find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \ | |
340 | xargs grep -l /lib . | xargs sed -i -e ' | |
341 | s,/''usr/lib/,/%{_libdir}/,g | |
342 | s,/''lib/mythtv,/%{_lib}/mythtv,g | |
343 | s,{PREFIX}/lib$,{PREFIX}/%{_lib},g | |
344 | ' | |
345 | exit 1 | |
346 | %endif | |
347 | ||
3c3d6f2b ER |
348 | # Assigning null to QMAKE_LIBDIR_QT will prevent makefiles contain |
349 | # -L$(QTDIR)/%{_lib} and -Wl,-rpath,$(QTDIR)/%{_lib}. And that will | |
350 | # prevent compiler finding libs from system when they should be looked | |
351 | # from current buildtree. | |
352 | # but that made it link with -lqt which doesn't exist, instead of -lqt-mt | |
353 | # so we make QMAKE wrapper which will do sed subst after calling | |
354 | # qmake. this is the wrapper. | |
355 | cat > qmake-wrapper.sh <<'EOF' | |
356 | #!/bin/sh | |
357 | getmakefile() { | |
358 | while [ $# -gt 0 ]; do | |
359 | case "$1" in | |
360 | -o) | |
361 | shift | |
362 | makefile="$1" | |
363 | return | |
364 | ;; | |
8c0ea56f | 365 | esac |
3c3d6f2b ER |
366 | shift |
367 | done | |
368 | } | |
369 | ||
8c0ea56f | 370 | qmake-qt4 "$@" |
3c3d6f2b ER |
371 | getmakefile "$@" |
372 | if [ "$makefile" ]; then | |
373 | %{__sed} -i -e ' | |
374 | s;-Wl,-rpath,$(QTDIR)/%{_lib};; | |
375 | s;-L$(QTDIR)/%{_lib};; | |
376 | ' $makefile | |
377 | fi | |
378 | EOF | |
379 | chmod +x qmake-wrapper.sh | |
380 | ||
8c0ea56f | 381 | # move perl bindings to vendor prefix |
382 | sed -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"#' \ | |
383 | bindings/perl/perl.pro | |
384 | ||
8afae0cb | 385 | %build |
8c0ea56f | 386 | |
018c2e7e ER |
387 | %if %{with cpu_autodetect} |
388 | # Make sure we have /proc mounted | |
389 | if [ ! -r /proc/cpuinfo ]; then | |
390 | echo "You need to have /proc mounted in order to build with cpu_autodetect!" | |
391 | exit 1 | |
392 | fi | |
393 | %endif | |
eceeddea | 394 | |
96b717a5 ER |
395 | ./configure \ |
396 | --prefix=%{_prefix} \ | |
397 | --libdir=%{_libdir} \ | |
8c0ea56f | 398 | --libdir-name=`basename %{_libdir}` \ |
96b717a5 | 399 | --mandir=%{_mandir} \ |
1b03363f | 400 | --disable-distcc --disable-ccache \ |
8e8230a1 | 401 | --compile-type=%{?debug:debug}%{!?debug:release} \ |
86b7888f ER |
402 | --extra-cflags="%{rpmcflags} -fomit-frame-pointer" \ |
403 | --extra-cxxflags="%{rpmcxxflags} -fomit-frame-pointer" \ | |
c79fdf07 ER |
404 | %if %{with cpu_autodetect} |
405 | --enable-proc-opt \ | |
406 | %else | |
c0517663 | 407 | %ifarch %{ix86} |
58422b0a | 408 | %ifarch athlon |
d0c7b0ef | 409 | --arch=athlon \ |
58422b0a ER |
410 | %else |
411 | --cpu=i386 --tune=pentium4 \ | |
58422b0a | 412 | %endif |
c0517663 ER |
413 | %endif |
414 | %ifarch %{x8664} | |
d0c7b0ef | 415 | --arch=x86_64 \ |
c0517663 | 416 | %endif |
32b3b293 | 417 | %{?with_mmx:--enable-mmx} \ |
8afae0cb | 418 | %endif |
ac180387 | 419 | %{?with_dvb:--enable-dvb --dvb-path=%{_includedir}} \ |
eceeddea ER |
420 | --%{?with_arts:en}%{!?with_arts:dis}able-audio-arts \ |
421 | --%{?with_alsa:en}%{!?with_alsa:dis}able-audio-alsa \ | |
422 | --%{?with_oss:en}%{!?with_oss:dis}able-audio-oss \ | |
6c269db6 | 423 | --%{?with_jack:en}%{!?with_jack:dis}able-audio-jack \ |
c79fdf07 | 424 | --%{?with_opengl:en}%{!?with_opengl:dis}able-opengl-vsync \ |
eceeddea | 425 | --%{?with_lirc:en}%{!?with_lirc:dis}able-lirc \ |
cb059bf8 | 426 | --%{?with_firewire:en}%{!?with_firewire:dis}able-firewire \ |
bc34ab39 ER |
427 | --%{?with_xrandr:en}%{!?with_xrandr:dis}able-xrandr \ |
428 | --%{?with_xvmc:en}%{!?with_xvmc:dis}able-xvmc \ | |
8c0ea56f | 429 | --%{?with_ivtv:en}%{!?with_ivtv:dis}able-ivtv \ |
430 | --%{?with_iptv:en}%{!?with_iptv:dis}able-iptv \ | |
431 | --%{?with_nellymoserdec:en}%{!?with_nellymoserdec:dis}able-decoder=nellymoser \ | |
2dea5de0 | 432 | --%{?with_vdpau:en}%{!?with_vdpau:dis}able-vdpau \ |
8c0ea56f | 433 | --%{?with_directfb:en}%{!?with_directfb:dis}able-directfb \ |
cb059bf8 ER |
434 | --enable-xv \ |
435 | --enable-x11 \ | |
96b717a5 | 436 | |
8c0ea56f | 437 | %{_libdir}/qt4/bin/qmake mythtv.pro |
438 | #sed -i -e 's/usr\/\/usr/usr/g' config.ep | |
439 | ||
440 | ||
441 | %{__make} | |
448e41b0 | 442 | |
8afae0cb | 443 | |
8afae0cb ER |
444 | %install |
445 | rm -rf $RPM_BUILD_ROOT | |
2dcbef41 | 446 | install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \ |
2aaa3ce4 | 447 | $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_desktopdir}} \ |
4cd4742b | 448 | $RPM_BUILD_ROOT/var/{cache,lib,log,run}/mythtv \ |
8c0ea56f | 449 | $RPM_BUILD_ROOT%{_libdir}/mythtv \ |
450 | $RPM_BUILD_ROOT%{_libdir}/mythtv/plugins \ | |
451 | $RPM_BUILD_ROOT%{_pixmapsdir} | |
eceeddea ER |
452 | |
453 | %{__make} install \ | |
454 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
455 | ||
8c0ea56f | 456 | # required to build some plugins |
457 | # install libs/libavcodec/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \ | |
458 | # libs/libavformat/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv \ | |
459 | # libs/libavutil/*.h $RPM_BUILD_ROOT%{_includedir}/mythtv | |
460 | ||
8afae0cb | 461 | # Install the files that we added on top of mythtv's own stuff |
4cd4742b ER |
462 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend |
463 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend | |
2dcbef41 | 464 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/mythbackend |
8c0ea56f | 465 | %{?with_dshowserver:install %{SOURCE20} $RPM_BUILD_ROOT%{_datadir}/mythtv} |
4cd4742b ER |
466 | |
467 | # desktop entries | |
4cd4742b | 468 | install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir} |
8c0ea56f | 469 | install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir} |
8afae0cb ER |
470 | |
471 | # Install settings.pro so people can see the build options we used | |
68d88cbd ER |
472 | install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build |
473 | install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build | |
8afae0cb | 474 | |
96b717a5 ER |
475 | for p in mythfrontend; do |
476 | for l in $RPM_BUILD_ROOT%{_datadir}/mythtv/i18n/${p}_*.qm; do | |
477 | echo $l | sed -e "s,^$RPM_BUILD_ROOT\(.*${p}_\(.*\).qm\),%%lang(\2) \1," | |
478 | done > $p.lang | |
479 | done | |
480 | ||
481 | # glibc language codes. attempt was made to change it on libmyth side, | |
482 | # but that was just asking for trouble due large coverage of | |
483 | # language.lower() usage. | |
484 | sed -i -e ' | |
485 | s,%%lang(en_gb),%%lang(en_GB), | |
486 | s,%%lang(zh_tw),%%lang(zh_TW), | |
487 | s,%%lang(pt_br),%%lang(pt_BR), | |
488 | ' *.lang | |
489 | ||
490 | rm -rf mythtvosd mythwelcome mythlcdserver | |
99d50505 | 491 | install -d mythtvosd mythwelcome |
96b717a5 ER |
492 | cp -a programs/mythtvosd/{README,*.xml} mythtvosd |
493 | cp -a programs/mythwelcome/README mythwelcome | |
494 | cp -a programs/mythlcdserver/README mythlcdserver | |
495 | ||
8afae0cb ER |
496 | %clean |
497 | rm -rf $RPM_BUILD_ROOT | |
498 | ||
8c0ea56f | 499 | # Empty newline after %addusertogroup %{name} video below is intended. |
500 | # Do not remove it until rpm stop joining lines with that macro. | |
ed630fed | 501 | %pre backend |
5eccad13 | 502 | %groupadd -g 149 %{name} |
cb059bf8 ER |
503 | %useradd -u 149 -d /var/lib/mythtv -g %{name} -c "MythTV User" %{name} |
504 | %addusertogroup %{name} video | |
505 | %addusertogroup %{name} audio | |
506 | ||
507 | %post backend | |
68d88cbd | 508 | /sbin/chkconfig --add mythbackend |
cb059bf8 ER |
509 | |
510 | %preun backend | |
511 | if [ "$1" = "0" ]; then | |
512 | %service -q mythbackend stop | |
513 | /sbin/chkconfig --del mythbackend | |
514 | fi | |
8afae0cb | 515 | |
ed630fed | 516 | %postun backend |
a3eedc29 ER |
517 | if [ "$1" = "0" ]; then |
518 | %userremove %{name} | |
519 | %groupremove %{name} | |
520 | fi | |
8afae0cb | 521 | |
ed630fed JB |
522 | %post -n libmyth -p /sbin/ldconfig |
523 | %postun -n libmyth -p /sbin/ldconfig | |
524 | ||
6e738c98 | 525 | %post setup |
cb059bf8 | 526 | if [ "$1" = 1 ]; then |
6e738c98 ER |
527 | %banner -e %{name}-setup <<EOF |
528 | To grant mysql permissions to mythtv, please run | |
529 | zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql | |
530 | EOF | |
cb059bf8 | 531 | fi |
6e738c98 | 532 | |
8afae0cb | 533 | %files |
910a00e3 | 534 | %defattr(644,root,root,755) |
2b07fa66 | 535 | %doc README* UPGRADING AUTHORS FAQ |
8c0ea56f | 536 | %doc docs contrib config |
96b717a5 | 537 | %doc keys.txt mythtvosd mythwelcome mythlcdserver |
8afae0cb ER |
538 | |
539 | %files backend | |
910a00e3 | 540 | %defattr(644,root,root,755) |
96b717a5 ER |
541 | %attr(755,root,root) %{_sbindir}/mythbackend |
542 | %attr(755,root,root) %{_sbindir}/mythcommflag | |
8c0ea56f | 543 | %attr(755,root,root) %{_bindir}/mythfilldatabase |
96b717a5 ER |
544 | %attr(755,root,root) %{_sbindir}/mythjobqueue |
545 | %attr(755,root,root) %{_sbindir}/mythlcdserver | |
8c0ea56f | 546 | %attr(755,root,root) %{_bindir}/mythtranscode |
547 | %attr(755,root,root) %{_bindir}/mythreplex | |
cb059bf8 ER |
548 | %attr(775,root,mythtv) %dir /var/lib/mythtv |
549 | %attr(775,root,mythtv) %dir /var/cache/mythtv | |
550 | %attr(775,root,mythtv) %dir /var/run/mythtv | |
a3eedc29 | 551 | %attr(754,root,root) /etc/rc.d/init.d/mythbackend |
96b717a5 ER |
552 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mythbackend |
553 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/mythbackend | |
cb059bf8 | 554 | %attr(775,root,mythtv) %dir %{_localstatedir}/log/mythtv |
8afae0cb | 555 | |
96b717a5 | 556 | %files frontend -f mythfrontend.lang |
910a00e3 | 557 | %defattr(644,root,root,755) |
a3ec4ed6 | 558 | %attr(755,root,root) %{_bindir}/mythfrontend |
96b717a5 | 559 | %attr(755,root,root) %{_bindir}/mythshutdown |
2dea5de0 | 560 | %attr(755,root,root) %{_bindir}/mythavtest |
910a00e3 | 561 | %attr(755,root,root) %{_bindir}/mythtvosd |
96b717a5 ER |
562 | %attr(755,root,root) %{_bindir}/mythwelcome |
563 | %dir %{_datadir}/mythtv | |
bbba3c1d | 564 | %dir %{_datadir}/mythtv/themes |
96b717a5 ER |
565 | %dir %{_libdir}/mythtv |
566 | %{_datadir}/mythtv/*.xml | |
cb059bf8 ER |
567 | %dir %{_libdir}/mythtv/filters |
568 | %dir %{_libdir}/mythtv/plugins | |
569 | %attr(755,root,root) %{_libdir}/mythtv/filters/*.so | |
8afae0cb | 570 | %{_datadir}/mythtv/*.ttf |
96b717a5 | 571 | %dir %{_datadir}/mythtv/i18n |
8c0ea56f | 572 | %if %{with dshowserver} |
573 | %{_datadir}/mythtv/dshowcodecs | |
574 | %endif | |
2aaa3ce4 | 575 | %{_desktopdir}/*.desktop |
8c0ea56f | 576 | %{_pixmapsdir}/*.png |
8afae0cb | 577 | |
ed630fed JB |
578 | %files setup |
579 | %defattr(644,root,root,755) | |
6e738c98 | 580 | %doc database |
b9307635 | 581 | %attr(755,root,root) %{_bindir}/mythtv-setup |
ed630fed | 582 | |
8afae0cb | 583 | %files themes |
910a00e3 | 584 | %defattr(644,root,root,755) |
bbba3c1d | 585 | %{_datadir}/mythtv/themes/* |
8afae0cb ER |
586 | |
587 | %files -n libmyth | |
910a00e3 | 588 | %defattr(644,root,root,755) |
8c0ea56f | 589 | %attr(755,root,root) %{_libdir}/lib*.so* |
590 | %attr(755,root,root) %{_libdir}/lib*.a | |
591 | %{_datadir}/mythtv/*.pl | |
8afae0cb ER |
592 | |
593 | %files -n libmyth-devel | |
910a00e3 | 594 | %defattr(644,root,root,755) |
910a00e3 | 595 | %attr(755,root,root) %{_libdir}/*.so |
ed630fed | 596 | %{_includedir}/* |
68d88cbd | 597 | %{_datadir}/mythtv/build |
a7691716 ER |
598 | |
599 | %files -n libmyth-static | |
600 | %defattr(644,root,root,755) | |
3f7f03f8 | 601 | |
8c0ea56f | 602 | %files -n perl-MythTV |
603 | %defattr(644,root,root,755) | |
604 | %{perl_vendorlib}/MythTV.pm | |
605 | %dir %{perl_vendorlib}/MythTV | |
606 | %{perl_vendorlib}/MythTV/*.pm | |
607 | %{perl_vendorlib}/IO/Socket/INET/MythTV.pm | |
608 | %exclude %{perl_vendorarch}/auto/MythTV/.packlist | |
609 | ||
3f7f03f8 JK |
610 | %files -n python-MythTV |
611 | %defattr(644,root,root,755) | |
8c0ea56f | 612 | %dir %{py_sitescriptdir}/MythTV |
613 | # XXX: package .py[co] only | |
614 | %{py_sitescriptdir}/MythTV/* | |
3f7f03f8 | 615 | %{py_sitescriptdir}/*.egg-info |