]>
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 |
aecbea1f | 18 | Release: 1 |
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 |
978e3d8c | 38 | BuildRequires: rpmbuild(macros) >= 1.293 |
96bc7e81 | 39 | BuildRequires: telepathy-farstream-devel >= 0.6.0 |
cac18b25 JB |
40 | BuildRequires: telepathy-glib-devel >= 0.18.0 |
41 | %if %{with qt4} | |
42 | BuildRequires: QtCore-devel >= %{qt4_ver} | |
43 | BuildRequires: QtDBus-devel >= %{qt4_ver} | |
44 | BuildRequires: QtGui-devel >= %{qt4_ver} | |
45 | BuildRequires: QtHelp >= %{qt4_ver} | |
46 | BuildRequires: QtNetwork-devel >= %{qt4_ver} | |
cac18b25 | 47 | BuildRequires: QtTest-devel >= %{qt4_ver} |
142de4f8 | 48 | BuildRequires: QtXml-devel >= %{qt4_ver} |
cac18b25 JB |
49 | BuildRequires: qt4-build >= %{qt4_ver} |
50 | BuildRequires: qt4-qmake >= %{qt4_ver} | |
51 | %endif | |
52 | %if %{with qt5} | |
53 | BuildRequires: Qt5Core-devel >= %{qt5_ver} | |
54 | BuildRequires: Qt5DBus-devel >= %{qt5_ver} | |
55 | BuildRequires: Qt5Gui-devel >= %{qt5_ver} | |
56 | BuildRequires: Qt5Network-devel >= %{qt5_ver} | |
57 | BuildRequires: Qt5Test-devel >= %{qt5_ver} | |
58 | BuildRequires: Qt5Widgets-devel >= %{qt5_ver} | |
59 | BuildRequires: Qt5Xml-devel >= %{qt5_ver} | |
60 | BuildRequires: qt5-assistant >= %{qt5_ver} | |
61 | BuildRequires: qt5-build >= %{qt5_ver} | |
62 | BuildRequires: qt5-qmake >= %{qt5_ver} | |
63 | %endif | |
64 | Requires: QtCore >= %{qt4_ver} | |
65 | Requires: QtDBus >= %{qt4_ver} | |
66 | Requires: QtNetwork >= %{qt4_ver} | |
67 | Requires: QtXml >= %{qt4_ver} | |
96bc7e81 | 68 | Requires: telepathy-farstream >= 0.6.0 |
cac18b25 | 69 | Requires: telepathy-glib >= 0.18.0 |
bcc96c2f | 70 | Obsoletes: telepathy-qt4-yell |
978e3d8c AM |
71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
72 | ||
73 | %description | |
bfe5cf24 JB |
74 | Library for Qt4-based Telepathy clients. |
75 | ||
76 | %description -l pl.UTF-8 | |
77 | Biblioteka dla klientów Telepathy opartych na Qt4. | |
978e3d8c AM |
78 | |
79 | %package devel | |
80 | Summary: Header files for telepathy-qt4 library | |
81 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki telepathy-qt4 | |
82 | Group: Development/Libraries | |
83 | Requires: %{name} = %{version}-%{release} | |
cac18b25 JB |
84 | Requires: QtCore-devel >= %{qt4_ver} |
85 | Requires: QtDBus-devel >= %{qt4_ver} | |
86 | Requires: QtNetwork-devel >= %{qt4_ver} | |
87 | Requires: QtXml-devel >= %{qt4_ver} | |
bcc96c2f | 88 | Obsoletes: telepathy-qt4-yell-devel |
978e3d8c AM |
89 | |
90 | %description devel | |
91 | Header files for telepathy-qt4 library. | |
92 | ||
93 | %description devel -l pl.UTF-8 | |
cac18b25 JB |
94 | Pliki nagłówkowe biblioteki telepathy-qt4. |
95 | ||
96 | %package apidocs | |
97 | Summary: API documentation for telepathy-qt4 and telepathy-qt5 libraries | |
98 | Summary(pl.UTF-8): Dokumentacja API bibliotek telepathy-qt5 i telepathy-qt5 | |
99 | Group: Documentation | |
142de4f8 ER |
100 | %if "%{_rpmversion}" >= "5" |
101 | BuildArch: noarch | |
102 | %endif | |
cac18b25 JB |
103 | |
104 | %description apidocs | |
105 | API documentation for telepathy-qt4 and telepathy-qt5 libraries. | |
106 | ||
107 | %description apidocs -l pl.UTF-8 | |
108 | Dokumentacja API bibliotek telepathy-qt5 i telepathy-qt5. | |
109 | ||
110 | %package -n telepathy-qt5 | |
111 | Summary: Library for Qt5-based Telepathy clients | |
112 | Summary(pl.UTF-8): Biblioteka dla klientów Telepathy opartych na Qt5 | |
113 | Group: Libraries | |
114 | Requires: Qt5Core >= %{qt5_ver} | |
115 | Requires: Qt5DBus >= %{qt5_ver} | |
116 | Requires: Qt5Network >= %{qt5_ver} | |
117 | Requires: Qt5Xml >= %{qt5_ver} | |
96bc7e81 | 118 | Requires: telepathy-farstream >= 0.6.0 |
cac18b25 JB |
119 | Requires: telepathy-glib >= 0.18.0 |
120 | ||
121 | %description -n telepathy-qt5 | |
122 | Library for Qt5-based Telepathy clients. | |
123 | ||
124 | %description -n telepathy-qt5 -l pl.UTF-8 | |
125 | Biblioteka dla klientów Telepathy opartych na Qt5. | |
126 | ||
127 | %package -n telepathy-qt5-devel | |
128 | Summary: Header files for telepathy-qt5 library | |
129 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki telepathy-qt5 | |
130 | Group: Development/Libraries | |
cac18b25 JB |
131 | Requires: Qt5Core-devel >= %{qt5_ver} |
132 | Requires: Qt5DBus-devel >= %{qt5_ver} | |
142de4f8 | 133 | Requires: telepathy-qt5 = %{version}-%{release} |
cac18b25 JB |
134 | |
135 | %description -n telepathy-qt5-devel | |
136 | Header files for telepathy-qt5 library. | |
137 | ||
138 | %description -n telepathy-qt5-devel -l pl.UTF-8 | |
139 | Pliki nagłówkowe biblioteki telepathy-qt5. | |
978e3d8c | 140 | |
978e3d8c | 141 | %prep |
1865d69b | 142 | %setup -q -n %{orgname}-%{version} |
aecbea1f | 143 | %patch0 -p1 |
18703470 JB |
144 | %patch1 -p1 |
145 | %patch2 -p1 | |
978e3d8c AM |
146 | |
147 | %build | |
cac18b25 JB |
148 | %if %{with qt4} |
149 | install -d build-qt4 | |
150 | cd build-qt4 | |
151 | %cmake .. \ | |
152 | -DENABLE_FARSTREAM:BOOL=ON \ | |
a4c49aa8 | 153 | -DDESIRED_QT_VERSION=4 \ |
cac18b25 JB |
154 | -DQT_QMAKE_EXECUTABLE_FINDQT=%{_libdir}/qt4/bin/qmake |
155 | ||
156 | %{__make} | |
157 | cd .. | |
158 | %endif | |
159 | ||
160 | %if %{with qt5} | |
161 | install -d build-qt5 | |
162 | cd build-qt5 | |
163 | %cmake .. \ | |
78f577fa | 164 | -DENABLE_FARSTREAM:BOOL=ON \ |
a4c49aa8 | 165 | -DDESIRED_QT_VERSION=5 \ |
cac18b25 | 166 | -DQT_QMAKE_EXECUTABLE_FINDQT=%{_libdir}/qt5/bin/qmake |
1f9778f5 | 167 | |
978e3d8c | 168 | %{__make} |
cac18b25 JB |
169 | cd .. |
170 | %endif | |
978e3d8c AM |
171 | |
172 | %install | |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | ||
cac18b25 JB |
175 | %if %{with qt4} |
176 | %{__make} -C build-qt4 install \ | |
1f9778f5 | 177 | DESTDIR=$RPM_BUILD_ROOT |
cac18b25 JB |
178 | %endif |
179 | ||
180 | %if %{with qt5} | |
181 | %{__make} -C build-qt5 install \ | |
182 | DESTDIR=$RPM_BUILD_ROOT | |
183 | %endif | |
978e3d8c AM |
184 | |
185 | %clean | |
186 | rm -rf $RPM_BUILD_ROOT | |
187 | ||
188 | %post -p /sbin/ldconfig | |
189 | %postun -p /sbin/ldconfig | |
190 | ||
cac18b25 JB |
191 | %post -n telepathy-qt5 -p /sbin/ldconfig |
192 | %postun -n telepathy-qt5 -p /sbin/ldconfig | |
193 | ||
194 | %if %{with qt4} | |
978e3d8c AM |
195 | %files |
196 | %defattr(644,root,root,755) | |
197 | %doc AUTHORS ChangeLog NEWS README | |
d9c999a5 | 198 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4.so.*.*.* |
bfe5cf24 | 199 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt4.so.2 |
34c867e1 | 200 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-farstream.so.*.*.* |
bfe5cf24 | 201 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt4-farstream.so.2 |
c8f93029 JB |
202 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-service.so.*.*.* |
203 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt4-service.so.0 | |
978e3d8c AM |
204 | |
205 | %files devel | |
206 | %defattr(644,root,root,755) | |
207 | %doc doc/html | |
208 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4.so | |
34c867e1 | 209 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-farstream.so |
c8f93029 | 210 | %attr(755,root,root) %{_libdir}/libtelepathy-qt4-service.so |
1865d69b | 211 | %{_libdir}/cmake/TelepathyQt4 |
34c867e1 | 212 | %{_libdir}/cmake/TelepathyQt4Farstream |
96bc7e81 | 213 | %{_libdir}/cmake/TelepathyQt4Service |
1865d69b | 214 | %{_includedir}/telepathy-qt4 |
978e3d8c | 215 | %{_pkgconfigdir}/TelepathyQt4.pc |
34c867e1 | 216 | %{_pkgconfigdir}/TelepathyQt4Farstream.pc |
96bc7e81 | 217 | %{_pkgconfigdir}/TelepathyQt4Service.pc |
cac18b25 JB |
218 | %endif |
219 | ||
220 | %files apidocs | |
221 | %defattr(644,root,root,755) | |
222 | %doc doc/html/* | |
223 | ||
224 | %if %{with qt5} | |
225 | %files -n telepathy-qt5 | |
226 | %defattr(644,root,root,755) | |
227 | %doc AUTHORS ChangeLog NEWS README | |
228 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5.so.*.*.* | |
229 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt5.so.0 | |
230 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-farstream.so.*.*.* | |
231 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt5-farstream.so.0 | |
c8f93029 | 232 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-service.so.*.*.* |
18703470 | 233 | %attr(755,root,root) %ghost %{_libdir}/libtelepathy-qt5-service.so.0 |
cac18b25 JB |
234 | |
235 | %files -n telepathy-qt5-devel | |
236 | %defattr(644,root,root,755) | |
237 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5.so | |
238 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-farstream.so | |
c8f93029 | 239 | %attr(755,root,root) %{_libdir}/libtelepathy-qt5-service.so |
cac18b25 JB |
240 | %{_libdir}/cmake/TelepathyQt5 |
241 | %{_libdir}/cmake/TelepathyQt5Farstream | |
96bc7e81 | 242 | %{_libdir}/cmake/TelepathyQt5Service |
cac18b25 JB |
243 | %{_includedir}/telepathy-qt5 |
244 | %{_pkgconfigdir}/TelepathyQt5.pc | |
245 | %{_pkgconfigdir}/TelepathyQt5Farstream.pc | |
96bc7e81 | 246 | %{_pkgconfigdir}/TelepathyQt5Service.pc |
cac18b25 | 247 | %endif |