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 OFF
25 %define gyro_state OFF
26 %define proxi_state OFF
27 %define light_state OFF
29 %define pressure_state OFF
30 %define temperature_state OFF
31 %define ultraviolet_state OFF
32 %define orientation_state OFF
33 %define gravity_state OFF
34 %define linear_accel_state OFF
36 %define rv_raw_state OFF
37 %define geomagnetic_rv_state OFF
38 %define gaming_rv_state OFF
39 %define tilt_state OFF
40 %define uncal_gyro_state OFF
41 %define bio_led_red_state OFF
42 %define build_test_suite ON
48 Summary: Sensor daemon
49 Group: System/Sensor Framework
50 Requires: %{name} = %{version}-%{release}
55 %package -n libsensord
56 Summary: Sensord library
57 Group: System/Libraries
58 Requires: %{name} = %{version}-%{release}
60 %description -n libsensord
63 %package -n libsensord-devel
64 Summary: Sensord shared library
65 Group: System/Development
66 Requires: %{name} = %{version}-%{release}
68 %description -n libsensord-devel
69 Sensord shared library
71 %package -n libsensord-plugins
72 Summary: Sensord plugin library
73 Group: System/Development
74 Requires: %{name} = %{version}-%{release}
76 %description -n libsensord-plugins
77 Sensord plugin library
79 %if %{build_test_suite} == "ON"
80 %package -n sensor-test
81 Summary: Sensord library
83 Requires: %{name} = %{version}-%{release}
85 %description -n sensor-test
86 Sensor functional testing
95 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
96 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
97 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
98 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
99 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} -DRV_RAW=%{rv_raw_state} \
100 -DGEOMAGNETIC_RV=%{geomagnetic_rv_state} -DGAMING_RV=%{gaming_rv_state} \
101 -DUNCAL_GYRO=%{uncal_gyro_state} -DAUTO_ROTATION=%{auto_rotation_state} \
102 -DTILT=%{tilt_state} -DULTRAVIOLET=%{ultraviolet_state} \
103 -DBIO_LED_RED=%{bio_led_red_state} -DTEST_SUITE=%{build_test_suite} \
104 -DLIBDIR=%{_libdir} -DINCLUDEDIR=%{_includedir}
107 make %{?jobs:-j%jobs}
113 %install_service multi-user.target.wants sensord.service
114 %install_service sockets.target.wants sensord.socket
117 systemctl daemon-reload
120 systemctl daemon-reload
122 %post -n libsensord -p /sbin/ldconfig
124 %postun -n libsensord -p /sbin/ldconfig
127 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
128 %manifest sensord.manifest
130 %{_unitdir}/sensord.service
131 %{_unitdir}/sensord.socket
132 %{_unitdir}/multi-user.target.wants/sensord.service
133 %{_unitdir}/sockets.target.wants/sensord.socket
134 %license LICENSE.APLv2
137 %defattr(-,root,root,-)
138 %manifest libsensord.manifest
139 %{_libdir}/libsensor.so.*
140 %{_libdir}/libsensord-devel.so
141 %license LICENSE.APLv2
143 %files -n libsensord-devel
144 %defattr(-,root,root,-)
145 %{_includedir}/sensor/*.h
146 %{_includedir}/sensord-devel/*.h
147 %{_libdir}/libsensor.so
148 %{_libdir}/pkgconfig/sensor.pc
149 %license LICENSE.APLv2
151 %files -n libsensord-plugins
152 %defattr(-,root,root,-)
153 %{_libdir}/libsensord-plugins.so
154 %license LICENSE.APLv2
156 %if %{build_test_suite} == "ON"
157 %files -n sensor-test
158 %defattr(-,root,root,-)
160 %{_bindir}/sensor-test
161 %{_bindir}/multi-thread-performance-test
162 %{_bindir}/multi-process-performance-test
163 %{_bindir}/fusion-data-collection
164 %license LICENSE.APLv2