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