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