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
13 BuildRequires: libattr-devel
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(libxml-2.0)
16 BuildRequires: pkgconfig(glib-2.0)
17 BuildRequires: pkgconfig(vconf)
18 BuildRequires: pkgconfig(libsystemd-daemon)
19 BuildRequires: pkgconfig(cynara-creds-socket)
20 BuildRequires: pkgconfig(cynara-client)
21 BuildRequires: pkgconfig(cynara-session)
22 Requires: libsensord = %{version}-%{release}
24 %ifarch %{ix86} x86_64
25 %define BUILD_ARCH EMULATOR
31 %package -n libsensord
32 Summary: Sensord library
33 Group: System/Libraries
34 Requires: %{name} = %{version}-%{release}
36 %description -n libsensord
39 %package -n libsensord-devel
40 Summary: Sensord shared library
41 Group: System/Development
42 Requires: libsensord = %{version}-%{release}
44 %description -n libsensord-devel
45 Sensord shared library
47 %package -n sensor-hal-devel
48 Summary: Sensord HAL interface
49 Group: System/Development
51 %description -n sensor-hal-devel
54 %package -n sensor-test
55 Summary: Sensord library
58 %description -n sensor-test
59 Sensor functional testing
63 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
65 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DMAJORVER=${MAJORVER} -DFULLVER=%{version} \
75 mkdir -p %{buildroot}%{_unitdir}
77 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}
78 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}
79 install -m 0644 %SOURCE3 %{buildroot}%{_unitdir}
81 %install_service multi-user.target.wants sensord.service
82 %install_service sockets.target.wants sensord_event.socket
83 %install_service sockets.target.wants sensord_command.socket
86 systemctl daemon-reload
89 systemctl daemon-reload
92 ln -sf %{_libdir}/libsensor.so.%{version} %{_libdir}/libsensor.so.1
99 %manifest packaging/sensord.manifest
101 %{_unitdir}/sensord.service
102 %{_unitdir}/sensord_command.socket
103 %{_unitdir}/sensord_event.socket
104 %{_unitdir}/multi-user.target.wants/sensord.service
105 %{_unitdir}/sockets.target.wants/sensord_command.socket
106 %{_unitdir}/sockets.target.wants/sensord_event.socket
107 %license LICENSE.APLv2
110 %defattr(-,root,root,-)
111 %manifest packaging/libsensord.manifest
112 %{_libdir}/libsensor.so.*
113 %{_libdir}/libsensord-shared.so
114 %license LICENSE.APLv2
116 %files -n libsensord-devel
117 %defattr(-,root,root,-)
118 %{_includedir}/sensor/*.h
119 %{_libdir}/libsensor.so
120 %{_libdir}/pkgconfig/sensor.pc
121 %license LICENSE.APLv2
123 %files -n sensor-hal-devel
124 %defattr(-,root,root,-)
125 %{_includedir}/sensor/sensor_hal.h
126 %{_includedir}/sensor/sensor_hal_types.h
127 %license LICENSE.APLv2
129 %files -n sensor-test
130 %defattr(-,root,root,-)
132 %{_bindir}/sensor-test
133 %{_bindir}/multi-thread-performance-test
134 %{_bindir}/multi-process-performance-test
135 %{_bindir}/fusion-data-collection
136 %license LICENSE.APLv2