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