]>
Commit | Line | Data |
---|---|---|
e7f6dce0 JB |
1 | # |
2 | # Conditional build: | |
a065ff0f WF |
3 | %bcond_without qt5 # do not build Qt5 version |
4 | ||
e7f6dce0 JB |
5 | %define qt4_ver 4.8.1 |
6 | %define qt5_ver 5.3.1 | |
2c13f770 | 7 | |
85decc24 JB |
8 | Summary: Phonon: multimedia API for Qt4/KDE4 |
9 | Summary(pl.UTF-8): Phonon - biblioteka multimedialna dla Qt4/KDE4 | |
87d58a79 | 10 | Name: phonon |
01dfa4c2 | 11 | Version: 4.8.2 |
af2e887a | 12 | Release: 1 |
85decc24 | 13 | License: LGPL v2.1 or LGPL v3 |
87d58a79 | 14 | Group: X11/Libraries |
af2e887a | 15 | Source0: ftp://ftp.kde.org/pub/kde/stable/phonon/%{version}/%{name}-%{version}.tar.xz |
01dfa4c2 | 16 | # Source0-md5: f8893c0f8a7ee449492262a05e7fca89 |
2067b452 | 17 | Patch0: %{name}-pkg.patch |
174bb316 | 18 | URL: http://phonon.kde.org/ |
a065ff0f | 19 | %if %{with qt5} |
e7f6dce0 JB |
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} | |
a065ff0f | 29 | %endif |
e7f6dce0 JB |
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} | |
9fb1cf8e | 38 | BuildRequires: cmake >= 2.8.0 |
ac805375 JB |
39 | BuildRequires: glib2-devel >= 2.0 |
40 | BuildRequires: libqzeitgeist-devel >= 0.8 | |
54fe0ccc | 41 | BuildRequires: pkgconfig |
63d78ae0 | 42 | BuildRequires: pulseaudio-devel >= 0.9.21 |
e7f6dce0 JB |
43 | BuildRequires: qt4-build >= %{qt4_ver} |
44 | BuildRequires: qt4-qmake >= %{qt4_ver} | |
85decc24 | 45 | BuildRequires: rpmbuild(macros) >= 1.603 |
e7f6dce0 JB |
46 | Requires: QtCore >= %{qt4_ver} |
47 | Requires: QtDBus >= %{qt4_ver} | |
48 | Requires: QtGui >= %{qt4_ver} | |
49 | Requires: QtOpenGL >= %{qt4_ver} | |
8da7cae4 | 50 | Requires: kde-common-dirs >= 0.5 |
ac805375 | 51 | Requires: libqzeitgeist >= 0.8 |
90cdc944 | 52 | Requires: qt4-phonon-backend |
87d58a79 | 53 | Provides: qt4-phonon |
926de682 | 54 | Obsoletes: qt4-phonon |
87d58a79 | 55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
56 | ||
57 | %description | |
90fd11ae ER |
58 | Phonon is the multimedia API for Qt4/KDE4. |
59 | ||
bbcd3cdf ER |
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. | |
87d58a79 | 65 | |
66 | %description -l pl.UTF-8 | |
85decc24 JB |
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. | |
87d58a79 | 75 | |
76 | %package devel | |
5095f7de | 77 | Summary: Header files for Phonon library |
926de682 | 78 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Phonon |
5095f7de | 79 | Group: X11/Development/Libraries |
bbcd3cdf | 80 | Requires: %{name} = %{version}-%{release} |
e7f6dce0 JB |
81 | Requires: QtCore-devel >= %{qt4_ver} |
82 | Requires: QtDBus-devel >= %{qt4_ver} | |
83 | Requires: QtGui-devel >= %{qt4_ver} | |
87d58a79 | 84 | Provides: qt4-phonon-devel |
85 | Obsoletes: qt4-phonon-devel | |
86 | ||
87 | %description devel | |
96eb3964 | 88 | Header files for Phonon library. |
87d58a79 | 89 | |
90 | %description devel -l pl.UTF-8 | |
926de682 | 91 | Pliki nagłówkowe biblioteki Phonon. |
87d58a79 | 92 | |
e7f6dce0 JB |
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 | ||
a065ff0f WF |
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 | |
e7f6dce0 JB |
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} | |
a065ff0f WF |
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} | |
e7f6dce0 JB |
142 | Requires: Qt5Core-devel >= %{qt5_ver} |
143 | Requires: Qt5DBus-devel >= %{qt5_ver} | |
144 | Requires: Qt5Gui-devel >= %{qt5_ver} | |
a065ff0f WF |
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 | ||
e7f6dce0 JB |
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 | ||
87d58a79 | 180 | %prep |
72fa65d1 | 181 | %setup -q |
2067b452 | 182 | %patch0 -p1 |
fb39e774 | 183 | |
87d58a79 | 184 | |
185 | %build | |
186 | install -d build | |
187 | cd build | |
ac805375 JB |
188 | # disable designer plugin - currently packaged in QtDesigner package |
189 | %cmake .. \ | |
e7f6dce0 | 190 | -DPHONON_BUILD_DECLARATIVE_PLUGIN=ON \ |
ac805375 | 191 | -DPHONON_BUILD_DESIGNER_PLUGIN=OFF |
a065ff0f | 192 | %{__make} |
87d58a79 | 193 | |
a065ff0f WF |
194 | cd .. |
195 | %if %{with qt5} | |
196 | install -d build5 | |
197 | cd build5 | |
198 | %cmake .. \ | |
e7f6dce0 JB |
199 | -DPHONON_BUILD_DECLARATIVE_PLUGIN=ON \ |
200 | -DPHONON_BUILD_DESIGNER_PLUGIN=ON \ | |
a065ff0f WF |
201 | -DPHONON_BUILD_PHONON4QT5=ON \ |
202 | -DPHONON_INSTALL_QT_EXTENSIONS_INTO_SYSTEM_QT=ON | |
87d58a79 | 203 | %{__make} |
a065ff0f | 204 | %endif |
87d58a79 | 205 | |
206 | %install | |
207 | rm -rf $RPM_BUILD_ROOT | |
208 | ||
209 | %{__make} -C build install \ | |
210 | DESTDIR=$RPM_BUILD_ROOT | |
211 | ||
90fd11ae | 212 | install -d $RPM_BUILD_ROOT%{_includedir}/qt4 |
e144db61 | 213 | install -d $RPM_BUILD_ROOT%{_libdir}/kde4/plugins/phonon_backend |
5d50300b | 214 | install -d $RPM_BUILD_ROOT%{_datadir}/kde4/services/phononbackends |
90fd11ae ER |
215 | ln -s ../phonon $RPM_BUILD_ROOT%{_includedir}/qt4/phonon |
216 | ln -s ../KDE/Phonon $RPM_BUILD_ROOT%{_includedir}/phonon/Phonon | |
22eeef83 | 217 | |
a065ff0f WF |
218 | %if %{with qt5} |
219 | %{__make} -C build5 install \ | |
220 | DESTDIR=$RPM_BUILD_ROOT | |
221 | %endif | |
222 | ||
87d58a79 | 223 | %clean |
224 | rm -rf $RPM_BUILD_ROOT | |
225 | ||
226 | %post -p /sbin/ldconfig | |
227 | %postun -p /sbin/ldconfig | |
228 | ||
e7f6dce0 JB |
229 | %post qt5 -p /sbin/ldconfig |
230 | %postun qt5 -p /sbin/ldconfig | |
a065ff0f | 231 | |
87d58a79 | 232 | %files |
233 | %defattr(644,root,root,755) | |
234 | %attr(755,root,root) %{_libdir}/libphonon.so.*.*.* | |
bbcd3cdf | 235 | %attr(755,root,root) %ghost %{_libdir}/libphonon.so.4 |
87d58a79 | 236 | %attr(755,root,root) %{_libdir}/libphononexperimental.so.*.*.* |
bbcd3cdf | 237 | %attr(755,root,root) %ghost %{_libdir}/libphononexperimental.so.4 |
87d58a79 | 238 | %{_datadir}/dbus-1/interfaces/org.kde.Phonon.AudioOutput.xml |
e144db61 | 239 | %dir %{_libdir}/kde4/plugins/phonon_backend |
5d50300b | 240 | %dir %{_datadir}/kde4/services/phononbackends |
2f158ee4 | 241 | |
87d58a79 | 242 | %files devel |
243 | %defattr(644,root,root,755) | |
85decc24 JB |
244 | %attr(755,root,root) %{_libdir}/libphonon.so |
245 | %attr(755,root,root) %{_libdir}/libphononexperimental.so | |
87d58a79 | 246 | %{_includedir}/phonon |
79b366d8 | 247 | %dir %{_includedir}/KDE |
87d58a79 | 248 | %{_includedir}/KDE/Phonon |
22eeef83 | 249 | %{_includedir}/qt4/phonon |
87d58a79 | 250 | %{_pkgconfigdir}/phonon.pc |
ac805375 | 251 | %{_libdir}/cmake/phonon |
03bc6914 | 252 | %dir %{_datadir}/phonon |
61643aa7 | 253 | %{_datadir}/phonon/buildsystem |
e09d576b | 254 | %{_datadir}/qt4/mkspecs/modules/qt_phonon.pri |
a065ff0f | 255 | |
e7f6dce0 JB |
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 | ||
a065ff0f WF |
263 | %if %{with qt5} |
264 | %files qt5 | |
265 | %defattr(644,root,root,755) | |
266 | %attr(755,root,root) %ghost %{_libdir}/libphonon4qt5.so.4 | |
846b6e56 | 267 | %attr(755,root,root) %{_libdir}/libphonon4qt5.so.*.*.* |
a065ff0f | 268 | %attr(755,root,root) %ghost %{_libdir}/libphonon4qt5experimental.so.4 |
846b6e56 | 269 | %attr(755,root,root) %{_libdir}/libphonon4qt5experimental.so.*.*.* |
a065ff0f WF |
270 | %{_datadir}/dbus-1/interfaces/org.kde.Phonon4Qt5.AudioOutput.xml |
271 | %{_datadir}/phonon4qt5 | |
272 | ||
273 | %files qt5-devel | |
274 | %defattr(644,root,root,755) | |
a065ff0f WF |
275 | %attr(755,root,root) %{_libdir}/libphonon4qt5.so |
276 | %attr(755,root,root) %{_libdir}/libphonon4qt5experimental.so | |
e7f6dce0 | 277 | %{_includedir}/phonon4qt5 |
a065ff0f | 278 | %{_pkgconfigdir}/phonon4qt5.pc |
e7f6dce0 | 279 | %{_libdir}/cmake/phonon4qt5 |
a065ff0f | 280 | %{_libdir}/qt5/mkspecs/modules/qt_phonon4qt5.pri |
e7f6dce0 JB |
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 | |
a065ff0f | 292 | %endif |