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 %{_unitdir}/sensord.service
112 %{_unitdir}/sensord.socket
113 %{_unitdir}/multi-user.target.wants/sensord.service
114 %{_unitdir}/sockets.target.wants/sensord.socket
115 %license LICENSE.APLv2
116 %{_datadir}/license/sensord
119 %manifest libsensord.manifest
120 %defattr(-,root,root,-)
121 %{_libdir}/libsensor.so.*
122 %{_libdir}/sensord/*.so*
123 %{_libdir}/libsensord-share.so
124 %{_libdir}/libsensord-server.so
125 %license LICENSE.APLv2
126 %{_datadir}/license/libsensord
128 %files -n libsensord-devel
129 %defattr(-,root,root,-)
130 %{_includedir}/sensor/*.h
131 %{_includedir}/sf_common/*.h
132 %{_libdir}/libsensor.so
133 %{_libdir}/pkgconfig/sensor.pc
134 %{_libdir}/pkgconfig/sf_common.pc
135 %{_libdir}/pkgconfig/sensord-server.pc
137 %if %{build_test_suite} == "ON"
139 %defattr(-,root,root,-)
140 /usr/bin/accelerometer
144 /usr/bin/linear_acceleration
151 %license LICENSE.APLv2
152 %{_datadir}/license/test