]> git.pld-linux.org Git - packages/mythtv.git/blame - mythtv.spec
- add Conflicts:
[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?
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 58Summary: A personal video recorder (PVR) application
7456895a 59Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR)
910a00e3 60Name: mythtv
d464893c 61Version: 0.24.1
c8a7648a 62Release: 0.2
910a00e3 63License: GPL v2
b2c9e730 64Group: Applications/Multimedia
0a7925b8 65Source0: ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}.tar.bz2
d464893c 66# Source0-md5: 6870c679619ec58456e76839745411d8
eceeddea
ER
67Source1: mythbackend.sysconfig
68Source2: mythbackend.init
69Source3: mythbackend.logrotate
8c0ea56f 70Source5: pld-mythfrontend.desktop
0a7925b8 71# Source5-md5: f37a903ac97463683bebacdf29406951
8c0ea56f 72Source6: pld-mythfrontend.png
0a7925b8 73# Source6-md5: bf76bd1463a022e174e4af976a03e678
8c0ea56f 74Source20: dshowcodecs
0a7925b8 75# Source20-md5: 48327772b9e150f69e1ab8ff44b9a76c
8c0ea56f 76Patch0: %{name}-configure.patch
ebb9ae3c 77Patch10: %{name}-sbinpath.patch
78Patch20: %{name}-compile_fixes_for_qt_4_7.patch
79Patch30: %{name}-dshowserver-0.22.patch
b2c9e730 80URL: http://www.mythtv.org/
8c0ea56f 81BuildRequires: Mesa-libGLU-devel
c54e5d8a 82BuildRequires: OpenGL-devel
8c0ea56f 83BuildRequires: Qt3Support-devel
84BuildRequires: QtCore-devel
85BuildRequires: QtGui-devel
86BuildRequires: QtNetwork-devel
87BuildRequires: QtOpenGL-devel
88BuildRequires: QtScript-devel
89BuildRequires: QtSql-devel
90BuildRequires: QtWebKit-devel
91BuildRequires: QtXml-devel
ed630fed 92%{?with_alsa:BuildRequires: alsa-lib-devel}
8c0ea56f 93BuildRequires: ffmpeg-devel
ebb9ae3c 94%{?with_fftw3:BuildRequires: fftw3-devel,fftw3-single-devel}
c0517663 95BuildRequires: freetype-devel >= 1:2.0.0
cb059bf8 96%{?with_jack:BuildRequires: jack-audio-connection-kit-devel}
c0517663 97BuildRequires: lame-libs-devel
c0517663 98%{?with_firewire:BuildRequires: libavc1394-devel}
8c0ea56f 99BuildRequires: libdts-devel
96b717a5
ER
100%{?with_dvb:BuildRequires: libdvb-devel}
101BuildRequires: 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 105BuildRequires: linux-libc-headers >= 7:2.6.10
f3707f19 106%{?with_lirc:BuildRequires: lirc-devel}
ed630fed 107BuildRequires: mysql-devel
8c0ea56f 108BuildRequires: perl-devel
109BuildRequires: perl-tools-pod
2dea5de0 110BuildRequires: pkgconfig
96290eab 111%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
ebb9ae3c 112BuildRequires: python-devel
8c0ea56f 113BuildRequires: qt4-build
114BuildRequires: qt4-qmake
110bc2a9 115BuildRequires: rpm-perlprov >= 4.1-13
8c0ea56f 116BuildRequires: rpm-pythonprov
4cd4742b 117BuildRequires: rpmbuild(macros) >= 1.228
ed630fed 118BuildRequires: sed >= 4.0
b03eda83 119BuildRequires: which
ebb9ae3c 120%{?with_nvidia_headers:%{?with_vdpau:BuildRequires: xorg-driver-video-nvidia-devel}}
5df4c947 121BuildRequires: xorg-lib-libXext-devel
8c0ea56f 122%{?with_xvmc:BuildRequires: xorg-lib-libXvMC-devel}
ca754245 123BuildRequires: 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
127BuildRequires: perl-ExtUtils-MakeMaker
d80d4d61 128Conflicts: logrotate < 3.8.0
97b6efdd 129ExclusiveArch: %{ix86} %{x8664} ppc
910a00e3 130BuildRoot: %{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
140MythTV implements the following PVR features, and more, with a unified
141graphical 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
152MythTV implementuje następujące możliwości PVR, a nawet więcej, wraz z
ed630fed 153ujednoliconym 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
165Summary: Server component of mythtv (a PVR)
7456895a 166Summary(pl.UTF-8): Część serwerowa mythtv (PVR)
910a00e3 167Group: Applications/Multimedia
96b717a5
ER
168Requires(post,preun): /sbin/chkconfig
169Requires(postun): /usr/sbin/groupdel
170Requires(postun): /usr/sbin/userdel
ed630fed 171Requires(pre): /bin/id
f2f4277e 172Requires(pre): /usr/bin/getgid
ed630fed
JB
173Requires(pre): /usr/sbin/groupadd
174Requires(pre): /usr/sbin/useradd
96b717a5 175Requires: libmyth = %{version}-%{release}
ed630fed 176Requires: mythtv = %{version}-%{release}
2dea5de0 177Suggests: mysql
ed630fed 178Provides: group(mythtv)
96b717a5 179Provides: user(mythtv)
8afae0cb 180
ed630fed 181%description backend
910a00e3
ER
182MythTV provides a unified graphical interface for recording and
183viewing television programs. Refer to the mythtv package for more
184information.
8afae0cb 185
ed630fed
JB
186This package contains only the server software, which provides video
187and audio capture and encoding services. In order to be useful, it
188requires a mythtv-frontend installation, either on the same system or
189one reachable via the network.
190
17176342 191%description backend -l pl.UTF-8
ed630fed 192MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
17176342 193oglądania programów telewizyjnych. Więcej informacji w pakiecie
ed630fed
JB
194mythtv.
195
17176342
JR
196Ten pakiet zawiera tylko oprogramowanie serwerowe, udostępniające
197usługi przechwytywania i kodowania obrazu i dźwięku. Aby było
ed630fed 198przydatne, wymaga instalacji mythtv-frontend - na tym samym systemie,
2af19960 199albo innym osiągalnym w sieci.
8afae0cb
ER
200
201%package frontend
ed630fed 202Summary: Client component of mythtv (a PVR)
7456895a 203Summary(pl.UTF-8): Część kliencka mythtv (PVR)
910a00e3 204Group: Applications/Multimedia
96b717a5 205Requires: libmyth = %{version}-%{release}
910a00e3
ER
206Requires: mythtv = %{version}-%{release}
207Requires: mythtv-themes = %{version}-%{release}
96b717a5 208Provides: mythtv-frontend-api = %{myth_api_version}
8afae0cb
ER
209
210%description frontend
910a00e3
ER
211MythTV provides a unified graphical interface for recording and
212viewing television programs. Refer to the mythtv package for more
213information.
8afae0cb
ER
214
215This package contains only the client software, which provides a
910a00e3 216front-end for playback and configuration. It requires access to a
8afae0cb
ER
217mythtv-backend installation, either on the same system or one
218reachable via the network.
219
17176342 220%description frontend -l pl.UTF-8
ed630fed 221MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
17176342 222oglądania programów telewizyjnych. Więcej informacji w pakiecie
ed630fed 223mythtv.
8afae0cb 224
17176342
JR
225Ten pakiet zawiera tylko oprogramowanie klienckie, dostarczające
226frontend do odtwarzania i konfiguracji. Wymaga dostępu do instalacji
ebb9ae3c 227mythtv-backend - na tym samym systemie, albo innym osiągalnym w sieci.
8afae0cb
ER
228
229%package setup
ed630fed 230Summary: Setup the mythtv backend
7456895a 231Summary(pl.UTF-8): Konfigurator backendu mythtv
910a00e3 232Group: Applications/Multimedia
96b717a5 233Requires: libmyth = %{version}-%{release}
8afae0cb
ER
234
235%description setup
910a00e3
ER
236MythTV provides a unified graphical interface for recording and
237viewing television programs. Refer to the mythtv package for more
238information.
8afae0cb
ER
239
240This package contains only the setup software for configuring the
241mythtv backend.
242
17176342 243%description setup -l pl.UTF-8
ed630fed 244MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
17176342 245oglądania programów telewizyjnych. Więcej informacji w pakiecie
ed630fed
JB
246mythtv.
247
248Ten pakiet zawiera tylko program do konfigurowania backendu mythtv.
249
250%package themes
251Summary: Base themes for mythtv's frontend
7456895a 252Summary(pl.UTF-8): Podstawowe motywy dla frontendu mythtv
bbba3c1d 253Group: Themes
8c0ea56f 254Requires: %{name}-frontend = %{version}-%{release}
ed630fed
JB
255
256%description themes
257MythTV provides a unified graphical interface for recording and
258viewing television programs. Refer to the mythtv package for more
259information.
260
261This package contains only the base themes used by the frontend and
262mythtvsetup.
263
17176342 264%description themes -l pl.UTF-8
ed630fed 265MythTV dostarcza ujednolicony interfejs graficzny do nagrywania i
17176342 266oglądania programów telewizyjnych. Więcej informacji w pakiecie
ed630fed
JB
267mythtv.
268
17176342 269Ten pakiet zawiera tylko podstawowe motywy używane przez frontend oraz
ed630fed
JB
270mythtvsetup.
271
272%package -n libmyth
273Summary: Library providing mythtv support
7456895a 274Summary(pl.UTF-8): Biblioteka udostępniająca obsługę mythtv
ed630fed 275Group: Libraries
8c0ea56f 276Requires: QtSql-mysql
ed630fed
JB
277Requires: freetype >= 1:2.0.0
278Requires: lame
ed630fed
JB
279
280%description -n libmyth
281Common library code for MythTV and add-on modules (development) MythTV
282provides a unified graphical interface for recording and viewing
283television programs. Refer to the mythtv package for more information.
284
17176342
JR
285%description -n libmyth -l pl.UTF-8
286Wspólny kod biblioteki dla MythTV i dodatkowych modułów MythTV
287dostarczający ujednolicony interfejs graficzny do nagrywania i
288oglądania programów telewizyjnych. Więcej informacji w pakiecie
ed630fed
JB
289mythtv.
290
291%package -n libmyth-devel
292Summary: Development files for libmyth
7456895a 293Summary(pl.UTF-8): Pliki nagłówkowe libmyth
ed630fed
JB
294Group: Development/Libraries
295Requires: libmyth = %{version}-%{release}
ed630fed
JB
296
297%description -n libmyth-devel
298This package contains the header files for developing add-ons for
299mythtv.
300
17176342
JR
301%description -n libmyth-devel -l pl.UTF-8
302Ten pakiet zawiera pliki nagłówkowe do tworzenia dodatków dla mythtv.
ed630fed
JB
303
304%package -n libmyth-static
305Summary: Static libmyth library
7456895a 306Summary(pl.UTF-8): Statyczna biblioteka libmyth
ed630fed
JB
307Group: Development/Libraries
308Requires: libmyth-devel = %{version}-%{release}
309
310%description -n libmyth-static
311Static libmyth library.
312
17176342 313%description -n libmyth-static -l pl.UTF-8
ed630fed
JB
314Statyczna biblioteka libmyth.
315
8c0ea56f 316%package -n perl-MythTV
317Summary: MythTV Perl bindings
318Summary(pl.UTF-8): Interfejs Perla dla MythTV
319Group: Libraries
320
321%description -n perl-MythTV
322MythTV Perl bindings.
323
324%description -n perl-MythTV -l pl.UTF-8
325Ten pakiet zawiera moduły Perla do tworzenia dodatków dla mythtv.
326
3f7f03f8
JK
327%package -n python-MythTV
328Summary: MythTV Python bindings
8c0ea56f 329Summary(pl.UTF-8): Interfejs Pythona dla MythTV
330Group: Libraries
2af19960 331Requires: python-MySQLdb
3f7f03f8
JK
332
333%description -n python-MythTV
8c0ea56f 334MythTV Python bindings.
3f7f03f8
JK
335
336%description -n python-MythTV -l pl.UTF-8
337Ten 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
351rm -rf database/old # not supported in PLD
352
96b717a5
ER
353# lib64 fix - enable to update patch
354%if %{_lib} != "lib" && 0
355find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
356xargs 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'
361exit 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.
371cat > qmake-wrapper.sh <<'EOF'
372#!/bin/sh
373getmakefile() {
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 386qmake-qt4 "$@"
3c3d6f2b
ER
387getmakefile "$@"
388if [ "$makefile" ]; then
389 %{__sed} -i -e '
390 s;-Wl,-rpath,$(QTDIR)/%{_lib};;
391 s;-L$(QTDIR)/%{_lib};;
392 ' $makefile
393fi
394EOF
395chmod +x qmake-wrapper.sh
396
8c0ea56f 397# move perl bindings to vendor prefix
398sed -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
405if [ ! -r /proc/cpuinfo ]; then
406 echo "You need to have /proc mounted in order to build with cpu_autodetect!"
407 exit 1
408fi
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
461rm -rf $RPM_BUILD_ROOT
2dcbef41 462install -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
474install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mythbackend
475cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mythbackend
476cp -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 480install %{SOURCE5} $RPM_BUILD_ROOT%{_desktopdir}
8c0ea56f 481install %{SOURCE6} $RPM_BUILD_ROOT%{_pixmapsdir}
8afae0cb
ER
482
483# Install settings.pro so people can see the build options we used
68d88cbd
ER
484install -d $RPM_BUILD_ROOT%{_datadir}/mythtv/build
485install config.mak settings.pro $RPM_BUILD_ROOT%{_datadir}/mythtv/build
8afae0cb 486
96b717a5
ER
487for 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
491done
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.
496sed -i -e '
497s,%%lang(en_gb),%%lang(en_GB),
498s,%%lang(zh_tw),%%lang(zh_TW),
499s,%%lang(pt_br),%%lang(pt_BR),
500' *.lang
501
502rm -rf mythtvosd mythwelcome mythlcdserver
99d50505 503install -d mythtvosd mythwelcome
96b717a5
ER
504cp -a programs/mythtvosd/{README,*.xml} mythtvosd
505cp -a programs/mythwelcome/README mythwelcome
506cp -a programs/mythlcdserver/README mythlcdserver
507
8afae0cb
ER
508%clean
509rm -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
521if [ "$1" = "0" ]; then
522 %service -q mythbackend stop
523 /sbin/chkconfig --del mythbackend
524fi
8afae0cb 525
ed630fed 526%postun backend
a3eedc29
ER
527if [ "$1" = "0" ]; then
528 %userremove %{name}
529 %groupremove %{name}
530fi
8afae0cb 531
ed630fed
JB
532%post -n libmyth -p /sbin/ldconfig
533%postun -n libmyth -p /sbin/ldconfig
534
6e738c98 535%post setup
cb059bf8 536if [ "$1" = 1 ]; then
6e738c98
ER
537%banner -e %{name}-setup <<EOF
538To grant mysql permissions to mythtv, please run
539zcat %{_docdir}/%{name}-setup-%{version}/database/mc.sql.gz | mysql
540EOF
cb059bf8 541fi
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
This page took 0.164068 seconds and 4 git commands to generate.