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
22 %define proxi_state ON
23 %define light_state ON
25 %define pressure_state ON
26 %define temperature_state ON
27 %define orientation_state ON
28 %define gravity_state ON
29 %define linear_accel_state ON
31 %define geomagnetic_rv_state ON
32 %define gaming_rv_state ON
33 %define fusion_state ON
34 %define build_test_suite OFF
40 Summary: Sensor daemon
41 Group: System/Sensor Framework
42 Requires: %{name} = %{version}-%{release}
47 %package -n libsensord
48 Summary: Sensord library
49 Group: System/Libraries
50 Requires: %{name} = %{version}-%{release}
52 %description -n libsensord
55 %package -n libsensord-devel
56 Summary: Sensord library (devel)
57 Group: System/Development
58 Requires: %{name} = %{version}-%{release}
60 %description -n libsensord-devel
61 Sensord library (devel)
63 %if %{build_test_suite} == "ON"
64 %package -n sensor-test
65 Summary: Sensord library
67 Requires: %{name} = %{version}-%{release}
69 %description -n sensor-test
70 Sensor functional testing
79 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
80 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
81 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
82 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
83 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
84 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
85 -DFUSION=%{fusion_state} -DTEST_SUITE=%{build_test_suite} \
86 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
95 %install_service multi-user.target.wants sensord.service
96 %install_service sockets.target.wants sensord.socket
99 systemctl daemon-reload
102 systemctl daemon-reload
104 %post -n libsensord -p /sbin/ldconfig
106 %postun -n libsensord -p /sbin/ldconfig
109 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
110 %attr(0644,root,root)/usr/etc/sensors.xml
111 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
112 %manifest sensord.manifest
114 %{_unitdir}/sensord.service
115 %{_unitdir}/sensord.socket
116 %{_unitdir}/multi-user.target.wants/sensord.service
117 %{_unitdir}/sockets.target.wants/sensord.socket
118 %license LICENSE.APLv2
121 %defattr(-,root,root,-)
122 %manifest libsensord.manifest
123 %{_libdir}/libsensor.so.*
124 %{_libdir}/sensord/*.so*
125 %{_libdir}/libsensord-share.so
126 %{_libdir}/libsensord-server.so
127 %license LICENSE.APLv2
129 %files -n libsensord-devel
130 %defattr(-,root,root,-)
131 %{_includedir}/sensor/*.h
132 %{_includedir}/sf_common/*.h
133 %{_libdir}/libsensor.so
134 %{_libdir}/pkgconfig/sensor.pc
135 %{_libdir}/pkgconfig/sf_common.pc
136 %{_libdir}/pkgconfig/sensord-server.pc
138 %if %{build_test_suite} == "ON"
139 %files -n sensor-test
140 %defattr(-,root,root,-)
142 %{_bindir}/sensor-test
143 %license LICENSE.APLv2