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