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