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)
22 Requires: libsensord = %{version}-%{release}
24 %define auto_rotation_state OFF
25 %define orientation_state OFF
26 %define gravity_state OFF
27 %define linear_accel_state OFF
29 %define geomagnetic_rv_state OFF
30 %define gaming_rv_state OFF
31 %define tilt_state OFF
32 %define gyroscope_uncal_state OFF
33 %define build_test_suite ON
38 %package -n libsensord
39 Summary: Sensord library
40 Group: System/Libraries
42 %description -n libsensord
45 %package -n libsensord-devel
46 Summary: Sensord shared library
47 Group: System/Development
48 Requires: libsensord = %{version}-%{release}
50 %description -n libsensord-devel
51 Sensord shared library
53 %if %{build_test_suite} == "ON"
54 %package -n sensor-test
55 Summary: Sensord library
58 %description -n sensor-test
59 Sensor functional testing
68 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
69 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
70 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
71 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
72 -DGYROSCOPE_UNCAL=%{gyroscope_uncal_state} -DAUTO_ROTATION=%{auto_rotation_state} \
73 -DTILT=%{tilt_state} -DTEST_SUITE=%{build_test_suite} \
74 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
83 %install_service multi-user.target.wants sensord.service
84 %install_service sockets.target.wants sensord.socket
87 systemctl daemon-reload
90 systemctl daemon-reload
92 %post -n libsensord -p /sbin/ldconfig
94 %postun -n libsensord -p /sbin/ldconfig
97 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
98 %manifest sensord.manifest
100 %{_unitdir}/sensord.service
101 %{_unitdir}/sensord.socket
102 %{_unitdir}/multi-user.target.wants/sensord.service
103 %{_unitdir}/sockets.target.wants/sensord.socket
104 %license LICENSE.APLv2
107 %defattr(-,root,root,-)
108 %manifest libsensord.manifest
109 %{_libdir}/libsensor.so.*
110 %{_libdir}/libsensord-devel.so
111 %license LICENSE.APLv2
113 %files -n libsensord-devel
114 %defattr(-,root,root,-)
115 %{_includedir}/sensor/*.h
116 %{_includedir}/sensord-devel/*.h
117 %{_libdir}/libsensor.so
118 %{_libdir}/pkgconfig/sensor.pc
119 %license LICENSE.APLv2
121 %if %{build_test_suite} == "ON"
122 %files -n sensor-test
123 %defattr(-,root,root,-)
125 %{_bindir}/sensor-test
126 %{_bindir}/multi-thread-performance-test
127 %{_bindir}/multi-process-performance-test
128 %{_bindir}/fusion-data-collection
129 %license LICENSE.APLv2