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