]>
Commit | Line | Data |
---|---|---|
49ccc58e | 1 | # NOTE: for telepathy-qt >= 0.9.8 (Qt5 only) see telepathy-qt5.spec |
cac18b25 JB |
2 | # |
3 | # Conditional build: | |
18703470 | 4 | %bcond_without qt4 # Qt4 interface |
49ccc58e | 5 | %bcond_with qt5 # Qt5 interface (built from telepathy-qt5.spec) |
d9c999a5 | 6 | |
cac18b25 JB |
7 | # "telepathy_qt" name is occupied by earlier work under the same name from different project; |
8 | # thus spec and repo stick to original "telepathy-qt4" name of this project (used before 0.9.0 release) | |
1865d69b | 9 | %define orgname telepathy-qt |
cac18b25 JB |
10 | %define qt4_ver 4.8.2 |
11 | %define qt5_ver 5.0.0 | |
d9c999a5 | 12 | |
bfe5cf24 JB |
13 | Summary: Library for Qt4-based Telepathy clients |
14 | Summary(pl.UTF-8): Biblioteka dla klientów Telepathy opartych na Qt4 | |
978e3d8c | 15 | Name: telepathy-qt4 |
49ccc58e | 16 | # keep 0.9.7 here for qt4 support |
18703470 | 17 | Version: 0.9.7 |
ea126666 | 18 | Release: 3 |
cac18b25 JB |
19 | License: LGPL v2.1+ |
20 | Group: Libraries | |
c8f93029 | 21 | Source0: https://telepathy.freedesktop.org/releases/telepathy-qt/%{orgname}-%{version}.tar.gz |
18703470 | 22 | # Source0-md5: 86470dd3d7f6de8b8f4f36165486d42f |
aecbea1f | 23 | Patch0: telepathy-qt-warnings.patch |
c8f93029 JB |
24 | Patch1: telepathy-qt-qt4.patch |
25 | Patch2: telepathy-qt-link.patch | |
26 | URL: https://telepathy.freedesktop.org/wiki/Telepathy-Qt4 | |
27 | BuildRequires: cmake >= 2.8.12 | |
bfe5cf24 JB |
28 | BuildRequires: dbus-devel |
29 | BuildRequires: dbus-glib-devel | |
96bc7e81 | 30 | BuildRequires: farstream-devel >= 0.2.0 |
c8f93029 | 31 | BuildRequires: glib2-devel >= 1:2.16 |
bfe5cf24 | 32 | BuildRequires: libxml2-devel >= 2.0 |
978e3d8c | 33 | BuildRequires: pkgconfig |
e521664a | 34 | BuildRequires: python-dbus |
bfe5cf24 JB |
35 | BuildRequires: python-devel >= 1:2.5 |
36 | BuildRequires: python-modules >= 1:2.5 | |
e521664a | 37 | BuildRequires: python-pygobject |
24ef8349 | 38 | BuildRequires: rpm-build >= 4.6 |
978e3d8c | 39 | BuildRequires: rpmbuild(macros) >= 1.293 |
96bc7e81 | 40 | BuildRequires: telepathy-farstream-devel >= 0.6.0 |
cac18b25 JB |
41 | BuildRequires: telepathy-glib-devel >= 0.18.0 |
42 | %if %{with qt4} | |
43 | BuildRequires: QtCore-devel >= %{qt4_ver} | |
44 | BuildRequires: QtDBus-devel >= %{qt4_ver} | |
45 | BuildRequires: QtGui-devel >= %{qt4_ver} | |
46 | BuildRequires: QtHelp >= %{qt4_ver} | |
47 | BuildRequires: QtNetwork-devel >= %{qt4_ver} | |
cac18b25 | 48 | BuildRequires: QtTest-devel >= %{qt4_ver} |
142de4f8 | 49 | BuildRequires: QtXml-devel >= %{qt4_ver} |
cac18b25 JB |
50 | BuildRequires: qt4-build >= %{qt4_ver} |
51 | BuildRequires: qt4-qmake >= %{qt4_ver} | |
52 | %endif | |
53 | %if %{with qt5} | |
54 | BuildRequires: Qt5Core-devel >= %{qt5_ver} | |
55 | BuildRequires: Qt5DBus-devel >= %{qt5_ver} | |
56 | BuildRequires: Qt5Gui-devel >= %{qt5_ver} | |
57 | BuildRequires: Qt5Network-devel >= %{qt5_ver} | |
58 | BuildRequires: Qt5Test-devel >= %{qt5_ver} | |
59 | BuildRequires: Qt5Widgets-devel >= %{qt5_ver} | |
60 | BuildRequires: Qt5Xml-devel >= %{qt5_ver} | |
61 | BuildRequires: qt5-assistant >= %{qt5_ver} | |
62 | BuildRequires: qt5-build >= %{qt5_ver} | |
63 | BuildRequires: qt5-qmake >= %{qt5_ver} | |
64 | %endif | |
65 | Requires: QtCore >= %{qt4_ver} | |
66 | Requires: QtDBus >= %{qt4_ver} | |
67 | Requires: QtNetwork >= %{qt4_ver} | |
68 | Requires: QtXml >= %{qt4_ver} | |
96bc7e81 | 69 | Requires: telepathy-farstream >= 0.6.0 |
cac18b25 | 70 | Requires: telepathy-glib >= 0.18.0 |
fda93ec2 | 71 | Obsoletes: telepathy-qt4-yell < 0.2 |
978e3d8c AM |
72 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
73 | ||
74 | %description | |
bfe5cf24 JB |
75 | Library for Qt4-based Telepathy clients. |
76 | ||
77 | %description -l pl.UTF-8 | |
78 | Biblioteka dla klientów Telepathy opartych na Qt4. | |
978e3d8c AM |
79 | |
80 | %package devel | |
81 | Summary: Header files for telepathy-qt4 library | |
82 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki telepathy-qt4 | |
83 | Group: Development/Libraries | |
84 | Requires: %{name} = %{version}-%{release} | |
cac18b25 JB |
85 | Requires: QtCore-devel >= %{qt4_ver} |
86 | Requires: QtDBus-devel >= %{qt4_ver} | |
87 | Requires: QtNetwork-devel >= %{qt4_ver} | |
88 | Requires: QtXml-devel >= %{qt4_ver} | |
fda93ec2 | 89 | Obsoletes: telepathy-qt4-yell-devel < 0.2 |
978e3d8c AM |
90 | |
91 | %description devel | |
92 | Header files for telepathy-qt4 library. | |
93 | ||
94 | %description devel -l pl.UTF-8 | |
cac18b25 JB |
95 | Pliki nagłówkowe biblioteki telepathy-qt4. |
96 | ||
97 | %package apidocs | |
98 | Summary: API documentation for telepathy-qt4 and telepathy-qt5 libraries | |
99 | Summary(pl.UTF-8): Dokumentacja API bibliotek telepathy-qt5 i telepathy-qt5 | |
100 | Group: Documentation | |
142de4f8 | 101 | BuildArch: noarch |
cac18b25 JB |
102 | |
103 | %description apidocs | |
104 | API documentation for telepathy-qt4 and telepathy-qt5 libraries. | |
105 | ||
106 | %description apidocs -l pl.UTF-8 | |
107 | Dokumentacja API bibliotek telepathy-qt5 i telepathy-qt5. | |
108 | ||
109 | %package -n telepathy-qt5 | |
110 | Summary: Library for Qt5-based Telepathy clients | |
111 | Summary(pl.UTF-8): Biblioteka dla klientów Telepathy opartych na Qt5 | |
112 | Group: Libraries | |
113 | Requires: Qt5Core >= %{qt5_ver} | |
114 | Requires: Qt5DBus >= %{qt5_ver} | |
115 | Requires: Qt5Network >= %{qt5_ver} | |
116 | Requires: Qt5Xml >= %{qt5_ver} | |
96bc7e81 | 117 | Requires: telepathy-farstream >= 0.6.0 |
cac18b25 JB |
118 | Requires: telepathy-glib >= 0.18.0 |
119 | ||
120 | %description -n telepathy-qt5 | |
121 | Library for Qt5-based Telepathy clients. | |
122 | ||
123 | %description -n telepathy-qt5 -l pl.UTF-8 | |
124 | Biblioteka dla klientów Telepathy opartych na Qt5. | |
125 | ||
126 | %package -n telepathy-qt5-devel | |
127 | Summary: Header files for telepathy-qt5 library | |
128 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki telepathy-qt5 | |
129 | Group: Development/Libraries | |
cac18b25 JB |
130 | Requires: Qt5Core-devel >= %{qt5_ver} |
131 | Requires: Qt5DBus-devel >= %{qt5_ver} | |
142de4f8 | 132 | Requires: telepathy-qt5 = %{version}-%{release} |
cac18b25 JB |
133 | |
134 | %description -n telepathy-qt5-devel | |
135 | Header files for telepathy-qt5 library. | |
136 | ||
137 | %description -n telepathy-qt5-devel -l pl.UTF-8 | |
138 | Pliki nagłówkowe biblioteki telepathy-qt5. | |
978e3d8c | 139 | |
978e3d8c | 140 | %prep |
1865d69b | 141 | %setup -q -n %{orgname}-%{version} |
aecbea1f | 142 | %patch0 -p1 |
18703470 JB |
143 | %patch1 -p1 |
144 | %patch2 -p1 | |
978e3d8c AM |
145 | |
146 | %build | |
cac18b25 JB |
147 | %if %{with qt4} |
148 | install -d build-qt4 | |
149 | cd build-qt4 | |
150 | %cmake .. \ | |
151 | -DENABLE_FARSTREAM:BOOL=ON \ | |
a4c49aa8 | 152 | -DDESIRED_QT_VERSION=4 \ |
cac18b25 JB |
153 | -DQT_QMAKE_EXECUTABLE_FINDQT=%{_libdir}/qt4/bin/qmake |
154 | ||
155 | %{__make} | |
156 | cd .. | |
157 | %endif | |
158 | ||
159 | %if %{with qt5} | |
160 | install -d build-qt5 | |
161 | cd build-qt5 | |
162 | %cmake .. \ | |
78f577fa | 163 | -DENABLE_FARSTREAM:BOOL=ON \ |
a4c49aa8 | 164 | -DDESIRED_QT_VERSION=5 \ |
cac18b25 | 165 | -DQT_QMAKE_EXECUTABLE_FINDQT=%{_libdir}/qt5/bin/qmake |
1f9778f5 | 166 | |
978e3d8c | 167 | %{__make} |
cac18b25 JB |
168 | cd .. |
169 | %endif | |
978e3d8c AM |
170 | |
171 | %install | |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
cac18b25 JB |
174 | %if %{with qt4} |
175 | %{__make} -C build-qt4 install \ | |
1f9778f5 | 176 | DESTDIR=$RPM_BUILD_ROOT |
cac18b25 JB |
177 | %endif |
178 | ||
179 | %if %{with qt5} | |
180 | %{__make} -C build-qt5 install \ | |
181 | DESTDIR=$RPM_BUILD_ROOT | |
182 | %endif | |
978e3d8c AM |
183 | |
184 | %clean | |
185 | rm -rf $RPM_BUILD_ROOT | |
186 | ||
187 | %post -p /sbin/ldconfig | |
188 | %postun -p /sbin/ldconfig | |
189 | ||
cac18b25 JB |
190 | %post -n telepathy-qt5 -p /sbin/ldconfig |
191 | %postun -n telepathy-qt5 -p /sbin/ldconfig | |
192 | ||
193 | %if %{with qt4} | |
978e3d8c AM |
194 | %files |
195 | %defattr(644,root,root,755) | |
196 | %doc AUTHORS ChangeLog NEWS README | |
d9c999a5 | 197 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4.so.*.*.* |
bfe5cf24 | 198 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt4.so.2 |
34c867e1 | 199 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-farstream.so.*.*.* |
bfe5cf24 | 200 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt4-farstream.so.2 |
c8f93029 JB |
201 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-service.so.*.*.* |
202 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt4-service.so.0 | |
978e3d8c AM |
203 | |
204 | %files devel | |
205 | %defattr(644,root,root,755) | |
978e3d8c | 206 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4.so |
34c867e1 | 207 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-farstream.so |
c8f93029 | 208 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-service.so |
1865d69b | 209 | %{_libdir}/cmake/TelepathyQt4 |
34c867e1 | 210 | %{_libdir}/cmake/TelepathyQt4Farstream |
96bc7e81 | 211 | %{_libdir}/cmake/TelepathyQt4Service |
1865d69b | 212 | %{_includedir}/telepathy-qt4 |
978e3d8c | 213 | %{_pkgconfigdir}/TelepathyQt4.pc |
34c867e1 | 214 | %{_pkgconfigdir}/TelepathyQt4Farstream.pc |
96bc7e81 | 215 | %{_pkgconfigdir}/TelepathyQt4Service.pc |
cac18b25 JB |
216 | %endif |
217 | ||
218 | %files apidocs | |
219 | %defattr(644,root,root,755) | |
220 | %doc doc/html/* | |
221 | ||
222 | %if %{with qt5} | |
223 | %files -n telepathy-qt5 | |
224 | %defattr(644,root,root,755) | |
225 | %doc AUTHORS ChangeLog NEWS README | |
226 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5.so.*.*.* | |
227 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt5.so.0 | |
228 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-farstream.so.*.*.* | |
229 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt5-farstream.so.0 | |
c8f93029 | 230 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-service.so.*.*.* |
18703470 | 231 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt5-service.so.0 |
cac18b25 JB |
232 | |
233 | %files -n telepathy-qt5-devel | |
234 | %defattr(644,root,root,755) | |
235 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5.so | |
236 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-farstream.so | |
c8f93029 | 237 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-service.so |
cac18b25 JB |
238 | %{_libdir}/cmake/TelepathyQt5 |
239 | %{_libdir}/cmake/TelepathyQt5Farstream | |
96bc7e81 | 240 | %{_libdir}/cmake/TelepathyQt5Service |
cac18b25 JB |
241 | %{_includedir}/telepathy-qt5 |
242 | %{_pkgconfigdir}/TelepathyQt5.pc | |
243 | %{_pkgconfigdir}/TelepathyQt5Farstream.pc | |
96bc7e81 | 244 | %{_pkgconfigdir}/TelepathyQt5Service.pc |
cac18b25 | 245 | %endif |