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