5 Group: System/Sensor Framework
7 Source0: %{name}-%{version}.tar.gz
8 Source1: sensord.service
9 Source2: sensord.socket
11 %define accel_state ON
13 %define proxi_state ON
14 %define light_state ON
16 %define pressure_state ON
17 %define temperature_state ON
18 %define orientation_state ON
19 %define gravity_state ON
20 %define linear_accel_state ON
23 %define build_test_suite OFF
26 BuildRequires: vconf-keys-devel
27 BuildRequires: libattr-devel
28 BuildRequires: pkgconfig(dlog)
29 BuildRequires: pkgconfig(libxml-2.0)
30 BuildRequires: pkgconfig(glib-2.0)
31 BuildRequires: pkgconfig(vconf)
32 BuildRequires: pkgconfig(libsystemd-daemon)
33 BuildRequires: pkgconfig(capi-system-info)
39 Summary: Sensor daemon
40 Group: System/Sensor Framework
41 Requires: %{name} = %{version}-%{release}
46 %package -n libsensord
47 Summary: Sensord library
48 Group: System/Sensor Framework
49 Requires: %{name} = %{version}-%{release}
51 %description -n libsensord
54 %package -n libsensord-devel
55 Summary: Sensord library (devel)
56 Group: System/Sensor Framework
57 Requires: %{name} = %{version}-%{release}
59 %description -n libsensord-devel
60 Sensord library (devel)
62 %if %{build_test_suite} == "ON"
64 Summary: Sensord library
65 Group: System/Sensor Framework
66 Requires: %{name} = %{version}-%{release}
68 %description -n sensor-tc
69 Sensor functional testing
77 #CFLAGS+=" -fvisibility=hidden "; export CFLAGS
78 #CXXFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden ";export CXXFLAGS
79 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
80 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
81 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
82 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
83 -DLINEAR_ACCEL=%{linear_accel_state} -DRV=%{rv_state} \
84 -DTEST_SUITE=%{build_test_suite}
92 mkdir -p %{buildroot}/usr/share/license
93 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
94 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
95 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}
96 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}
97 ln -s ../sensord.socket %{buildroot}%{_unitdir}/sockets.target.wants/sensord.socket
98 ln -s ../sensord.service %{buildroot}%{_unitdir}/multi-user.target.wants/sensord.service
100 %post -p /sbin/ldconfig
101 systemctl daemon-reload
103 %postun -p /sbin/ldconfig
104 systemctl daemon-reload
107 %manifest sensord.manifest
109 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
110 %attr(0644,root,root)/usr/etc/sensors.xml
111 %attr(0644,root,root)/usr/etc/virtual_sensors.xml
112 %{_unitdir}/sensord.service
113 %{_unitdir}/sensord.socket
114 %{_unitdir}/multi-user.target.wants/sensord.service
115 %{_unitdir}/sockets.target.wants/sensord.socket
116 %license LICENSE.APLv2
117 %{_datadir}/license/sensord
120 %manifest libsensord.manifest
121 %defattr(-,root,root,-)
122 %{_libdir}/libsensor.so.*
123 %{_libdir}/sensord/*.so*
124 %{_libdir}/libsensord-share.so
125 %{_libdir}/libsensord-server.so
126 %license LICENSE.APLv2
127 %{_datadir}/license/libsensord
129 %files -n libsensord-devel
130 %defattr(-,root,root,-)
131 %{_includedir}/sensor/*.h
132 %{_includedir}/sf_common/*.h
133 %{_libdir}/libsensor.so
134 %{_libdir}/pkgconfig/sensor.pc
135 %{_libdir}/pkgconfig/sf_common.pc
136 %{_libdir}/pkgconfig/sensord-server.pc
138 %if %{build_test_suite} == "ON"
140 %defattr(-,root,root,-)
141 /usr/bin/accelerometer
145 /usr/bin/linear_acceleration
151 /usr/bin/rotation_vector
153 %license LICENSE.APLv2
154 %{_datadir}/license/test