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