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)
19 BuildRequires: pkgconfig(cynara-creds-socket)
20 BuildRequires: pkgconfig(cynara-client)
21 BuildRequires: pkgconfig(cynara-session)
23 %define accel_state ON
24 %define auto_rotation_state ON
26 %define proxi_state ON
27 %define light_state ON
29 %define pressure_state ON
30 %define temperature_state ON
31 %define ultraviolet_state ON
32 %define orientation_state ON
33 %define gravity_state ON
34 %define linear_accel_state ON
36 %define geomagnetic_rv_state ON
37 %define gaming_rv_state ON
39 %define uncal_gyro_state ON
40 %define bio_led_red_state ON
41 %define build_test_suite ON
47 Summary: Sensor daemon
48 Group: System/Sensor Framework
49 Requires: %{name} = %{version}-%{release}
54 %package -n libsensord
55 Summary: Sensord library
56 Group: System/Libraries
57 Requires: %{name} = %{version}-%{release}
59 %description -n libsensord
62 %package -n libsensord-devel
63 Summary: Sensord shared library
64 Group: System/Development
65 Requires: %{name} = %{version}-%{release}
67 %description -n libsensord-devel
68 Sensord shared library
70 %package -n libsensord-plugins
71 Summary: Sensord plugin library
72 Group: System/Development
73 Requires: %{name} = %{version}-%{release}
75 %description -n libsensord-plugins
76 Sensord plugin library
78 %if %{build_test_suite} == "ON"
79 %package -n sensor-test
80 Summary: Sensord library
82 Requires: %{name} = %{version}-%{release}
84 %description -n sensor-test
85 Sensor functional testing
94 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
95 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
96 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
97 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
98 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
99 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
100 -DUNCAL_GYRO=%{uncal_gyro_state} -DAUTO_ROTATION=%{auto_rotation_state} \
101 -DTILT=%{tilt_state} -DULTRAVIOLET=%{ultraviolet_state} \
102 -DBIO_LED_RED=%{bio_led_red_state} -DTEST_SUITE=%{build_test_suite} \
103 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
106 make %{?jobs:-j%jobs}
112 %install_service multi-user.target.wants sensord.service
113 %install_service sockets.target.wants sensord.socket
116 systemctl daemon-reload
119 systemctl daemon-reload
121 %post -n libsensord -p /sbin/ldconfig
123 %postun -n libsensord -p /sbin/ldconfig
126 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
127 %manifest sensord.manifest
129 %{_unitdir}/sensord.service
130 %{_unitdir}/sensord.socket
131 %{_unitdir}/multi-user.target.wants/sensord.service
132 %{_unitdir}/sockets.target.wants/sensord.socket
133 %license LICENSE.APLv2
136 %defattr(-,root,root,-)
137 %manifest libsensord.manifest
138 %{_libdir}/libsensor.so.*
139 %{_libdir}/libsensord-devel.so
140 %license LICENSE.APLv2
142 %files -n libsensord-devel
143 %defattr(-,root,root,-)
144 %{_includedir}/sensor/*.h
145 %{_includedir}/sensord-devel/*.h
146 %{_libdir}/libsensor.so
147 %{_libdir}/pkgconfig/sensor.pc
148 %license LICENSE.APLv2
150 %files -n libsensord-plugins
151 %defattr(-,root,root,-)
152 %{_libdir}/libsensord-plugins.so
153 %license LICENSE.APLv2
155 %if %{build_test_suite} == "ON"
156 %files -n sensor-test
157 %defattr(-,root,root,-)
159 %{_bindir}/sensor-test
160 %{_bindir}/multi-thread-performance-test
161 %{_bindir}/multi-process-performance-test
162 %{_bindir}/fusion-data-collection
163 %license LICENSE.APLv2