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(glib-2.0)
16 BuildRequires: pkgconfig(vconf)
17 BuildRequires: pkgconfig(libsystemd-daemon)
18 BuildRequires: pkgconfig(cynara-creds-socket)
19 BuildRequires: pkgconfig(cynara-client)
20 BuildRequires: pkgconfig(cynara-session)
21 Requires: libsensord = %{version}-%{release}
26 %package -n libsensord
27 Summary: Sensord library
28 Group: System/Libraries
29 Requires: %{name} = %{version}-%{release}
31 %description -n libsensord
34 %package -n libsensord-devel
35 Summary: Sensord shared library
36 Group: System/Development
37 Requires: libsensord = %{version}-%{release}
39 %description -n libsensord-devel
40 Sensord shared library
42 %package -n sensor-hal-devel
43 Summary: Sensord HAL interface
44 Group: System/Development
46 %description -n sensor-hal-devel
49 %package -n sensor-test
50 Summary: Sensord library
53 %description -n sensor-test
54 Sensor functional testing
58 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
60 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} \
61 -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
70 mkdir -p %{buildroot}%{_unitdir}
72 install -m 0644 %SOURCE1 %{buildroot}%{_unitdir}
73 install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}
74 install -m 0644 %SOURCE3 %{buildroot}%{_unitdir}
76 %install_service multi-user.target.wants sensord.service
77 %install_service sockets.target.wants sensord_event.socket
78 %install_service sockets.target.wants sensord_command.socket
81 systemctl daemon-reload
84 systemctl daemon-reload
87 ln -sf %{_libdir}/libsensor.so.%{version} %{_libdir}/libsensor.so.1
94 %manifest packaging/sensord.manifest
96 %{_unitdir}/sensord.service
97 %{_unitdir}/sensord_command.socket
98 %{_unitdir}/sensord_event.socket
99 %{_unitdir}/multi-user.target.wants/sensord.service
100 %{_unitdir}/sockets.target.wants/sensord_command.socket
101 %{_unitdir}/sockets.target.wants/sensord_event.socket
102 %license LICENSE.APLv2
105 %defattr(-,root,root,-)
106 %manifest packaging/libsensord.manifest
107 %{_libdir}/libsensor.so.*
108 %{_libdir}/libsensord-shared.so
109 %license LICENSE.APLv2
111 %files -n libsensord-devel
112 %defattr(-,root,root,-)
113 %{_includedir}/sensor/*.h
114 %{_libdir}/libsensor.so
115 %{_libdir}/pkgconfig/sensor.pc
116 %license LICENSE.APLv2
118 %files -n sensor-hal-devel
119 %defattr(-,root,root,-)
120 %{_includedir}/sensor/sensor_hal.h
121 %{_includedir}/sensor/sensor_hal_types.h
122 %license LICENSE.APLv2
124 %files -n sensor-test
125 %defattr(-,root,root,-)
127 %license LICENSE.APLv2