5 Group: System/Sensor Framework
7 Source0: %{name}-%{version}.tar.gz
8 Source1: sensord.service
9 Source2: sensord_command.socket
10 Source3: sensord_event.socket
14 BuildRequires: libattr-devel
15 BuildRequires: pkgconfig(dlog)
16 BuildRequires: pkgconfig(libxml-2.0)
17 BuildRequires: pkgconfig(glib-2.0)
18 BuildRequires: pkgconfig(vconf)
19 BuildRequires: pkgconfig(libsystemd-daemon)
20 BuildRequires: pkgconfig(capi-system-info)
21 BuildRequires: pkgconfig(cynara-creds-socket)
22 BuildRequires: pkgconfig(cynara-client)
23 BuildRequires: pkgconfig(cynara-session)
24 Requires: libsensord = %{version}-%{release}
26 %define auto_rotation_state ON
27 %define orientation_state OFF
28 %define gravity_state OFF
29 %define linear_accel_state OFF
31 %define geomagnetic_rv_state OFF
32 %define gaming_rv_state OFF
33 %define tilt_state OFF
34 %define gyroscope_uncal_state OFF
35 %define build_test_suite ON
40 %package -n libsensord
41 Summary: Sensord library
42 Group: System/Libraries
43 Requires: %{name} = %{version}-%{release}
45 %description -n libsensord
48 %package -n libsensord-devel
49 Summary: Sensord shared library
50 Group: System/Development
51 Requires: libsensord = %{version}-%{release}
53 %description -n libsensord-devel
54 Sensord shared library
56 %package -n sensor-hal-devel
57 Summary: Sensord HAL interface
58 Group: System/Development
60 %description -n sensor-hal-devel
63 %if %{build_test_suite} == "ON"
64 %package -n sensor-test
65 Summary: Sensord library
68 %description -n sensor-test
69 Sensor functional testing
76 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
78 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} \
79 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
80 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
81 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
82 -DGYROSCOPE_UNCAL=%{gyroscope_uncal_state} -DAUTO_ROTATION=%{auto_rotation_state} \
83 -DTILT=%{tilt_state} -DTEST_SUITE=%{build_test_suite}
92 mkdir -p %{buildroot}%{_unitdir}
94 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}
95 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}
96 install -m 0644 %SOURCE3 %{buildroot}%{_unitdir}
98 %install_service multi-user.target.wants sensord.service
99 %install_service sockets.target.wants sensord_event.socket
100 %install_service sockets.target.wants sensord_command.socket
103 systemctl daemon-reload
106 systemctl daemon-reload
109 ln -sf %{_libdir}/libsensor.so.%{version} %{_libdir}/libsensor.so.1
112 %postun -n libsensord
116 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
117 %manifest packaging/sensord.manifest
119 %{_unitdir}/sensord.service
120 %{_unitdir}/sensord_command.socket
121 %{_unitdir}/sensord_event.socket
122 %{_unitdir}/multi-user.target.wants/sensord.service
123 %{_unitdir}/sockets.target.wants/sensord_command.socket
124 %{_unitdir}/sockets.target.wants/sensord_event.socket
125 %license LICENSE.APLv2
128 %defattr(-,root,root,-)
129 %manifest packaging/libsensord.manifest
130 %{_libdir}/libsensor.so.*
131 %{_libdir}/libsensord-shared.so
132 %license LICENSE.APLv2
134 %files -n libsensord-devel
135 %defattr(-,root,root,-)
136 %{_includedir}/sensor/*.h
137 %{_libdir}/libsensor.so
138 %{_libdir}/pkgconfig/sensor.pc
139 %license LICENSE.APLv2
141 %files -n sensor-hal-devel
142 %defattr(-,root,root,-)
143 %{_includedir}/sensor/sensor_hal.h
144 %{_includedir}/sensor/sensor_hal_types.h
145 %license LICENSE.APLv2
147 %if %{build_test_suite} == "ON"
148 %files -n sensor-test
149 %defattr(-,root,root,-)
151 %{_bindir}/sensor-test
152 %{_bindir}/multi-thread-performance-test
153 %{_bindir}/multi-process-performance-test
154 %{_bindir}/fusion-data-collection
155 %license LICENSE.APLv2