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 ultraviolet_state ON
29 %define orientation_state ON
30 %define gravity_state ON
31 %define linear_accel_state ON
33 %define geomagnetic_rv_state ON
34 %define gaming_rv_state ON
36 %define uncal_gyro_state ON
37 %define bio_led_red_state ON
38 %define build_test_suite OFF
44 Summary: Sensor daemon
45 Group: System/Sensor Framework
46 Requires: %{name} = %{version}-%{release}
51 %package -n libsensord
52 Summary: Sensord library
53 Group: System/Libraries
54 Requires: %{name} = %{version}-%{release}
56 %description -n libsensord
59 %package -n libsensord-devel
60 Summary: Sensord library (devel)
61 Group: System/Development
62 Requires: %{name} = %{version}-%{release}
64 %description -n libsensord-devel
65 Sensord library (devel)
67 %if %{build_test_suite} == "ON"
68 %package -n sensor-test
69 Summary: Sensord library
71 Requires: %{name} = %{version}-%{release}
73 %description -n sensor-test
74 Sensor functional testing
83 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
84 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
85 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
86 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
87 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
88 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
89 -DUNCAL_GYRO=%{uncal_gyro_state} -DAUTO_ROTATION=%{auto_rotation_state} \
90 -DTILT=%{tilt_state} -DULTRAVIOLET=%{ultraviolet_state} \
91 -DBIO_LED_RED=%{bio_led_red_state} -DTEST_SUITE=%{build_test_suite} \
92 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
101 %install_service multi-user.target.wants sensord.service
102 %install_service sockets.target.wants sensord.socket
105 systemctl daemon-reload
108 systemctl daemon-reload
110 %post -n libsensord -p /sbin/ldconfig
112 %postun -n libsensord -p /sbin/ldconfig
115 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
116 %attr(0644,root,root)/usr/etc/sensors.xml
117 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
118 %manifest sensord.manifest
120 %{_unitdir}/sensord.service
121 %{_unitdir}/sensord.socket
122 %{_unitdir}/multi-user.target.wants/sensord.service
123 %{_unitdir}/sockets.target.wants/sensord.socket
124 %license LICENSE.APLv2
127 %defattr(-,root,root,-)
128 %manifest libsensord.manifest
129 %{_libdir}/libsensor.so.*
130 %{_libdir}/sensord/*.so*
131 %{_libdir}/libsensord-share.so
132 %{_libdir}/libsensord-server.so
133 %license LICENSE.APLv2
135 %files -n libsensord-devel
136 %defattr(-,root,root,-)
137 %{_includedir}/sensor/*.h
138 %{_includedir}/sf_common/*.h
139 %{_libdir}/libsensor.so
140 %{_libdir}/pkgconfig/sensor.pc
141 %{_libdir}/pkgconfig/sf_common.pc
142 %{_libdir}/pkgconfig/sensord-server.pc
143 %license LICENSE.APLv2
145 %if %{build_test_suite} == "ON"
146 %files -n sensor-test
147 %defattr(-,root,root,-)
149 %{_bindir}/sensor-test
150 %{_bindir}/multi-thread-performance-test
151 %{_bindir}/multi-process-performance-test
152 %{_bindir}/fusion-data-collection
153 %license LICENSE.APLv2