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