5 Group: System/Sensor Framework
7 Source0: %{name}-%{version}.tar.gz
8 Source1: sensord.manifest
9 Source2: libsensord.manifest
12 BuildRequires: libattr-devel
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(libxml-2.0)
15 BuildRequires: pkgconfig(glib-2.0)
16 BuildRequires: pkgconfig(vconf)
17 BuildRequires: pkgconfig(libsystemd-daemon)
18 BuildRequires: pkgconfig(capi-system-info)
19 BuildRequires: pkgconfig(cynara-creds-socket)
20 BuildRequires: pkgconfig(cynara-client)
21 BuildRequires: pkgconfig(cynara-session)
22 Requires: libsensord = %{version}-%{release}
24 %define auto_rotation_state ON
25 %define orientation_state OFF
26 %define gravity_state OFF
27 %define linear_accel_state OFF
29 %define geomagnetic_rv_state OFF
30 %define gaming_rv_state OFF
31 %define tilt_state OFF
32 %define gyroscope_uncal_state OFF
33 %define build_test_suite ON
38 %package -n libsensord
39 Summary: Sensord library
40 Group: System/Libraries
41 Requires: %{name} = %{version}-%{release}
43 %description -n libsensord
46 %package -n libsensord-devel
47 Summary: Sensord shared library
48 Group: System/Development
49 Requires: libsensord = %{version}-%{release}
51 %description -n libsensord-devel
52 Sensord shared library
54 %package -n sensor-hal-devel
55 Summary: Sensord HAL interface
56 Group: System/Development
58 %description -n sensor-hal-devel
61 %if %{build_test_suite} == "ON"
62 %package -n sensor-test
63 Summary: Sensord library
66 %description -n sensor-test
67 Sensor functional testing
76 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
78 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} \
79 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
80 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
81 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
82 -DGYROSCOPE_UNCAL=%{gyroscope_uncal_state} -DAUTO_ROTATION=%{auto_rotation_state} \
83 -DTILT=%{tilt_state} -DTEST_SUITE=%{build_test_suite}
92 %install_service multi-user.target.wants sensord.service
93 %install_service sockets.target.wants sensord.socket
96 systemctl daemon-reload
99 systemctl daemon-reload
101 %post -n libsensord -p /sbin/ldconfig
103 %postun -n libsensord -p /sbin/ldconfig
106 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
107 %manifest sensord.manifest
109 %{_unitdir}/sensord.service
110 %{_unitdir}/sensord.socket
111 %{_unitdir}/multi-user.target.wants/sensord.service
112 %{_unitdir}/sockets.target.wants/sensord.socket
113 %license LICENSE.APLv2
116 %defattr(-,root,root,-)
117 %manifest libsensord.manifest
118 %{_libdir}/libsensor.so.*
119 %{_libdir}/libsensord-shared.so
120 %license LICENSE.APLv2
122 %files -n libsensord-devel
123 %defattr(-,root,root,-)
124 %{_includedir}/sensor/*.h
125 %{_libdir}/libsensor.so
126 %{_libdir}/pkgconfig/sensor.pc
127 %license LICENSE.APLv2
129 %files -n sensor-hal-devel
130 %defattr(-,root,root,-)
131 %{_includedir}/sensor/sensor_hal.h
132 %license LICENSE.APLv2
134 %if %{build_test_suite} == "ON"
135 %files -n sensor-test
136 %defattr(-,root,root,-)
138 %{_bindir}/sensor-test
139 %{_bindir}/multi-thread-performance-test
140 %{_bindir}/multi-process-performance-test
141 %{_bindir}/fusion-data-collection
142 %license LICENSE.APLv2