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