]>
Commit | Line | Data |
---|---|---|
7abc7dc7 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without qt4 # Qt4 Phonon module | |
4 | %bcond_without qt5 # Qt5 Phonon (Phonon4Qt5) module | |
5 | ||
6 | %define phonon_ver 4.7.0 | |
7 | %define qt4_ver 4.7.1 | |
8 | %define qt5_ver 5.0.0 | |
6825c226 | 9 | |
10 | Summary: GStreamer backend for Phonon | |
11 | Summary(pl.UTF-8): Wtyczka GStreamera dla Phonona | |
12 | Name: phonon-backend-gstreamer | |
2bd0fc91 | 13 | Version: 4.8.2 |
3e194a25 | 14 | Release: 5 |
6825c226 | 15 | License: LGPL 2.1 |
16 | Group: Libraries | |
a623b8b2 | 17 | Source0: http://download.kde.org/stable/phonon/phonon-backend-gstreamer/%{version}/src/%{name}-%{version}.tar.xz |
2bd0fc91 | 18 | # Source0-md5: ce441035dc5a00ffaac9a64518ab5c62 |
7abc7dc7 JB |
19 | BuildRequires: OpenGL-devel |
20 | BuildRequires: cmake >= 2.8.6 | |
21 | BuildRequires: glib2-devel >= 2.0 | |
22 | BuildRequires: gstreamer-devel >= 1.0 | |
23 | BuildRequires: gstreamer-plugins-base-devel >= 1.0 | |
24 | BuildRequires: libxml2-devel >= 2 | |
25 | BuildRequires: pkgconfig | |
6825c226 | 26 | BuildRequires: rpmbuild(macros) >= 1.600 |
7abc7dc7 JB |
27 | BuildRequires: sed >= 4.0 |
28 | %if %{with qt4} | |
29 | BuildRequires: QtCore-devel >= %{qt4_ver} | |
30 | BuildRequires: QtGui-devel >= %{qt4_ver} | |
31 | BuildRequires: QtOpenGL-devel >= %{qt4_ver} | |
32 | BuildRequires: phonon-devel >= %{phonon_ver} | |
33 | BuildRequires: qt4-build >= %{qt4_ver} | |
34 | BuildRequires: qt4-qmake >= %{qt4_ver} | |
35 | %endif | |
36 | %if %{with qt5} | |
37 | BuildRequires: Qt5Core-devel >= %{qt5_ver} | |
38 | BuildRequires: Qt5Gui-devel >= %{qt5_ver} | |
39 | BuildRequires: Qt5OpenGL-devel >= %{qt5_ver} | |
40 | BuildRequires: Qt5Widgets-devel >= %{qt5_ver} | |
41 | BuildRequires: phonon-qt5-devel >= %{phonon_ver} | |
42 | BuildRequires: qt5-build >= %{qt5_ver} | |
43 | BuildRequires: qt5-qmake >= %{qt5_ver} | |
44 | %endif | |
45 | Requires: phonon >= %{phonon_ver} | |
46 | Suggests: gstreamer-pulseaudio >= 1.0 | |
6825c226 | 47 | Provides: qt4-phonon-backend = %{version} |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
49 | ||
50 | %description | |
51 | GStreamer backend for Phonon. | |
52 | ||
53 | %description -l pl.UTF-8 | |
54 | Wtyczka GStreamera dla Phonona. | |
55 | ||
7abc7dc7 JB |
56 | %package -n phonon-qt5-backend-gstreamer |
57 | Summary: GStreamer backend for Qt5 Phonon | |
58 | Summary(pl.UTF-8): Wtyczka GStreamera dla Phonona opartego na Qt5 | |
59 | Group: Libraries | |
60 | Requires: phonon-qt5 >= %{phonon_ver} | |
61 | Suggests: gstreamer-pulseaudio >= 1.0 | |
62 | Provides: qt5-phonon-backend = %{version} | |
63 | ||
64 | %description -n phonon-qt5-backend-gstreamer | |
65 | GStreamer backend for Qt5 Phonon. | |
66 | ||
67 | %description -n phonon-qt5-backend-gstreamer -l pl.UTF-8 | |
68 | Wtyczka GStreamera dla Phonona opartego na Qt5. | |
69 | ||
6825c226 | 70 | %prep |
71 | %setup -q | |
72 | ||
7abc7dc7 JB |
73 | # Use PHONON_NO_GRAPHICSVIEW because videographicsobject.cpp is not ready for gstreamer 1.0; |
74 | # as of 4.8.2, this setting is not exported as option, so hardcode it. | |
75 | sed -i -e "15i set(PHONON_NO_GRAPHICSVIEW ON)" gstreamer/CMakeLists.txt | |
76 | ||
6825c226 | 77 | %build |
7abc7dc7 JB |
78 | %if %{with qt4} |
79 | install -d build-qt4 | |
80 | cd build-qt4 | |
81 | %cmake -DPHONON_NO_GRAPHICSVIEW=ON .. | |
82 | %{__make} | |
83 | cd .. | |
84 | %endif | |
6825c226 | 85 | |
7abc7dc7 JB |
86 | %if %{with qt5} |
87 | install -d build-qt5 | |
88 | cd build-qt5 | |
89 | %cmake .. \ | |
90 | -DPHONON_BUILD_PHONON4QT5=ON | |
6825c226 | 91 | %{__make} |
7abc7dc7 JB |
92 | cd .. |
93 | %endif | |
6825c226 | 94 | |
95 | %install | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
7abc7dc7 JB |
98 | %if %{with qt4} |
99 | %{__make} -C build-qt4 install \ | |
100 | DESTDIR=$RPM_BUILD_ROOT | |
101 | %endif | |
102 | ||
103 | %if %{with qt5} | |
104 | %{__make} -C build-qt5 install \ | |
6825c226 | 105 | DESTDIR=$RPM_BUILD_ROOT |
7abc7dc7 | 106 | %endif |
6825c226 | 107 | |
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
7abc7dc7 | 111 | %if %{with qt4} |
6825c226 | 112 | %files |
113 | %defattr(644,root,root,755) | |
114 | %attr(755,root,root) %{_libdir}/kde4/plugins/phonon_backend/phonon_gstreamer.so | |
115 | %{_datadir}/kde4/services/phononbackends/gstreamer.desktop | |
7abc7dc7 JB |
116 | %{_iconsdir}/hicolor/*x*/apps/phonon-gstreamer.png |
117 | %{_iconsdir}/hicolor/scalable/apps/phonon-gstreamer.svgz | |
118 | %endif | |
119 | ||
120 | %if %{with qt5} | |
121 | %files -n phonon-qt5-backend-gstreamer | |
122 | %defattr(644,root,root,755) | |
123 | %attr(755,root,root) %{_libdir}/qt5/plugins/phonon4qt5_backend/phonon_gstreamer.so | |
124 | %endif |