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