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