5 Group: System/Sensor Framework
7 Source0: %{name}-%{version}.tar.gz
8 Source1: sensord.manifest
9 Source2: libsensord.manifest
12 BuildRequires: vconf-keys-devel
13 BuildRequires: libattr-devel
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(libxml-2.0)
16 BuildRequires: pkgconfig(glib-2.0)
17 BuildRequires: pkgconfig(vconf)
18 BuildRequires: pkgconfig(libsystemd-daemon)
19 BuildRequires: pkgconfig(capi-system-info)
21 %define accel_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 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 -DTEST_SUITE=%{build_test_suite} \
83 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
92 %install_service multi-user.target.wants sensord.service
93 %install_service sockets.target.wants sensord.socket
96 systemctl daemon-reload
99 systemctl daemon-reload
101 %post -n libsensord -p /sbin/ldconfig
103 %postun -n libsensord -p /sbin/ldconfig
106 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
107 %attr(0644,root,root)/usr/etc/sensors.xml
108 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
109 %manifest sensord.manifest
111 %{_unitdir}/sensord.service
112 %{_unitdir}/sensord.socket
113 %{_unitdir}/multi-user.target.wants/sensord.service
114 %{_unitdir}/sockets.target.wants/sensord.socket
115 %license LICENSE.APLv2
118 %defattr(-,root,root,-)
119 %manifest libsensord.manifest
120 %{_libdir}/libsensor.so.*
121 %{_libdir}/sensord/*.so*
122 %{_libdir}/libsensord-share.so
123 %{_libdir}/libsensord-server.so
124 %license LICENSE.APLv2
126 %files -n libsensord-devel
127 %defattr(-,root,root,-)
128 %{_includedir}/sensor/*.h
129 %{_includedir}/sf_common/*.h
130 %{_libdir}/libsensor.so
131 %{_libdir}/pkgconfig/sensor.pc
132 %{_libdir}/pkgconfig/sf_common.pc
133 %{_libdir}/pkgconfig/sensord-server.pc
135 %if %{build_test_suite} == "ON"
136 %files -n sensor-test
137 %defattr(-,root,root,-)
138 %{_bindir}/accelerometer
139 %{_bindir}/geomagnetic
140 %{_bindir}/orientation
142 %{_bindir}/linear_acceleration
146 %{_bindir}/temperature
148 %{_bindir}/rotation_vector
149 %license LICENSE.APLv2