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