Group: Framework/system
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
-Source1: sensor-framework.service
Source1001: sensor-framework.manifest
%ifarch %{arm}
BuildRequires: pkgconfig(sf_common)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(heynoti)
+BuildRequires: pkgconfig(libsystemd-daemon)
+%{?systemd_requires}
%description
Sensor framework
cp LICENSE %{buildroot}/usr/share/license/%{name}
mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
-install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/
+mkdir -p %{buildroot}%{_libdir}/systemd/system/sockets.target.wants
ln -s ../sensor-framework.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/sensor-framework.service
+ln -s ../sensor-framework.socket %{buildroot}%{_libdir}/systemd/system/sockets.target.wants/sensor-framework.socket
# FIXME: remove initscripts after we start using systemd
mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d
vconftool set -t int memory/private/sensor/80002 0 -i
vconftool set -t int memory/private/sensor/poweroff 0 -i
+systemctl daemon-reload
+
%files
-%manifest %{name}.manifest
+%manifest sensor-framework.manifest
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/sfsvc
%{_sysconfdir}/rc.d/rc3.d/S40sfsvc
%{_sysconfdir}/rc.d/rc4.d/S40sfsvc
%attr(0644,root,root)/usr/etc/sf_processor.conf
%attr(0644,root,root)/usr/etc/sf_sensor.conf
%{_libdir}/systemd/system/sensor-framework.service
+%{_libdir}/systemd/system/sensor-framework.socket
%{_libdir}/systemd/system/multi-user.target.wants/sensor-framework.service
+%{_libdir}/systemd/system/sockets.target.wants/sensor-framework.socket
/usr/share/license/%{name}