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