]>
Commit | Line | Data |
---|---|---|
607a196f | 1 | # maybe TODO: |
607a196f | 2 | # plugins/position/simulator (BR: Qt5Simulator) |
3d971d75 JB |
3 | # |
4 | # Conditional build: | |
d3b65055 ER |
5 | %bcond_with bootstrap # disable features to able to build without installed qt5 |
6 | # -- build targets | |
3d971d75 | 7 | %bcond_without qch # documentation in QCH format |
52e14148 | 8 | %bcond_without qm # QM translations |
9bb89c72 | 9 | |
d3b65055 ER |
10 | %if %{with bootstrap} |
11 | %undefine with_qch | |
12 | %undefine with_qm | |
13 | %endif | |
14 | ||
3d971d75 | 15 | %define qtbase_ver %{version} |
607a196f | 16 | %define qtdeclarative_ver %{version} |
5b304dd9 | 17 | %define qttools_ver 5.4 |
9bb89c72 | 18 | %define orgname qtlocation |
3d971d75 JB |
19 | Summary: The Qt5 Location library |
20 | Summary(pl.UTF-8): Biblioteka Qt5 Location | |
9bb89c72 | 21 | Name: qt5-%{orgname} |
a6135b9d | 22 | Version: 5.5.1 |
cf2bc583 | 23 | Release: 1 |
607a196f | 24 | License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0 |
3d971d75 | 25 | Group: Libraries |
a6135b9d JB |
26 | Source0: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz |
27 | # Source0-md5: 9e0c0ad76f520ba89da730b8ff601cc2 | |
28 | Source1: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/qttranslations-opensource-src-%{version}.tar.xz | |
29 | # Source1-md5: 1f89d53fe759db123b4b6d9de9d9e8c9 | |
30 | URL: http://www.qt.io/ | |
607a196f JB |
31 | BuildRequires: GConf2-devel >= 2.0 |
32 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
33 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} | |
34 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
35 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
9bb89c72 WF |
36 | BuildRequires: geoclue-devel |
37 | BuildRequires: gypsy-devel | |
607a196f | 38 | BuildRequires: pkgconfig |
3d971d75 JB |
39 | %if %{with qch} |
40 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
41 | %endif | |
42 | BuildRequires: qt5-build >= %{qtbase_ver} | |
52e14148 | 43 | %{?with_qm:BuildRequires: qt5-linguist >= %{qttools_ver}} |
3d971d75 | 44 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
9bb89c72 | 45 | BuildRequires: rpmbuild(macros) >= 1.654 |
00ed2c7b ER |
46 | BuildRequires: tar >= 1:1.22 |
47 | BuildRequires: xz | |
9bb89c72 WF |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
9bb89c72 | 50 | %define specflags -fno-strict-aliasing |
3d971d75 | 51 | %define qt5dir %{_libdir}/qt5 |
9bb89c72 WF |
52 | |
53 | %description | |
3d971d75 JB |
54 | Qt is a cross-platform application and UI framework. Using Qt, you can |
55 | write web-enabled applications once and deploy them across desktop, | |
56 | mobile and embedded systems without rewriting the source code. | |
9bb89c72 | 57 | |
cbbb5d13 | 58 | This package contains Qt5 Location and Positioning libraries. |
3d971d75 JB |
59 | |
60 | %description -l pl.UTF-8 | |
61 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
62 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
63 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
64 | źródłowego. | |
65 | ||
cbbb5d13 | 66 | Ten pakiet zawiera biblioteki Qt5 Location i Positioning. |
3d971d75 | 67 | |
02624e45 JR |
68 | %package -n Qt5Location |
69 | Summary: The Qt5 Location library | |
70 | Summary(pl.UTF-8): Biblioteka Qt5 Location | |
71 | Group: Libraries | |
72 | Requires: Qt5Core >= %{qtbase_ver} | |
cbbb5d13 JB |
73 | Requires: Qt5Positioning = %{version}-%{release} |
74 | Requires: Qt5Gui >= %{qtbase_ver} | |
02624e45 JR |
75 | Requires: Qt5Quick >= %{qtdeclarative_ver} |
76 | Obsoletes: qt5-qtlocation | |
77 | ||
78 | %description -n Qt5Location | |
cbbb5d13 JB |
79 | Qt5 Location library provides mapping, navigation and place search via |
80 | QML and C++ interfaces. | |
02624e45 JR |
81 | |
82 | %description -n Qt5Location -l pl.UTF-8 | |
cbbb5d13 JB |
83 | Biblioteka Qt5 Location udostępnia mapy, nawigowanie oraz wyszukiwanie |
84 | miejsc poprzez interfejsy QML i C++. | |
02624e45 JR |
85 | |
86 | %package -n Qt5Location-devel | |
87 | Summary: Qt5 Location library - development files | |
88 | Summary(pl.UTF-8): Biblioteka Qt5 Location - pliki programistyczne | |
89 | Group: Development/Libraries | |
90 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
cbbb5d13 JB |
91 | Requires: Qt5Gui-devel >= %{qtbase_ver} |
92 | Requires: Qt5Location = %{version}-%{release} | |
93 | Requires: Qt5Positioning-devel = %{version}-%{release} | |
94 | Requires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
02624e45 JR |
95 | Obsoletes: qt5-qtlocation-devel |
96 | ||
97 | %description -n Qt5Location-devel | |
98 | Qt5 Location library - development files. | |
99 | ||
100 | %description -n Qt5Location-devel -l pl.UTF-8 | |
101 | Biblioteka Qt5 Location - pliki programistyczne. | |
102 | ||
3d971d75 JB |
103 | %package -n Qt5Positioning |
104 | Summary: The Qt5 Positioning library | |
105 | Summary(pl.UTF-8): Biblioteka Qt5 Positioning | |
106 | Group: Libraries | |
107 | Requires: Qt5Core >= %{qtbase_ver} | |
cbbb5d13 | 108 | # for plugins |
607a196f JB |
109 | Requires: Qt5Network >= %{qtbase_ver} |
110 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
111 | Requires: Qt5Quick >= %{qtdeclarative_ver} | |
3d971d75 JB |
112 | Obsoletes: qt5-qtlocation |
113 | ||
114 | %description -n Qt5Positioning | |
070a89b1 JB |
115 | Qt5 Positioning library provides positioning information via QML and |
116 | C++ interfaces. | |
9bb89c72 | 117 | |
4917e4c4 | 118 | %description -n Qt5Positioning -l pl.UTF-8 |
070a89b1 JB |
119 | Biblioteka Qt5 Positioning udostępnia informacje o położeniu poprzez |
120 | interfejsy QML i C++. | |
3d971d75 JB |
121 | |
122 | %package -n Qt5Positioning-devel | |
123 | Summary: Qt5 Positioning library - development files | |
124 | Summary(pl.UTF-8): Biblioteka Qt5 Positioning - pliki programistyczne | |
125 | Group: Development/Libraries | |
607a196f | 126 | Requires: Qt5Core-devel >= %{qtbase_ver} |
3d971d75 JB |
127 | Requires: Qt5Positioning = %{version}-%{release} |
128 | Obsoletes: qt5-qtlocation-devel | |
129 | ||
130 | %description -n Qt5Positioning-devel | |
131 | Qt5 Positioning library - development files. | |
132 | ||
133 | %description -n Qt5Positioning-devel -l pl.UTF-8 | |
134 | Biblioteka Qt5 Positioning - pliki programistyczne. | |
9bb89c72 WF |
135 | |
136 | %package doc | |
cbbb5d13 JB |
137 | Summary: Qt5 Location and Positioning documentation in HTML format |
138 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Location i Positioning w formacie HTML | |
9bb89c72 | 139 | Group: Documentation |
3d971d75 | 140 | Requires: qt5-doc-common >= %{qtbase_ver} |
00ed2c7b ER |
141 | %if "%{_rpmversion}" >= "5" |
142 | BuildArch: noarch | |
143 | %endif | |
9bb89c72 WF |
144 | |
145 | %description doc | |
cbbb5d13 | 146 | Qt5 Location and Positioning documentation in HTML format. |
3d971d75 JB |
147 | |
148 | %description doc -l pl.UTF-8 | |
cbbb5d13 | 149 | Dokumentacja do bibliotek Qt5 Location i Positioning w formacie HTML. |
3d971d75 JB |
150 | |
151 | %package doc-qch | |
cbbb5d13 JB |
152 | Summary: Qt5 Location and Positioning documentation in QCH format |
153 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Location i Positioning w formacie QCH | |
3d971d75 JB |
154 | Group: Documentation |
155 | Requires: qt5-doc-common >= %{qtbase_ver} | |
156 | %if "%{_rpmversion}" >= "5" | |
157 | BuildArch: noarch | |
158 | %endif | |
159 | ||
160 | %description doc-qch | |
cbbb5d13 | 161 | Qt5 Location and Positioning documentation in QCH format. |
3d971d75 JB |
162 | |
163 | %description doc-qch -l pl.UTF-8 | |
cbbb5d13 | 164 | Dokumentacja do bibliotek Qt5 Location i Positioning w formacie QCH. |
9bb89c72 WF |
165 | |
166 | %package examples | |
cbbb5d13 JB |
167 | Summary: Qt5 Location and Positioning examples |
168 | Summary(pl.UTF-8): Przykłady do bibliotek Qt5 Location i Positioning | |
9bb89c72 | 169 | Group: X11/Development/Libraries |
00ed2c7b ER |
170 | %if "%{_rpmversion}" >= "5" |
171 | BuildArch: noarch | |
172 | %endif | |
9bb89c72 WF |
173 | |
174 | %description examples | |
cbbb5d13 | 175 | Qt5 Location and Positioning examples. |
3d971d75 JB |
176 | |
177 | %description examples -l pl.UTF-8 | |
cbbb5d13 | 178 | Przykłady do bibliotek Qt5 Location i Positioning. |
9bb89c72 WF |
179 | |
180 | %prep | |
52e14148 | 181 | %setup -q -n %{orgname}-opensource-src-%{version} %{?with_qm:-a1} |
9bb89c72 WF |
182 | |
183 | %build | |
184 | qmake-qt5 | |
185 | %{__make} | |
3d971d75 | 186 | %{__make} %{!?with_qch:html_}docs |
9bb89c72 | 187 | |
52e14148 JB |
188 | %if %{with qm} |
189 | cd qttranslations-opensource-src-%{version} | |
190 | qmake-qt5 | |
191 | %{__make} | |
192 | cd .. | |
193 | %endif | |
194 | ||
9bb89c72 WF |
195 | %install |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | %{__make} install \ | |
198 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
199 | ||
3d971d75 | 200 | %{__make} install_%{!?with_qch:html_}docs \ |
9bb89c72 WF |
201 | INSTALL_ROOT=$RPM_BUILD_ROOT |
202 | ||
52e14148 JB |
203 | %if %{with qm} |
204 | %{__make} -C qttranslations-opensource-src-%{version} install \ | |
205 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
206 | # keep only qtlocation | |
a6135b9d | 207 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qmlviewer,qt,qtbase,qtconfig,qtconnectivity,qtdeclarative,qtmultimedia,qtquick1,qtquickcontrols,qtscript,qtwebsockets,qtxmlpatterns}_*.qm |
52e14148 JB |
208 | %endif |
209 | ||
cbbb5d13 JB |
210 | # kill unnecessary -L%{_libdir} from *.la, *.prl, *.pc |
211 | %{__sed} -i -e "s,-L%{_libdir} \?,,g" \ | |
212 | $RPM_BUILD_ROOT%{_libdir}/*.{la,prl} \ | |
213 | $RPM_BUILD_ROOT%{_pkgconfigdir}/*.pc | |
214 | ||
3d971d75 JB |
215 | # useless symlinks |
216 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.? | |
217 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
218 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
219 | ||
9bb89c72 WF |
220 | # Prepare some files list |
221 | ifecho() { | |
607a196f | 222 | r="$RPM_BUILD_ROOT$2" |
9bb89c72 WF |
223 | if [ -d "$r" ]; then |
224 | echo "%%dir $2" >> $1.files | |
225 | elif [ -x "$r" ] ; then | |
226 | echo "%%attr(755,root,root) $2" >> $1.files | |
227 | elif [ -f "$r" ]; then | |
228 | echo "$2" >> $1.files | |
229 | else | |
230 | echo "Error generation $1 files list!" | |
231 | echo "$r: no such file or directory!" | |
232 | return 1 | |
233 | fi | |
234 | } | |
607a196f JB |
235 | ifecho_tree() { |
236 | ifecho $1 $2 | |
237 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
238 | ifecho $1 $2/$f | |
239 | done | |
240 | } | |
9bb89c72 WF |
241 | |
242 | echo "%defattr(644,root,root,755)" > examples.files | |
02624e45 | 243 | ifecho_tree examples %{_examplesdir}/qt5/location |
607a196f | 244 | ifecho_tree examples %{_examplesdir}/qt5/positioning |
02624e45 | 245 | ifecho_tree examples %{_examplesdir}/qt5/qtpositioning |
9bb89c72 | 246 | |
52e14148 JB |
247 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
248 | find_qt5_qm() | |
249 | { | |
250 | name="$1" | |
251 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
252 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
253 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
254 | } | |
255 | ||
256 | echo '%defattr(644,root,root,755)' > qtlocation.lang | |
257 | %if %{with qm} | |
258 | find_qt5_qm qtlocation >> qtlocation.lang | |
259 | %endif | |
260 | ||
9bb89c72 WF |
261 | %clean |
262 | rm -rf $RPM_BUILD_ROOT | |
263 | ||
02624e45 JR |
264 | %post -n Qt5Location -p /sbin/ldconfig |
265 | %postun -n Qt5Location -p /sbin/ldconfig | |
266 | ||
3d971d75 JB |
267 | %post -n Qt5Positioning -p /sbin/ldconfig |
268 | %postun -n Qt5Positioning -p /sbin/ldconfig | |
9bb89c72 | 269 | |
02624e45 JR |
270 | %files -n Qt5Location -f qtlocation.lang |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) %{_libdir}/libQt5Location.so.*.*.* | |
273 | %attr(755,root,root) %ghost %{_libdir}/libQt5Location.so.5 | |
274 | %dir %{qt5dir}/plugins/geoservices | |
a6135b9d | 275 | %attr(755,root,root) %{qt5dir}/plugins/geoservices/libqtgeoservices_mapbox.so |
02624e45 JR |
276 | %attr(755,root,root) %{qt5dir}/plugins/geoservices/libqtgeoservices_nokia.so |
277 | %attr(755,root,root) %{qt5dir}/plugins/geoservices/libqtgeoservices_osm.so | |
278 | %dir %{qt5dir}/qml/QtLocation | |
279 | %attr(755,root,root) %{qt5dir}/qml/QtLocation/libdeclarative_location.so | |
280 | %{qt5dir}/qml/QtLocation/plugins.qmltypes | |
281 | %{qt5dir}/qml/QtLocation/qmldir | |
282 | ||
283 | %files -n Qt5Location-devel | |
284 | %defattr(644,root,root,755) | |
285 | %attr(755,root,root) %{_libdir}/libQt5Location.so | |
286 | %{_libdir}/libQt5Location.prl | |
287 | %{_includedir}/qt5/QtLocation | |
288 | %{_pkgconfigdir}/Qt5Location.pc | |
289 | %{_libdir}/cmake/Qt5Location | |
290 | %{qt5dir}/mkspecs/modules/qt_lib_location.pri | |
291 | %{qt5dir}/mkspecs/modules/qt_lib_location_private.pri | |
292 | ||
293 | %files -n Qt5Positioning | |
9bb89c72 | 294 | %defattr(644,root,root,755) |
3d971d75 JB |
295 | %attr(755,root,root) %{_libdir}/libQt5Positioning.so.*.*.* |
296 | %attr(755,root,root) %ghost %{_libdir}/libQt5Positioning.so.5 | |
607a196f JB |
297 | %dir %{qt5dir}/plugins/position |
298 | %attr(755,root,root) %{qt5dir}/plugins/position/libqtposition_geoclue.so | |
299 | %attr(755,root,root) %{qt5dir}/plugins/position/libqtposition_gypsy.so | |
300 | %attr(755,root,root) %{qt5dir}/plugins/position/libqtposition_positionpoll.so | |
0fef7162 | 301 | %dir %{qt5dir}/qml/QtPositioning |
607a196f JB |
302 | %attr(755,root,root) %{qt5dir}/qml/QtPositioning/libdeclarative_positioning.so |
303 | %{qt5dir}/qml/QtPositioning/plugins.qmltypes | |
304 | %{qt5dir}/qml/QtPositioning/qmldir | |
305 | ||
306 | %files -n Qt5Positioning-devel | |
9bb89c72 WF |
307 | %defattr(644,root,root,755) |
308 | %attr(755,root,root) %{_libdir}/libQt5Positioning.so | |
9bb89c72 | 309 | %{_libdir}/libQt5Positioning.prl |
9bb89c72 | 310 | %{_includedir}/qt5/QtPositioning |
3d971d75 JB |
311 | %{_pkgconfigdir}/Qt5Positioning.pc |
312 | %{_libdir}/cmake/Qt5Positioning | |
607a196f JB |
313 | %{qt5dir}/mkspecs/modules/qt_lib_positioning.pri |
314 | %{qt5dir}/mkspecs/modules/qt_lib_positioning_private.pri | |
9bb89c72 WF |
315 | |
316 | %files doc | |
317 | %defattr(644,root,root,755) | |
02624e45 | 318 | %{_docdir}/qt5-doc/qtlocation |
3d971d75 JB |
319 | %{_docdir}/qt5-doc/qtpositioning |
320 | ||
321 | %if %{with qch} | |
322 | %files doc-qch | |
323 | %defattr(644,root,root,755) | |
02624e45 | 324 | %{_docdir}/qt5-doc/qtlocation.qch |
3d971d75 JB |
325 | %{_docdir}/qt5-doc/qtpositioning.qch |
326 | %endif | |
9bb89c72 WF |
327 | |
328 | %files examples -f examples.files | |
607a196f JB |
329 | %defattr(644,root,root,755) |
330 | # XXX: dir shared with qt5-qtbase-examples | |
331 | %dir %{_examplesdir}/qt5 |