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