]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without qt5 # do not build Qt5 version | |
4 | ||
5 | %define qt4_ver 4.8.1 | |
6 | %define qt5_ver 5.3.1 | |
7 | ||
8 | Summary: Phonon: multimedia API for Qt4/KDE4 | |
9 | Summary(pl.UTF-8): Phonon - biblioteka multimedialna dla Qt4/KDE4 | |
10 | Name: phonon | |
11 | Version: 4.8.2 | |
12 | Release: 1 | |
13 | License: LGPL v2.1 or LGPL v3 | |
14 | Group: X11/Libraries | |
15 | Source0: ftp://ftp.kde.org/pub/kde/stable/phonon/%{version}/%{name}-%{version}.tar.xz | |
16 | # Source0-md5: f8893c0f8a7ee449492262a05e7fca89 | |
17 | Patch0: %{name}-pkg.patch | |
18 | URL: http://phonon.kde.org/ | |
19 | %if %{with qt5} | |
20 | BuildRequires: Qt5DBus-devel >= %{qt5_ver} | |
21 | BuildRequires: Qt5Declarative-devel >= %{qt5_ver} | |
22 | BuildRequires: Qt5Designer-devel >= %{qt5_ver} | |
23 | BuildRequires: Qt5Gui-devel >= %{qt5_ver} | |
24 | BuildRequires: Qt5OpenGL-devel >= %{qt5_ver} | |
25 | BuildRequires: Qt5Qml-devel >= %{qt5_ver} | |
26 | BuildRequires: Qt5Widgets-devel >= %{qt5_ver} | |
27 | BuildRequires: qt5-build >= %{qt5_ver} | |
28 | BuildRequires: qt5-qmake >= %{qt5_ver} | |
29 | %endif | |
30 | BuildRequires: QtCore-devel >= %{qt4_ver} | |
31 | BuildRequires: QtDBus-devel >= %{qt4_ver} | |
32 | BuildRequires: QtDeclarative-devel >= %{qt4_ver} | |
33 | BuildRequires: QtGui-devel >= %{qt4_ver} | |
34 | BuildRequires: QtNetwork-devel >= %{qt4_ver} | |
35 | BuildRequires: QtOpenGL-devel >= %{qt4_ver} | |
36 | BuildRequires: QtSql-devel >= %{qt4_ver} | |
37 | BuildRequires: QtTest-devel >= %{qt4_ver} | |
38 | BuildRequires: cmake >= 2.8.0 | |
39 | BuildRequires: glib2-devel >= 2.0 | |
40 | BuildRequires: libqzeitgeist-devel >= 0.8 | |
41 | BuildRequires: pkgconfig | |
42 | BuildRequires: pulseaudio-devel >= 0.9.21 | |
43 | BuildRequires: qt4-build >= %{qt4_ver} | |
44 | BuildRequires: qt4-qmake >= %{qt4_ver} | |
45 | BuildRequires: rpmbuild(macros) >= 1.603 | |
46 | Requires: QtCore >= %{qt4_ver} | |
47 | Requires: QtDBus >= %{qt4_ver} | |
48 | Requires: QtGui >= %{qt4_ver} | |
49 | Requires: QtOpenGL >= %{qt4_ver} | |
50 | Requires: kde-common-dirs >= 0.5 | |
51 | Requires: libqzeitgeist >= 0.8 | |
52 | Requires: qt4-phonon-backend | |
53 | Provides: qt4-phonon | |
54 | Obsoletes: qt4-phonon | |
55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
56 | ||
57 | %description | |
58 | Phonon is the multimedia API for Qt4/KDE4. | |
59 | ||
60 | Phonon was originally created to allow KDE 4 to be independent of any | |
61 | single multimedia framework such as GStreamer or Xine and to provide a | |
62 | stable API for KDE4's lifetime. It was done to fix problems of | |
63 | frameworks becoming unmaintained, API instability, and to create a | |
64 | simple multimedia API. | |
65 | ||
66 | %description -l pl.UTF-8 | |
67 | Phonon to biblioteka multimedialna dla Qt4/KDE4. | |
68 | ||
69 | Pierwotnie powstała, aby pozwolić na niezależność KDE 4 od konkretnego | |
70 | środowiska multimedialnego, takiego jak GStreamer czy Xine, oraz | |
71 | zapewnić stabilne API na cały czas życia KDE4. Została stworzona w | |
72 | celu wyeliminowania problemów z porzucaniem bibliotek i | |
73 | niestabilnością ich API, a także w celu stworzenia prostego API | |
74 | multimedialnego. | |
75 | ||
76 | %package devel | |
77 | Summary: Header files for Phonon library | |
78 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Phonon | |
79 | Group: X11/Development/Libraries | |
80 | Requires: %{name} = %{version}-%{release} | |
81 | Requires: QtCore-devel >= %{qt4_ver} | |
82 | Requires: QtDBus-devel >= %{qt4_ver} | |
83 | Requires: QtGui-devel >= %{qt4_ver} | |
84 | Provides: qt4-phonon-devel | |
85 | Obsoletes: qt4-phonon-devel | |
86 | ||
87 | %description devel | |
88 | Header files for Phonon library. | |
89 | ||
90 | %description devel -l pl.UTF-8 | |
91 | Pliki nagłówkowe biblioteki Phonon. | |
92 | ||
93 | %package -n QtDeclarative-plugin-phonon | |
94 | Summary: Phonon plugin for Qt4 QtDeclarative library | |
95 | Summary(pl.UTF-8): Wtyczka Phonon dla biblioteki Qt4 QtDeclarative | |
96 | Group: X11/Libraries | |
97 | Requires: %{name} = %{version}-%{release} | |
98 | Requires: QtDeclarative >= %{qt4_ver} | |
99 | ||
100 | %description -n QtDeclarative-plugin-phonon | |
101 | Phonon plugin for Qt4 QtDeclarative library. | |
102 | ||
103 | %description -n QtDeclarative-plugin-phonon -l pl.UTF-8 | |
104 | Wtyczka Phonon dla biblioteki Qt4 QtDeclarative. | |
105 | ||
106 | %package qt5 | |
107 | Summary: Phonon: multimedia API for Qt5/KDE5 | |
108 | Summary(pl.UTF-8): Phonon - biblioteka multimedialna dla Qt5/KDE5 | |
109 | Group: X11/Libraries | |
110 | Requires: Qt5Core >= %{qt5_ver} | |
111 | Requires: Qt5DBus >= %{qt5_ver} | |
112 | Requires: Qt5Gui >= %{qt5_ver} | |
113 | Requires: Qt5OpenGL >= %{qt5_ver} | |
114 | Requires: Qt5Widgets >= %{qt5_ver} | |
115 | Provides: qt5-phonon | |
116 | Obsoletes: qt5-phonon | |
117 | ||
118 | %description qt5 | |
119 | Phonon is the multimedia API for Qt5/KDE5. | |
120 | ||
121 | Phonon was originally created to allow KDE 5 to be independent of any | |
122 | single multimedia framework such as GStreamer or Xine and to provide a | |
123 | stable API for KDE5's lifetime. It was done to fix problems of | |
124 | frameworks becoming unmaintained, API instability, and to create a | |
125 | simple multimedia API. | |
126 | ||
127 | %description qt5 -l pl.UTF-8 | |
128 | Phonon to biblioteka multimedialna dla Qt5/KDE5. | |
129 | ||
130 | Pierwotnie powstała, aby pozwolić na niezależność KDE 5 od konkretnego | |
131 | środowiska multimedialnego, takiego jak GStreamer czy Xine, oraz | |
132 | zapewnić stabilne API na cały czas życia KDE5. Została stworzona w | |
133 | celu wyeliminowania problemów z porzucaniem bibliotek i | |
134 | niestabilnością ich API, a także w celu stworzenia prostego API | |
135 | multimedialnego. | |
136 | ||
137 | %package qt5-devel | |
138 | Summary: Header files for Phonon library | |
139 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Phonon | |
140 | Group: X11/Development/Libraries | |
141 | Requires: %{name}-qt5 = %{version}-%{release} | |
142 | Requires: Qt5Core-devel >= %{qt5_ver} | |
143 | Requires: Qt5DBus-devel >= %{qt5_ver} | |
144 | Requires: Qt5Gui-devel >= %{qt5_ver} | |
145 | Provides: qt5-phonon-devel | |
146 | Obsoletes: qt5-phonon-devel | |
147 | ||
148 | %description qt5-devel | |
149 | Header files for Phonon library. | |
150 | ||
151 | %description qt5-devel -l pl.UTF-8 | |
152 | Pliki nagłówkowe biblioteki Phonon. | |
153 | ||
154 | %package -n Qt5Declarative-plugin-phonon | |
155 | Summary: Phonon plugin for Qt5 QtDeclarative library | |
156 | Summary(pl.UTF-8): Wtyczka Phonon dla biblioteki Qt5 QtDeclarative | |
157 | Group: X11/Libraries | |
158 | Requires: %{name} = %{version}-%{release} | |
159 | Requires: Qt5Declarative >= %{qt5_ver} | |
160 | ||
161 | %description -n Qt5Declarative-plugin-phonon | |
162 | Phonon plugin for Qt5 QtDeclarative library. | |
163 | ||
164 | %description -n Qt5Declarative-plugin-phonon -l pl.UTF-8 | |
165 | Wtyczka Phonon dla biblioteki Qt5 QtDeclarative. | |
166 | ||
167 | %package -n Qt5Designer-plugin-phonon | |
168 | Summary: Phonon plugin for Qt5 QtDesigner | |
169 | Summary(pl.UTF-8): Wtyczka Phonon dla Qt5 QtDesignera | |
170 | Group: X11/Libraries | |
171 | Requires: %{name} = %{version}-%{release} | |
172 | Requires: Qt5Designer >= %{qt5_ver} | |
173 | ||
174 | %description -n Qt5Designer-plugin-phonon | |
175 | Phonon plugin for Qt5 QtDesigner. | |
176 | ||
177 | %description -n Qt5Designer-plugin-phonon -l pl.UTF-8 | |
178 | Wtyczka Phonon dla Qt5 QtDesignera. | |
179 | ||
180 | %prep | |
181 | %setup -q | |
182 | %patch0 -p1 | |
183 | ||
184 | ||
185 | %build | |
186 | install -d build | |
187 | cd build | |
188 | # disable designer plugin - currently packaged in QtDesigner package | |
189 | %cmake .. \ | |
190 | -DPHONON_BUILD_DECLARATIVE_PLUGIN=ON \ | |
191 | -DPHONON_BUILD_DESIGNER_PLUGIN=OFF | |
192 | %{__make} | |
193 | ||
194 | cd .. | |
195 | %if %{with qt5} | |
196 | install -d build5 | |
197 | cd build5 | |
198 | %cmake .. \ | |
199 | -DPHONON_BUILD_DECLARATIVE_PLUGIN=ON \ | |
200 | -DPHONON_BUILD_DESIGNER_PLUGIN=ON \ | |
201 | -DPHONON_BUILD_PHONON4QT5=ON \ | |
202 | -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=ON | |
203 | %{__make} | |
204 | %endif | |
205 | ||
206 | %install | |
207 | rm -rf $RPM_BUILD_ROOT | |
208 | ||
209 | %{__make} -C build install \ | |
210 | DESTDIR=$RPM_BUILD_ROOT | |
211 | ||
212 | install -d $RPM_BUILD_ROOT%{_includedir}/qt4 | |
213 | install -d $RPM_BUILD_ROOT%{_libdir}/kde4/plugins/phonon_backend | |
214 | install -d $RPM_BUILD_ROOT%{_datadir}/kde4/services/phononbackends | |
215 | ln -s ../phonon $RPM_BUILD_ROOT%{_includedir}/qt4/phonon | |
216 | ln -s ../KDE/Phonon $RPM_BUILD_ROOT%{_includedir}/phonon/Phonon | |
217 | ||
218 | %if %{with qt5} | |
219 | %{__make} -C build5 install \ | |
220 | DESTDIR=$RPM_BUILD_ROOT | |
221 | %endif | |
222 | ||
223 | %clean | |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | ||
226 | %post -p /sbin/ldconfig | |
227 | %postun -p /sbin/ldconfig | |
228 | ||
229 | %post qt5 -p /sbin/ldconfig | |
230 | %postun qt5 -p /sbin/ldconfig | |
231 | ||
232 | %files | |
233 | %defattr(644,root,root,755) | |
234 | %attr(755,root,root) %{_libdir}/libphonon.so.*.*.* | |
235 | %attr(755,root,root) %ghost %{_libdir}/libphonon.so.4 | |
236 | %attr(755,root,root) %{_libdir}/libphononexperimental.so.*.*.* | |
237 | %attr(755,root,root) %ghost %{_libdir}/libphononexperimental.so.4 | |
238 | %{_datadir}/dbus-1/interfaces/org.kde.Phonon.AudioOutput.xml | |
239 | %dir %{_libdir}/kde4/plugins/phonon_backend | |
240 | %dir %{_datadir}/kde4/services/phononbackends | |
241 | ||
242 | %files devel | |
243 | %defattr(644,root,root,755) | |
244 | %attr(755,root,root) %{_libdir}/libphonon.so | |
245 | %attr(755,root,root) %{_libdir}/libphononexperimental.so | |
246 | %{_includedir}/phonon | |
247 | %dir %{_includedir}/KDE | |
248 | %{_includedir}/KDE/Phonon | |
249 | %{_includedir}/qt4/phonon | |
250 | %{_pkgconfigdir}/phonon.pc | |
251 | %{_libdir}/cmake/phonon | |
252 | %dir %{_datadir}/phonon | |
253 | %{_datadir}/phonon/buildsystem | |
254 | %{_datadir}/qt4/mkspecs/modules/qt_phonon.pri | |
255 | ||
256 | %files -n QtDeclarative-plugin-phonon | |
257 | %defattr(644,root,root,755) | |
258 | %dir %{_libdir}/qt4/imports/Phonon | |
259 | %attr(755,root,root) %{_libdir}/qt4/imports/Phonon/libphononqmlplugin.so | |
260 | %{_libdir}/qt4/imports/Phonon/VideoPlayer.qml | |
261 | %{_libdir}/qt4/imports/Phonon/qmldir | |
262 | ||
263 | %if %{with qt5} | |
264 | %files qt5 | |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %ghost %{_libdir}/libphonon4qt5.so.4 | |
267 | %attr(755,root,root) %{_libdir}/libphonon4qt5.so.*.*.* | |
268 | %attr(755,root,root) %ghost %{_libdir}/libphonon4qt5experimental.so.4 | |
269 | %attr(755,root,root) %{_libdir}/libphonon4qt5experimental.so.*.*.* | |
270 | %{_datadir}/dbus-1/interfaces/org.kde.Phonon4Qt5.AudioOutput.xml | |
271 | %{_datadir}/phonon4qt5 | |
272 | ||
273 | %files qt5-devel | |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{_libdir}/libphonon4qt5.so | |
276 | %attr(755,root,root) %{_libdir}/libphonon4qt5experimental.so | |
277 | %{_includedir}/phonon4qt5 | |
278 | %{_pkgconfigdir}/phonon4qt5.pc | |
279 | %{_libdir}/cmake/phonon4qt5 | |
280 | %{_libdir}/qt5/mkspecs/modules/qt_phonon4qt5.pri | |
281 | ||
282 | %files -n Qt5Declarative-plugin-phonon | |
283 | %defattr(644,root,root,755) | |
284 | %dir %{_libdir}/qt4/imports/Phonon | |
285 | %attr(755,root,root) %{_libdir}/qt5/imports/Phonon/libphononqmlplugin.so | |
286 | %{_libdir}/qt5/imports/Phonon/VideoPlayer.qml | |
287 | %{_libdir}/qt5/imports/Phonon/qmldir | |
288 | ||
289 | %files -n Qt5Designer-plugin-phonon | |
290 | %defattr(644,root,root,755) | |
291 | %attr(755,root,root) %{_libdir}/qt5/plugins/designer/libphononwidgets.so | |
292 | %endif |