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 build_test_suite OFF
38 Summary: Sensor daemon
39 Group: System/Sensor Framework
40 Requires: %{name} = %{version}-%{release}
45 %package -n libsensord
46 Summary: Sensord library
47 Group: System/Libraries
48 Requires: %{name} = %{version}-%{release}
50 %description -n libsensord
53 %package -n libsensord-devel
54 Summary: Sensord library (devel)
55 Group: System/Development
56 Requires: %{name} = %{version}-%{release}
58 %description -n libsensord-devel
59 Sensord library (devel)
61 %if %{build_test_suite} == "ON"
62 %package -n sensor-test
63 Summary: Sensord library
65 Requires: %{name} = %{version}-%{release}
67 %description -n sensor-test
68 Sensor functional testing
77 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
78 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
79 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
80 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
81 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
82 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} \
83 -DTEST_SUITE=%{build_test_suite} \
84 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
93 %install_service multi-user.target.wants sensord.service
94 %install_service sockets.target.wants sensord.socket
97 systemctl daemon-reload
100 systemctl daemon-reload
102 %post -n libsensord -p /sbin/ldconfig
104 %postun -n libsensord -p /sbin/ldconfig
107 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
108 %attr(0644,root,root)/usr/etc/sensors.xml
109 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
110 %manifest sensord.manifest
112 %{_unitdir}/sensord.service
113 %{_unitdir}/sensord.socket
114 %{_unitdir}/multi-user.target.wants/sensord.service
115 %{_unitdir}/sockets.target.wants/sensord.socket
116 %license LICENSE.APLv2
119 %defattr(-,root,root,-)
120 %manifest libsensord.manifest
121 %{_libdir}/libsensor.so.*
122 %{_libdir}/sensord/*.so*
123 %{_libdir}/libsensord-share.so
124 %{_libdir}/libsensord-server.so
125 %license LICENSE.APLv2
127 %files -n libsensord-devel
128 %defattr(-,root,root,-)
129 %{_includedir}/sensor/*.h
130 %{_includedir}/sf_common/*.h
131 %{_libdir}/libsensor.so
132 %{_libdir}/pkgconfig/sensor.pc
133 %{_libdir}/pkgconfig/sf_common.pc
134 %{_libdir}/pkgconfig/sensord-server.pc
136 %if %{build_test_suite} == "ON"
137 %files -n sensor-test
138 %defattr(-,root,root,-)
141 %license LICENSE.APLv2