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 build_test_suite OFF
37 Summary: Sensor daemon
38 Group: System/Sensor Framework
39 Requires: %{name} = %{version}-%{release}
44 %package -n libsensord
45 Summary: Sensord library
46 Group: System/Libraries
47 Requires: %{name} = %{version}-%{release}
49 %description -n libsensord
52 %package -n libsensord-devel
53 Summary: Sensord library (devel)
54 Group: System/Development
55 Requires: %{name} = %{version}-%{release}
57 %description -n libsensord-devel
58 Sensord library (devel)
60 %if %{build_test_suite} == "ON"
61 %package -n sensor-test
62 Summary: Sensord library
64 Requires: %{name} = %{version}-%{release}
66 %description -n sensor-test
67 Sensor functional testing
76 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
77 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
78 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
79 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
80 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
81 -DTEST_SUITE=%{build_test_suite} \
82 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
91 %install_service multi-user.target.wants sensord.service
92 %install_service sockets.target.wants sensord.socket
95 systemctl daemon-reload
98 systemctl daemon-reload
100 %post -n libsensord -p /sbin/ldconfig
102 %postun -n libsensord -p /sbin/ldconfig
105 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
106 %attr(0644,root,root)/usr/etc/sensors.xml
107 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
108 %manifest sensord.manifest
110 %{_unitdir}/sensord.service
111 %{_unitdir}/sensord.socket
112 %{_unitdir}/multi-user.target.wants/sensord.service
113 %{_unitdir}/sockets.target.wants/sensord.socket
114 %license LICENSE.APLv2
117 %defattr(-,root,root,-)
118 %manifest libsensord.manifest
119 %{_libdir}/libsensor.so.*
120 %{_libdir}/sensord/*.so*
121 %{_libdir}/libsensord-share.so
122 %{_libdir}/libsensord-server.so
123 %license LICENSE.APLv2
125 %files -n libsensord-devel
126 %defattr(-,root,root,-)
127 %{_includedir}/sensor/*.h
128 %{_includedir}/sf_common/*.h
129 %{_libdir}/libsensor.so
130 %{_libdir}/pkgconfig/sensor.pc
131 %{_libdir}/pkgconfig/sf_common.pc
132 %{_libdir}/pkgconfig/sensord-server.pc
134 %if %{build_test_suite} == "ON"
135 %files -n sensor-test
136 %defattr(-,root,root,-)
137 %{_bindir}/accelerometer
138 %{_bindir}/geomagnetic
139 %{_bindir}/orientation
141 %{_bindir}/linear_acceleration
145 %{_bindir}/temperature
147 %{_bindir}/rotation_vector
148 %license LICENSE.APLv2