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