]>
Commit | Line | Data |
---|---|---|
cfaa89c4 JB |
1 | # maybe TODO: |
2 | # plugins/simulator (BR: Qt5Simulator) | |
3 | # plugins/sensorfw for MeeGo (sensorfw / sensord-qt) | |
b4bd0917 JB |
4 | # |
5 | # Conditional build: | |
6 | %bcond_without qch # documentation in QCH format | |
b03d19b4 WF |
7 | |
8 | %define orgname qtsensors | |
b4bd0917 JB |
9 | %define qtbase_ver %{version} |
10 | %define qtdeclarative_ver %{version} | |
11 | %define qttools_ver %{version} | |
12 | Summary: The Qt5 Sensors library | |
13 | Summary(pl.UTF-8): Biblioteka Qt5 Sensors | |
b03d19b4 | 14 | Name: qt5-%{orgname} |
068176f7 | 15 | Version: 5.3.2 |
cfaa89c4 JB |
16 | Release: 1 |
17 | License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0 | |
b03d19b4 | 18 | Group: X11/Libraries |
cfaa89c4 | 19 | Source0: http://download.qt-project.org/official_releases/qt/5.3/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz |
068176f7 | 20 | # Source0-md5: d0a8dc3173bfc9dc9f2632d509a76e6f |
b03d19b4 | 21 | URL: http://qt-project.org/ |
cfaa89c4 JB |
22 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
23 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
24 | BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver} | |
b4bd0917 JB |
25 | %if %{with qch} |
26 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
27 | %endif | |
28 | BuildRequires: qt5-build >= %{qtbase_ver} | |
29 | BuildRequires: qt5-qmake >= %{qtbase_ver} | |
b03d19b4 | 30 | BuildRequires: rpmbuild(macros) >= 1.654 |
8a5a7608 ER |
31 | BuildRequires: tar >= 1:1.22 |
32 | BuildRequires: xz | |
b03d19b4 WF |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
b03d19b4 | 35 | %define specflags -fno-strict-aliasing |
b4bd0917 | 36 | %define qt5dir %{_libdir}/qt5 |
b03d19b4 WF |
37 | |
38 | %description | |
b4bd0917 JB |
39 | Qt is a cross-platform application and UI framework. Using Qt, you can |
40 | write web-enabled applications once and deploy them across desktop, | |
41 | mobile and embedded systems without rewriting the source code. | |
b03d19b4 | 42 | |
06db43ef | 43 | This package contains Qt5 Sensors library. |
b4bd0917 JB |
44 | |
45 | %description -l pl.UTF-8 | |
46 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
47 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
48 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
49 | źródłowego. | |
50 | ||
06db43ef | 51 | Ten pakiet zawiera bibliotekę Qt5 Sensors. |
b4bd0917 JB |
52 | |
53 | %package -n Qt5Sensors | |
54 | Summary: The Qt5 Sensors library | |
55 | Summary(pl.UTF-8): Biblioteka Qt5 Sensors | |
56 | Group: Libraries | |
57 | Requires: Qt5Core >= %{qtbase_ver} | |
cfaa89c4 | 58 | Requires: Qt5Qml >= %{qtdeclarative_ver} |
b4bd0917 JB |
59 | Obsoletes: qt5-qtsensors |
60 | ||
61 | %description -n Qt5Sensors | |
cfaa89c4 | 62 | Qt5 Sensors library provides classes for reading sensor data. |
b03d19b4 | 63 | |
0b04286c | 64 | %description -n Qt5Sensors -l pl.UTF-8 |
cfaa89c4 | 65 | Biblioteka Qt5 Sensors dostarcza klasy do odczytu danych z czujników. |
b4bd0917 JB |
66 | |
67 | %package -n Qt5Sensors-devel | |
68 | Summary: Qt5 Sensors library - development files | |
69 | Summary(pl.UTF-8): Biblioteka Qt5 Sensors - pliki programistyczne | |
70 | Group: Development/Libraries | |
71 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
72 | Requires: Qt5Sensors = %{version}-%{release} | |
73 | Obsoletes: qt5-qtsensors-devel | |
74 | ||
75 | %description -n Qt5Sensors-devel | |
76 | Qt5 Sensors library - development files. | |
77 | ||
78 | %description -n Qt5Sensors-devel -l pl.UTF-8 | |
79 | Biblioteka Qt5 Sensors - pliki programistyczne. | |
b03d19b4 WF |
80 | |
81 | %package doc | |
b4bd0917 JB |
82 | Summary: Qt5 Sensors documentation in HTML format |
83 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Sensors w formacie HTML | |
b03d19b4 | 84 | Group: Documentation |
b4bd0917 | 85 | Requires: qt5-doc-common >= %{qtbase_ver} |
14502444 ER |
86 | %if "%{_rpmversion}" >= "5" |
87 | BuildArch: noarch | |
88 | %endif | |
b03d19b4 WF |
89 | |
90 | %description doc | |
b4bd0917 JB |
91 | Qt5 Sensors documentation in HTML format. |
92 | ||
93 | %description doc -l pl.UTF-8 | |
94 | Dokumentacja do biblioteki Qt5 Sensors w formacie HTML. | |
95 | ||
96 | %package doc-qch | |
97 | Summary: Qt5 Sensors documentation in QCH format | |
98 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Sensors w formacie QCH | |
99 | Group: Documentation | |
100 | Requires: qt5-doc-common >= %{qtbase_ver} | |
101 | %if "%{_rpmversion}" >= "5" | |
102 | BuildArch: noarch | |
103 | %endif | |
104 | ||
105 | %description doc-qch | |
106 | Qt5 Sensors documentation in QCH format. | |
107 | ||
108 | %description doc-qch -l pl.UTF-8 | |
109 | Dokumentacja do biblioteki Qt5 Sensors w formacie QCH. | |
b03d19b4 WF |
110 | |
111 | %package examples | |
112 | Summary: Qt5 Sensors examples | |
b4bd0917 | 113 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 Sensors |
b03d19b4 | 114 | Group: X11/Development/Libraries |
14502444 ER |
115 | %if "%{_rpmversion}" >= "5" |
116 | BuildArch: noarch | |
117 | %endif | |
b03d19b4 WF |
118 | |
119 | %description examples | |
b4bd0917 JB |
120 | Qt5 Sensors examples. |
121 | ||
122 | %description examples -l pl.UTF-8 | |
123 | Przykłady do biblioteki Qt5 Sensors. | |
b03d19b4 WF |
124 | |
125 | %prep | |
126 | %setup -q -n %{orgname}-opensource-src-%{version} | |
127 | ||
128 | %build | |
129 | qmake-qt5 | |
130 | %{__make} | |
b4bd0917 | 131 | %{__make} %{!?with_qch:html_}docs |
b03d19b4 WF |
132 | |
133 | %install | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | %{__make} install \ | |
136 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
137 | ||
b4bd0917 | 138 | %{__make} install_%{!?with_qch:html_}docs \ |
b03d19b4 WF |
139 | INSTALL_ROOT=$RPM_BUILD_ROOT |
140 | ||
b4bd0917 JB |
141 | # useless symlinks |
142 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.? | |
143 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
144 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
145 | ||
b03d19b4 WF |
146 | # Prepare some files list |
147 | ifecho() { | |
cfaa89c4 | 148 | r="$RPM_BUILD_ROOT$2" |
b03d19b4 WF |
149 | if [ -d "$r" ]; then |
150 | echo "%%dir $2" >> $1.files | |
151 | elif [ -x "$r" ] ; then | |
152 | echo "%%attr(755,root,root) $2" >> $1.files | |
153 | elif [ -f "$r" ]; then | |
154 | echo "$2" >> $1.files | |
155 | else | |
156 | echo "Error generation $1 files list!" | |
157 | echo "$r: no such file or directory!" | |
158 | return 1 | |
159 | fi | |
160 | } | |
cfaa89c4 JB |
161 | ifecho_tree() { |
162 | ifecho $1 $2 | |
163 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
164 | ifecho $1 $2/$f | |
165 | done | |
166 | } | |
b03d19b4 WF |
167 | |
168 | echo "%defattr(644,root,root,755)" > examples.files | |
cfaa89c4 JB |
169 | ifecho_tree examples %{_examplesdir}/qt5/qtsensors |
170 | ifecho_tree examples %{_examplesdir}/qt5/sensors | |
b03d19b4 WF |
171 | |
172 | %clean | |
173 | rm -rf $RPM_BUILD_ROOT | |
174 | ||
b4bd0917 JB |
175 | %post -n Qt5Sensors -p /sbin/ldconfig |
176 | %postun -n Qt5Sensors -p /sbin/ldconfig | |
b03d19b4 | 177 | |
b4bd0917 | 178 | %files -n Qt5Sensors |
b03d19b4 | 179 | %defattr(644,root,root,755) |
cfaa89c4 | 180 | %doc LGPL_EXCEPTION.txt dist/changes-* |
b4bd0917 JB |
181 | %attr(755,root,root) %{_libdir}/libQt5Sensors.so.*.*.* |
182 | %attr(755,root,root) %ghost %{_libdir}/libQt5Sensors.so.5 | |
cfaa89c4 JB |
183 | %dir %{qt5dir}/plugins/sensorgestures |
184 | %attr(755,root,root) %{qt5dir}/plugins/sensorgestures/libqtsensorgestures_counterplugin.so | |
185 | %attr(755,root,root) %{qt5dir}/plugins/sensorgestures/libqtsensorgestures_plugin.so | |
186 | %attr(755,root,root) %{qt5dir}/plugins/sensorgestures/libqtsensorgestures_shakeplugin.so | |
187 | %dir %{qt5dir}/plugins/sensors | |
188 | %attr(755,root,root) %{qt5dir}/plugins/sensors/libqtsensors_dummy.so | |
189 | %attr(755,root,root) %{qt5dir}/plugins/sensors/libqtsensors_generic.so | |
190 | %attr(755,root,root) %{qt5dir}/plugins/sensors/libqtsensors_linuxsys.so | |
191 | %dir %{qt5dir}/qml/QtSensors | |
192 | %attr(755,root,root) %{qt5dir}/qml/QtSensors/libdeclarative_sensors.so | |
193 | %{qt5dir}/qml/QtSensors/plugins.qmltypes | |
194 | %{qt5dir}/qml/QtSensors/qmldir | |
b03d19b4 | 195 | |
b4bd0917 | 196 | %files -n Qt5Sensors-devel |
b03d19b4 WF |
197 | %defattr(644,root,root,755) |
198 | %attr(755,root,root) %{_libdir}/libQt5Sensors.so | |
b03d19b4 | 199 | %{_libdir}/libQt5Sensors.prl |
b03d19b4 | 200 | %{_includedir}/qt5/QtSensors |
b4bd0917 JB |
201 | %{_pkgconfigdir}/Qt5Sensors.pc |
202 | %{_libdir}/cmake/Qt5Sensors | |
cfaa89c4 JB |
203 | %{qt5dir}/mkspecs/modules/qt_lib_sensors.pri |
204 | %{qt5dir}/mkspecs/modules/qt_lib_sensors_private.pri | |
b03d19b4 WF |
205 | |
206 | %files doc | |
207 | %defattr(644,root,root,755) | |
b4bd0917 JB |
208 | %{_docdir}/qt5-doc/qtsensors |
209 | ||
210 | %if %{with qch} | |
211 | %files doc-qch | |
212 | %defattr(644,root,root,755) | |
213 | %{_docdir}/qt5-doc/qtsensors.qch | |
214 | %endif | |
b03d19b4 WF |
215 | |
216 | %files examples -f examples.files | |
cfaa89c4 JB |
217 | %defattr(644,root,root,755) |
218 | # XXX: dir shared with qt5-qtbase-examples | |
219 | %dir %{_examplesdir}/qt5 |