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
22 %define build_test_suite OFF
25 BuildRequires: vconf-keys-devel
26 BuildRequires: libattr-devel
27 BuildRequires: pkgconfig(dlog)
28 BuildRequires: pkgconfig(libxml-2.0)
29 BuildRequires: pkgconfig(glib-2.0)
30 BuildRequires: pkgconfig(vconf)
31 BuildRequires: pkgconfig(libsystemd-daemon)
32 BuildRequires: pkgconfig(capi-system-info)
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/Sensor Framework
48 Requires: %{name} = %{version}-%{release}
50 %description -n libsensord
53 %package -n libsensord-devel
54 Summary: Sensord library (devel)
55 Group: System/Sensor Framework
56 Requires: %{name} = %{version}-%{release}
58 %description -n libsensord-devel
59 Sensord library (devel)
61 %if %{build_test_suite} == "ON"
63 Summary: Sensord library
64 Group: System/Sensor Framework
65 Requires: %{name} = %{version}-%{release}
67 %description -n sensor-tc
68 Sensor functional testing
76 #CFLAGS+=" -fvisibility=hidden "; export CFLAGS
77 #CXXFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden ";export CXXFLAGS
78 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DACCEL=%{accel_state} \
79 -DGYRO=%{gyro_state} -DPROXI=%{proxi_state} -DLIGHT=%{light_state} \
80 -DGEO=%{geo_state} -DPRESSURE=%{pressure_state} -DTEMPERATURE=%{temperature_state} \
81 -DORIENTATION=%{orientation_state} -DGRAVITY=%{gravity_state} \
82 -DLINEAR_ACCEL=%{linear_accel_state} -DMOTION=%{motion_state} \
83 -DTEST_SUITE=%{build_test_suite}
91 mkdir -p %{buildroot}/usr/share/license
92 mkdir -p %{buildroot}%{_unitdir}/sockets.target.wants
93 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
94 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}
95 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}
96 ln -s ../sensord.socket %{buildroot}%{_unitdir}/sockets.target.wants/sensord.socket
97 ln -s ../sensord.service %{buildroot}%{_unitdir}/multi-user.target.wants/sensord.service
99 %post -p /sbin/ldconfig
100 systemctl daemon-reload
102 %postun -p /sbin/ldconfig
103 systemctl daemon-reload
106 %manifest sensord.manifest
108 %attr(0644,root,root)/usr/etc/sensor_plugins.xml
109 %attr(0644,root,root)/usr/etc/sensors.xml
110 %{_unitdir}/sensord.service
111 %{_unitdir}/sensord.socket
112 %{_unitdir}/multi-user.target.wants/sensord.service
113 %{_unitdir}/sockets.target.wants/sensord.socket
114 %license LICENSE.APLv2
115 %{_datadir}/license/sensord
118 %manifest libsensord.manifest
119 %defattr(-,root,root,-)
120 %{_libdir}/libsensor.so.*
121 %{_libdir}/sensord/*.so*
122 %{_libdir}/libsensord-share.so
123 %{_libdir}/libsensord-server.so
124 %license LICENSE.APLv2
125 %{_datadir}/license/libsensord
127 %files -n libsensord-devel
128 %defattr(-,root,root,-)
129 %{_includedir}/sensor/*.h
130 %{_includedir}/sf_common/*.h
131 %{_libdir}/libsensor.so
132 %{_libdir}/pkgconfig/sensor.pc
133 %{_libdir}/pkgconfig/sf_common.pc
134 %{_libdir}/pkgconfig/sensord-server.pc
136 %if %{build_test_suite} == "ON"
138 %defattr(-,root,root,-)
139 /usr/bin/accelerometer
143 /usr/bin/linear_acceleration
148 %license LICENSE.APLv2
149 %{_datadir}/license/test