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