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)
20 %define accel_state ON
21 %define auto_rotation_state ON
23 %define proxi_state ON
24 %define light_state ON
26 %define pressure_state ON
27 %define temperature_state ON
28 %define orientation_state ON
29 %define gravity_state ON
30 %define linear_accel_state ON
32 %define geomagnetic_rv_state ON
33 %define gaming_rv_state ON
35 %define uncal_gyro_state ON
36 %define build_test_suite OFF
42 Summary: Sensor daemon
43 Group: System/Sensor Framework
44 Requires: %{name} = %{version}-%{release}
49 %package -n libsensord
50 Summary: Sensord library
51 Group: System/Libraries
52 Requires: %{name} = %{version}-%{release}
54 %description -n libsensord
57 %package -n libsensord-devel
58 Summary: Sensord library (devel)
59 Group: System/Development
60 Requires: %{name} = %{version}-%{release}
62 %description -n libsensord-devel
63 Sensord library (devel)
65 %if %{build_test_suite} == "ON"
66 %package -n sensor-test
67 Summary: Sensord library
69 Requires: %{name} = %{version}-%{release}
71 %description -n sensor-test
72 Sensor functional testing
81 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
82 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
83 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
84 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
85 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
86 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
87 -DUNCAL_GYRO=%{uncal_gyro_state} -DAUTO_ROTATION=%{auto_rotation_state} \
88 -DTILT=%{tilt_state} -DTEST_SUITE=%{build_test_suite} \
89 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
98 %install_service multi-user.target.wants sensord.service
99 %install_service sockets.target.wants sensord.socket
102 systemctl daemon-reload
105 systemctl daemon-reload
107 %post -n libsensord -p /sbin/ldconfig
109 %postun -n libsensord -p /sbin/ldconfig
112 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
113 %attr(0644,root,root)/usr/etc/sensors.xml
114 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
115 %manifest sensord.manifest
117 %{_unitdir}/sensord.service
118 %{_unitdir}/sensord.socket
119 %{_unitdir}/multi-user.target.wants/sensord.service
120 %{_unitdir}/sockets.target.wants/sensord.socket
121 %license LICENSE.APLv2
124 %defattr(-,root,root,-)
125 %manifest libsensord.manifest
126 %{_libdir}/libsensor.so.*
127 %{_libdir}/sensord/*.so*
128 %{_libdir}/libsensord-share.so
129 %{_libdir}/libsensord-server.so
130 %license LICENSE.APLv2
132 %files -n libsensord-devel
133 %defattr(-,root,root,-)
134 %{_includedir}/sensor/*.h
135 %{_includedir}/sf_common/*.h
136 %{_libdir}/libsensor.so
137 %{_libdir}/pkgconfig/sensor.pc
138 %{_libdir}/pkgconfig/sf_common.pc
139 %{_libdir}/pkgconfig/sensord-server.pc
140 %license LICENSE.APLv2
142 %if %{build_test_suite} == "ON"
143 %files -n sensor-test
144 %defattr(-,root,root,-)
146 %{_bindir}/sensor-test
147 %{_bindir}/performance-test
148 %{_bindir}/fusion-data-collection
149 %license LICENSE.APLv2