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 auto_rotation_state OFF
24 %define orientation_state OFF
25 %define gravity_state OFF
26 %define linear_accel_state OFF
28 %define geomagnetic_rv_state OFF
29 %define gaming_rv_state OFF
30 %define tilt_state OFF
31 %define gyroscope_uncal_state OFF
32 %define build_test_suite ON
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 shared library
55 Group: System/Development
56 Requires: %{name} = %{version}-%{release}
58 %description -n libsensord-devel
59 Sensord shared library
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} \
78 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
79 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
80 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
81 -DGYROSCOPE_UNCAL=%{gyroscope_uncal_state} -DAUTO_ROTATION=%{auto_rotation_state} \
82 -DTILT=%{tilt_state} -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/virtual_sensors.xml
107 %manifest sensord.manifest
109 %{_unitdir}/sensord.service
110 %{_unitdir}/sensord.socket
111 %{_unitdir}/multi-user.target.wants/sensord.service
112 %{_unitdir}/sockets.target.wants/sensord.socket
113 %license LICENSE.APLv2
116 %defattr(-,root,root,-)
117 %manifest libsensord.manifest
118 %{_libdir}/libsensor.so.*
119 %{_libdir}/libsensord-devel.so
120 %license LICENSE.APLv2
122 %files -n libsensord-devel
123 %defattr(-,root,root,-)
124 %{_includedir}/sensor/*.h
125 %{_includedir}/sensord-devel/*.h
126 %{_libdir}/libsensor.so
127 %{_libdir}/pkgconfig/sensor.pc
128 %license LICENSE.APLv2
130 %if %{build_test_suite} == "ON"
131 %files -n sensor-test
132 %defattr(-,root,root,-)
134 %{_bindir}/sensor-test
135 %{_bindir}/multi-thread-performance-test
136 %{_bindir}/multi-process-performance-test
137 %{_bindir}/fusion-data-collection
138 %license LICENSE.APLv2