-
Notifications
You must be signed in to change notification settings - Fork 65
/
mythtv.spec
1765 lines (1453 loc) · 55.6 KB
/
mythtv.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# Specfile for building MythTV and MythPlugins RPMs from a git checkout.
#
# by: Chris Petersen <cpetersen@mythtv.org>
# Jarod Wilson <jwilson@mythtv.org>
#
# Modified/Extended from the great (non-git/svn based) work of:
# Axel Thimm <Axel.Thimm@ATrpms.net>
# David Bussenschutt <buzz@oska.com>
# and others; see changelog at bottom for details.
#
# The latest canonical upstream version of this file can be found at:
#
# https://github.com/MythTV/packaging/tree/master/rpm
#
# The latest RPM Fusion version can be found at:
#
# http://cvs.rpmfusion.org/viewvc/rpms/mythtv/devel/?root=free
#
# Note:
#
# This spec relies upon several files included in the RPM Fusion mythtv
# src.rpm file. Please install it into your build tree before trying to
# build anything with this spec.
#
# Explanation of options:
#
# --with proc_opt Enable MythTV's optimized processor detection code
# and override RPM's defaults.
# --with debug Enable debug mode
#
# The following options are disabled by default. Use these options to enable:
#
# --with systemd Use systemd for backend rather than SysV init.
#
# The following options are enabled by default. Use these options to disable:
#
# --without vdpau Disable VDPAU support
# --without vaapi Disable VAAPI support
# --without crystalhd Disable Crystal HD support
# --without perl Disable building of the perl bindings
# --without php Disable building of the php bindings
# --without python Disable building of the python bindings
#
# # All plugins get built by default, but you can disable them as you wish:
#
# --without mytharchive
# --without mythbrowser
# --without mythgallery
# --without mythgame
# --without mythmusic
# --without mythnetvision
# --without mythnews
# --without mythweather
# --without mythzoneminder
#
################################################################################
# A list of which applications we want to put into the desktop menu system
%define desktop_applications mythfrontend mythtv-setup
# The vendor name we should attribute the aforementioned entries to
%define desktop_vendor mythtv
# MythTV Version string -- preferably the output from git --describe
%define vers_string v0.25pre-4799-g7b526c4
# Git Revision number and branch
%define _gitrev 4799.g7b526c4
%define branch master
#
# Basic descriptive tags for this package:
#
Name: mythtv
Summary: A digital video recorder (DVR) application
URL: http://www.mythtv.org/
Group: Applications/Multimedia
# Version/Release info
Version: 0.25
%if "%{branch}" == "master"
Release: 0.1.git.%{_gitrev}%{?dist}
%else
Release: 1%{?dist}
%endif
# The primary license is GPLv2+, but bits are borrowed from a number of
# projects... For a breakdown of the licensing, see PACKAGE-LICENSING.
License: GPLv2+ and LGPLv2+ and LGPLv2 and (GPLv2 or QPL) and (GPLv2+ or LGPLv2+)
################################################################################
# Set "--with proc_opt" to let mythtv autodetect your CPU and run its
# processor-specific optimizations. It seems to cause compile problems on many
# systems (particularly x86_64), so it is classified by the MythTV developers
# as "use at your own risk."
%define with_proc_opt %{?_with_proc_opt: 1} %{!?_with_proc_opt: 0}
# Set "--with debug" to enable MythTV debug compile mode
%define with_debug %{?_with_debug: 1} %{?!_with_debug: 0}
# Use SysV init script by default but allow use of SystemD service.
%define with_systemd %{?_with_systemd: 1} %{?!_without_systemd: 0}
# The following options are enabled by default. Use --without to disable them
%define with_vdpau %{?_without_vdpau: 0} %{?!_without_vdpau: 1}
%define with_vaapi %{?_without_vaapi: 0} %{?!_without_vaapi: 1}
%define with_crystalhd %{?_without_crystalhd: 0} %{?!_without_crystalhd: 1}
%define with_xvmc %{?_without_xvmc: 0} %{?!_without_xvmc: 1}
%define with_perl %{?_without_perl: 0} %{!?_without_perl: 1}
%define with_php %{?_without_php: 0} %{!?_without_php: 1}
%define with_python %{?_without_python: 0} %{!?_without_python: 1}
%define with_pulseaudio %{?_without_pulseaudio: 0} %{!?_without_pulseaudio: 1}
# All plugins get built by default, but you can disable them as you wish
%define with_plugins %{?_without_plugins: 0} %{!?_without_plugins: 1}
%define with_mytharchive %{?_without_mytharchive: 0} %{!?_without_mytharchive: 1}
%define with_mythbrowser %{?_without_mythbrowser: 0} %{!?_without_mythbrowser: 1}
%define with_mythgallery %{?_without_mythgallery: 0} %{!?_without_mythgallery: 1}
%define with_mythgame %{?_without_mythgame: 0} %{!?_without_mythgame: 1}
%define with_mythmusic %{?_without_mythmusic: 0} %{!?_without_mythmusic: 1}
%define with_mythnews %{?_without_mythnews: 0} %{!?_without_mythnews: 1}
%define with_mythweather %{?_without_mythweather: 0} %{!?_without_mythweather: 1}
%define with_mythzoneminder %{?_without_mythzoneminder: 0} %{!?_without_mythzoneminder: 1}
%define with_mythnetvision %{?_without_mythnetvision: 0} %{!?_without_mythnetvision: 1}
################################################################################
Source0: http://www.mythtv.org/mc/mythtv-%{version}.tar.bz2
Source1: http://www.mythtv.org/mc/mythplugins-%{version}.tar.bz2
Source10: PACKAGE-LICENSING
Source101: mythbackend.sysconfig
Source102: mythbackend.init
Source103: mythbackend.logrotate
Source104: mythbackend.service
Source106: mythfrontend.png
Source107: mythfrontend.desktop
Source108: mythtv-setup.png
Source109: mythtv-setup.desktop
Source110: mysql.txt
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
################################################################################
# Python setup
%if %{with_python}
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_version: %define python_version %(%{__python} -c 'import sys; print sys.version.split(" ")[0]')}
%endif
################################################################################
# Global MythTV and Shared Build Requirements
%if %{with_systemd}
# Use systemd
BuildRequires: systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%else
# Use SysV
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
Requires(postun): initscripts
%endif
BuildRequires: desktop-file-utils
BuildRequires: freetype-devel >= 2
BuildRequires: gcc-c++
BuildRequires: mysql-devel >= 5
BuildRequires: qt-webkit-devel
BuildRequires: qt-devel >= 4.5
BuildRequires: phonon-devel
BuildRequires: lm_sensors-devel
BuildRequires: lirc-devel
BuildRequires: nasm, yasm-devel
# X, and Xv video support
BuildRequires: libXmu-devel
BuildRequires: libXv-devel
BuildRequires: libXvMC-devel
BuildRequires: libXxf86vm-devel
BuildRequires: mesa-libGLU-devel
BuildRequires: xorg-x11-proto-devel
%ifarch %{ix86} x86_64
BuildRequires: xorg-x11-drv-intel-devel
BuildRequires: xorg-x11-drv-openchrome-devel
%endif
# OpenGL video output and vsync support
BuildRequires: libGL-devel, libGLU-devel
# Misc A/V format support
BuildRequires: fftw-devel >= 3
BuildRequires: flac-devel >= 1.0.4
BuildRequires: gsm-devel
BuildRequires: lame-devel
BuildRequires: libdca-devel
BuildRequires: libdvdnav-devel
BuildRequires: libdvdread-devel >= 0.9.4
# nb: libdvdcss will be dynamically loaded if installed
BuildRequires: libfame-devel >= 0.9.0
BuildRequires: libogg-devel
BuildRequires: libtheora-devel
BuildRequires: libvorbis-devel >= 1.0
BuildRequires: mjpegtools-devel >= 1.6.1
BuildRequires: taglib-devel >= 1.5
BuildRequires: x264-devel
BuildRequires: xvidcore-devel >= 0.9.1
# Audio framework support
BuildRequires: alsa-lib-devel
BuildRequires: arts-devel
BuildRequires: jack-audio-connection-kit-devel
%if %{with_pulseaudio}
BuildRequires: pulseaudio-libs-devel
%endif
# Video support, formerly MythVideo
Requires: perl(XML::Simple)
# Perl Bindings
Requires: perl(IO::Socket::INET6)
BuildRequires: perl(IO::Socket::INET6)
# Need dvb headers to build in dvb support
BuildRequires: kernel-headers
# FireWire cable box support
BuildRequires: libavc1394-devel
BuildRequires: libiec61883-devel
BuildRequires: libraw1394-devel
%if %{with_vdpau}
BuildRequires: libvdpau-devel
%endif
%if %{with_vaapi}
BuildRequires: libva-devel
%endif
%if %{with_crystalhd}
BuildRequires: libcrystalhd-devel
%endif
# API Build Requirements
%if %{with_perl}
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Config)
BuildRequires: perl(Exporter)
BuildRequires: perl(Fcntl)
BuildRequires: perl(File::Copy)
BuildRequires: perl(Sys::Hostname)
BuildRequires: perl(DBI)
BuildRequires: perl(HTTP::Request)
BuildRequires: perl(Net::UPnP::QueryResponse)
BuildRequires: perl(Net::UPnP::ControlPoint)
%endif
%if %{with_php}
%endif
%if %{with_python}
BuildRequires: python-devel
BuildRequires: MySQL-python
%endif
# Plugin Build Requirements
%if %{with_plugins}
%if %{with_mythgallery}
BuildRequires: libexif-devel >= 0.6.9
%endif
%if %{with_mythgame}
BuildRequires: zlib-devel
%endif
%if %{with_mythmusic}
BuildRequires: libcdaudio-devel >= 0.99.6
BuildRequires: cdparanoia-devel
%endif
%if %{with_mythnews}
%endif
BuildRequires: ncurses-devel
%if %{with_mythweather}
Requires: mythweather >= %{version}
BuildRequires: perl(XML::Simple)
Requires: perl(XML::Simple)
Requires: perl(LWP::Simple)
BuildRequires: perl(DateTime::Format::ISO8601)
Requires: perl(DateTime::Format::ISO8601)
BuildRequires: perl(XML::XPath)
Requires: perl(XML::XPath)
BuildRequires: perl(Date::Manip)
Requires: perl(Date::Manip)
BuildRequires: perl(Image::Size)
Requires: perl(Image::Size)
BuildRequires: perl(SOAP::Lite)
Requires: perl(SOAP::Lite)
BuildRequires: perl(JSON)
Requires: perl(JSON)
%endif
%if %{with_mythzoneminder}
%endif
%if %{with_mythnetvision}
BuildRequires: python-pycurl
BuildRequires: python-lxml
BuildRequires: python-oauth
%endif
%endif
################################################################################
# Requirements for the mythtv meta package
Requires: mythtv-libs = %{version}-%{release}
Requires: mythtv-backend = %{version}-%{release}
Requires: mythtv-base-themes = %{version}-%{release}
Requires: mythtv-common = %{version}-%{release}
Requires: mythtv-docs = %{version}-%{release}
Requires: mythtv-frontend = %{version}-%{release}
Requires: mythtv-setup = %{version}-%{release}
Requires: perl-MythTV = %{version}-%{release}
Requires: php-MythTV = %{version}-%{release}
Requires: python-MythTV = %{version}-%{release}
Requires: mythplugins = %{version}-%{release}
Requires: mythtv-themes = %{version}
Requires: mysql-server >= 5, mysql >= 5
# XMLTV is not yet packaged for rpmfusion
#Requires: xmltv
# Generate the required mythtv-frontend-api version string here so we only
# have to do it once.
%define mythfeapiver %(echo %{version} | awk -F. '{print $1 "." $2}')
################################################################################
%description
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
There are also several add-ons and themes available. In order to facilitate
installations with smart/apt-get/yum and other related package
resolvers this meta-package can be used to install all in one sweep.
MythTV implements the following DVR features, and more, with a
unified graphical interface:
- Basic 'live-tv' functionality. Pause/Fast Forward/Rewind "live" TV.
- Video compression using RTjpeg or MPEG-4, and support for DVB and
hardware encoder cards/devices.
- Program listing retrieval using XMLTV
- Themable, semi-transparent on-screen display
- Electronic program guide
- Scheduled recording of TV programs
- Resolution of conflicts between scheduled recordings
- Basic video editing
################################################################################
%package docs
Summary: MythTV documentation
Group: Documentation
%description docs
The MythTV documentation, contrib files, database initialization file
and miscellaneous other bits and pieces.
################################################################################
%package libs
Summary: Library providing mythtv support
Group: System Environment/Libraries
Provides: libmyth = %{version}-%{release}
Obsoletes: libmyth < %{version}-%{release}
Requires: freetype >= 2
Requires: lame
Requires: qt4 >= 4.5
Requires: qt4-MySQL
%description libs
Common library code for MythTV and add-on modules (development)
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
################################################################################
%package devel
Summary: Development files for mythtv
Group: Development/Libraries
Provides: libmyth-devel = %{version}-%{release}
Obsoletes: libmyth-devel < %{version}-%{release}
Requires: mythtv-libs = %{version}-%{release}
Requires: freetype-devel >= 2
Requires: mysql-devel >= 5
Requires: qt4-devel >= 4.5
Requires: lm_sensors-devel
Requires: lirc-devel
# X, and Xv video support
Requires: libXmu-devel
Requires: libXv-devel
Requires: libXvMC-devel
Requires: libXxf86vm-devel
Requires: mesa-libGLU-devel
Requires: xorg-x11-proto-devel
%ifarch %{ix86} x86_64
Requires: xorg-x11-drv-i810-devel
Requires: xorg-x11-drv-openchrome-devel
%endif
# OpenGL video output and vsync support
Requires: libGL-devel, libGLU-devel
# Misc A/V format support
Requires: fftw-devel >= 3
Requires: flac-devel >= 1.0.4
Requires: gsm-devel
Requires: lame-devel
Requires: libdca-devel
Requires: libdvdnav-devel
Requires: libdvdread-devel >= 0.9.4
Requires: libfame-devel >= 0.9.0
Requires: libogg-devel
Requires: libtheora-devel
Requires: libvorbis-devel >= 1.0
Requires: mjpegtools-devel >= 1.6.1
Requires: taglib-devel >= 1.5
Requires: x264-devel
Requires: xvidcore-devel >= 0.9.1
# Audio framework support
Requires: alsa-lib-devel
Requires: arts-devel
Requires: jack-audio-connection-kit-devel
%if %{with_pulseaudio}
Requires: pulseaudio-libs-devel
%endif
# Need dvb headers for dvb support
Requires: kernel-headers
# FireWire cable box support
Requires: libavc1394-devel
Requires: libiec61883-devel
Requires: libraw1394-devel
%if %{with_vdpau}
Requires: libvdpau-devel
%endif
%if %{with_vaapi}
Requires: libva-devel
%endif
%if %{with_crystalhd}
Requires: libcrystalhd-devel
%endif
%description devel
This package contains the header files and libraries for developing
add-ons for mythtv.
################################################################################
%package base-themes
Summary: Core user interface themes for mythtv
Group: Applications/Multimedia
# Replace an old ATRMS package
Provides: mythtv-theme-gant
Obsoletes: mythtv-theme-gant
%description base-themes
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv-docs package for more information.
This package contains the base themes for the mythtv user interface.
################################################################################
%package frontend
Summary: Client component of mythtv (a DVR)
Group: Applications/Multimedia
Requires: freetype, lame
Requires: mythtv-common = %{version}-%{release}
Requires: mythtv-base-themes = %{version}
Provides: mythtv-frontend-api = %{mythfeapiver}
Requires: mplayer
Requires: python-imdb
Requires: python-MythTV = %{version}-%{release}
Obsoletes: mythcontrols
Obsoletes: mythvideo
Obsoletes: mythdvd
%description frontend
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
This package contains only the client software, which provides a
front-end for playback and configuration. It requires access to a
mythtv-backend installation, either on the same system or one
reachable via the network.
################################################################################
%package backend
Summary: Server component of mythtv (a DVR)
Group: Applications/Multimedia
Requires: lame
Requires: mythtv-common = %{version}-%{release}
Requires: wget
Conflicts: xmltv-grabbers < 0.5.37
%description backend
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
This package contains only the server software, which provides video
and audio capture and encoding services. In order to be useful, it
requires a mythtv-frontend installation, either on the same system or
one reachable via the network.
################################################################################
%package setup
Summary: Setup the mythtv backend
Group: Applications/Multimedia
Requires: freetype
Requires: mythtv-backend = %{version}-%{release}
Requires: mythtv-base-themes = %{version}
Requires: wget
%description setup
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
This package contains only the setup software for configuring the
mythtv backend.
################################################################################
%package common
Summary: Common components needed by multiple other MythTV components
Group: Applications/Multimedia
# mythphone is now DOA, but we need this for upgrade path preservation.
Provides: mythphone = %{version}-%{release}
Obsoletes: mythphone < %{version}-%{release}
# same deal for mythflix
Provides: mythflix = %{version}-%{release}
Obsoletes: mythflix < %{version}-%{release}
%description common
MythTV provides a unified graphical interface for recording and viewing
television programs. Refer to the mythtv package for more information.
This package contains components needed by multiple other MythTV components.
################################################################################
%package -n mythffmpeg
Summary: MythTV build of FFmpeg
Group: Applications/Multimedia
%description -n mythffmpeg
Several MythTV utilities interact with FFmpeg, which changes its parameters
often enough to make it a hassle to support the variety of versions used by
MythTV users. This is a snapshot of the FFmpeg code so that MythTV utilities
can interact with a known verion.
################################################################################
%if %{with_perl}
%package -n perl-MythTV
Summary: Perl bindings for MythTV
Group: Development/Languages
# Wish we could do this:
#BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(DBD::mysql)
Requires: perl(Net::UPnP)
Requires: perl(Net::UPnP::ControlPoint)
%description -n perl-MythTV
Provides a perl-based interface to interacting with MythTV.
%endif
################################################################################
%if %{with_php}
%package -n php-MythTV
Summary: PHP bindings for MythTV
Group: Development/Languages
# Wish we could do this:
#BuildArch: noarch
%description -n php-MythTV
Provides a PHP-based interface to interacting with MythTV.
%endif
################################################################################
%if %{with_python}
%package -n python-MythTV
Summary: Python bindings for MythTV
Group: Development/Languages
# Wish we could do this:
#BuildArch: noarch
Requires: MySQL-python
%description -n python-MythTV
Provides a python-based interface to interacting with MythTV.
%endif
################################################################################
%if %{with_plugins}
# Meta package for all mythtv plugins
%package -n mythplugins
Summary: Main MythTV plugins
Group: Applications/Multimedia
Requires: mythmusic = %{version}-%{release}
Requires: mythweather = %{version}-%{release}
Requires: mythgallery = %{version}-%{release}
Requires: mythgame = %{version}-%{release}
Requires: mythnews = %{version}-%{release}
Requires: mythbrowser = %{version}-%{release}
Requires: mytharchive = %{version}-%{release}
Requires: mythzoneminder = %{version}-%{release}
Requires: mythnetvision = %{version}-%{release}
%description -n mythplugins
This is a consolidation of all the official MythTV plugins that used to be
distributed as separate downloads from mythtv.org.
################################################################################
%if %{with_mytharchive}
%package -n mytharchive
Summary: A module for MythTV for creating and burning DVDs
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
Requires: MySQL-python
Requires: cdrecord >= 2.01
Requires: dvd+rw-tools >= 5.21.4.10.8
Requires: dvdauthor >= 0.6.11
Requires: ffmpeg >= 0.4.9
Requires: mjpegtools >= 1.6.2
Requires: mkisofs >= 2.01
Requires: python >= 2.3.5
Requires: python-imaging
%description -n mytharchive
MythArchive is a new plugin for MythTV that lets you create DVDs from
your recorded shows, video files and any video files available on
your system.
%endif
################################################################################
%if %{with_mythbrowser}
%package -n mythbrowser
Summary: A small web browser module for MythTV
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
%description -n mythbrowser
MythBrowser is a full fledged web-browser (multiple tabs) to display
webpages in full-screen mode. Simple page navigation is possible.
Starting with version 0.13 it also has full support for mouse driven
navigation (right mouse opens and clos es the popup menu).
MythBrowser also contains a BookmarkManager to manage the website
links in a simple mythplugin.
%endif
################################################################################
%if %{with_mythgallery}
%package -n mythgallery
Summary: A gallery/slideshow module for MythTV
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
%description -n mythgallery
A gallery/slideshow module for MythTV.
%endif
################################################################################
%if %{with_mythgame}
%package -n mythgame
Summary: A game frontend (xmame, nes, snes, pc) for MythTV
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
%description -n mythgame
A game frontend (xmame, nes, snes, pc) for MythTV.
################################################################################
#package -n mythgame-emulators
#Summary: Meta-package requiring emulators for game types mythgame knows about
#Group: Applications/Multimedia
#Requires: mythgame = %{version}-%{release}
# Multi Arcade Machine Emulator, Amiga, Atari 2600
#Requires: sdlmame
#Requires: e-uae
#Requires: stella
# Nintendo, Super Nintendo, Nintendo 64
#Requires: fceultra
#Requires: zsnes
#Requires: mupen64, mupen64-ricevideo
# Sega Genesis, Sega Master System, Game Gear
#Requires: gens
#Requires: dega-sdl
#Requires: osmose
# TurboGraphx 16 (and others)
#Requires: mednafen
#description -n mythgame-emulators
#Meta-package requiring emulators for game types mythgame knows about.
%endif
################################################################################
%if %{with_mythmusic}
%package -n mythmusic
Summary: The music player add-on module for MythTV
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
%description -n mythmusic
Music add-on for mythtv.
%endif
################################################################################
%if %{with_mythnews}
%package -n mythnews
Summary: An RSS news feed plugin for MythTV
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
%description -n mythnews
An RSS news feed reader plugin for MythTV.
%endif
################################################################################
%if %{with_mythweather}
%package -n mythweather
Summary: A MythTV module that displays a weather forecast
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
Requires: perl(XML::SAX::Base)
%description -n mythweather
A MythTV module that displays a weather forecast.
%endif
################################################################################
%if %{with_mythzoneminder}
%package -n mythzoneminder
Summary: A module for MythTV for camera security and surveillance
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
%description -n mythzoneminder
MythZoneMinder is a plugin to interface to some of the features of
ZoneMinder. You can use it to view a status window similar to the
console window in ZM. Also there are screens to view live camera shots
and replay recorded events.
%endif
################################################################################
%if %{with_mythnetvision}
%package -n mythnetvision
Summary: A MythTV module for Internet video on demand
Group: Applications/Multimedia
Requires: mythtv-frontend-api = %{mythfeapiver}
Requires: mythbrowser = %{version}-%{release}
Requires: python-MythTV = %{version}-%{release}
Requires: python-pycurl
Requires: python >= 2.5
# This is packaged in adobe's yum repo
Requires: flash-plugin
%description -n mythnetvision
A MythTV module that supports searching and browsing of Internet video
on demand content.
%endif
################################################################################
# End of plugins
%endif
################################################################################
%prep
%setup -q -c -a 1
# Replace static lib paths with %{_lib} so we build properly on x86_64
# systems, where the libs are actually in lib64.
if [ "%{_lib}" != "lib" ]; then
grep -rlZ '/lib/' . | xargs -r0 sed -i -e 's,/lib/,/%{_lib}/,g'
grep -rlZ '/lib$' . | xargs -r0 sed -i -e 's,/lib$,/%{_lib},'
grep -rlZ '/lib ' . | xargs -r0 sed -i -e 's,/lib ,/%{_lib} ,g'
fi
##### MythTV
cd mythtv
# Set the mythtv --version string
cat > VERSION <<EOF
SOURCE_VERSION=%{vers_string}
BRANCH=%{branch}
EOF
# Drop execute permissions on contrib bits, since they'll be %doc
find contrib/ -type f -exec chmod -x "{}" \;
# And drop execute bit on theme html files
chmod -x themes/default/htmls/*.html
# Nuke Windows and Mac OS X build scripts
rm -rf contrib/Win32 contrib/OSX
# Put perl bits in the right place and set opt flags
sed -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"#' \
bindings/perl/Makefile
# Install other source files
cp -a %{SOURCE10} %{SOURCE101} %{SOURCE102} %{SOURCE103} .
cp -a %{SOURCE106} %{SOURCE107} %{SOURCE108} %{SOURCE109} .
# Prevent all of those nasty installs to ../../../../../bin/whatever
# echo "QMAKE_PROJECT_DEPTH = 0" >> mythtv.pro
# echo "QMAKE_PROJECT_DEPTH = 0" >> settings.pro
# chmod 644 settings.pro
# We also need Xv libs to build XvMCNVIDIA
sed -i -e 's,VENDOR_XVMC_LIBS="-lXvMCNVIDIA",VENDOR_XVMC_LIBS="-lXvMCNVIDIA -lXv",' configure
# Fix the default video directory so it points to something more standard
sed -i -e 's,/share/Movies/dvd,%{_localstatedir}/lib/mythtv/dvd,' libs/libmythmetadata/globals.cpp
# Add execute bits to the various python helper scripts
find programs/scripts/metadata -name '*.py' -exec chmod +x "{}" \;
# Fix /mnt/store -> /var/lib/mythtv
sed -i -e's,/mnt/store,%{_localstatedir}/lib/mythtv,' libs/libmythbase/storagegroup.cpp
# On to mythplugins
cd ..
##### MythPlugins
#%if %{with_plugins}
#
#cd mythplugins
#
## And back to the compile root
#cd ..
#
#%endif
################################################################################
%build
# First, we build MythTV
cd mythtv
# Similar to 'percent' configure, but without {_target_platform} and
# {_exec_prefix} etc... MythTV no longer accepts the parameters that the
# configure macro passes, so we do this manually.
./configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libdir-name=%{_lib} \
--mandir=%{_mandir} \
--enable-iptv \
--enable-pthreads \
--enable-ffmpeg-pthreads \
--enable-joystick-menu \
--enable-audio-alsa \
--enable-audio-oss \
--enable-audio-jack \
--enable-libfftw3 \
--enable-x11 --x11-path=%{_includedir} \
--enable-xv \
--enable-opengl-video \
--enable-xrandr \
--enable-lirc \
--enable-ivtv \
--enable-firewire \
--enable-dvb \
--enable-libmp3lame \
--enable-libtheora --enable-libvorbis \
--enable-libxvid \
%if %{with_vdpau}
--enable-vdpau \
%endif
%if %{with_vaapi}
--enable-vaapi \
%endif
%if %{with_crystalhd}
--enable-crystalhd \
%endif
%if !%{with_perl}
--without-bindings=perl \
%endif
%if !%{with_php}
--without-bindings=php \
%endif
%if !%{with_python}
--without-bindings=python \
%endif
%ifarch ppc
--extra-cflags="%{optflags} -maltivec -fomit-frame-pointer" \
--extra-cxxflags="%{optflags} -maltivec -fomit-frame-pointer" \
%else
--extra-cflags="%{optflags} -fomit-frame-pointer" \
--extra-cxxflags="%{optflags} -fomit-frame-pointer" \
%endif
%ifarch %{ix86}
--cpu=i686 --tune=i686 --enable-mmx \
%endif
%if %{with_proc_opt}
--enable-proc-opt \
%endif
%if %{with_debug}
--compile-type=debug \
%else
--compile-type=release \
%endif
--enable-debug
# Insert rpm version-release for mythbackend --version output
sed -i -e 's,###SOURCE_VERSION###,%{version}-%{release} (%_gitrev),' version.sh
# Make
make %{?_smp_mflags}
# Prepare to build the plugins
cd ..
mkdir temp
temp=`pwd`/temp
make -C mythtv install INSTALL_ROOT=$temp
export LD_LIBRARY_PATH=$temp%{_libdir}:$LD_LIBRARY_PATH
# Next, we build the plugins
%if %{with_plugins}
cd mythplugins
# Fix things up so they can find our "temp" install location for mythtv-libs
echo "QMAKE_PROJECT_DEPTH = 0" >> settings.pro
find . -name \*.pro \
-exec sed -i -e "s,INCLUDEPATH += .\+/include/mythtv,INCLUDEPATH += $temp%{_includedir}/mythtv," {} \; \
-exec sed -i -e "s,DEPLIBS = \$\${LIBDIR},DEPLIBS = $temp%{_libdir}," {} \; \
-exec sed -i -e "s,\$\${PREFIX}/include/mythtv,$temp%{_includedir}/mythtv," {} \;
echo "INCLUDEPATH -= \$\${PREFIX}/include" >> settings.pro
echo "INCLUDEPATH -= %{_includedir}" >> settings.pro
echo "INCLUDEPATH += $temp%{_includedir}" >> settings.pro
echo "INCLUDEPATH += %{_includedir}" >> settings.pro
echo "LIBS *= -L$temp%{_libdir}" >> settings.pro