License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1: context-service.service
+Source2: org.tizen.context.conf
# For active window hooking, we need to use 'ecore' mainloop instead of the 'glib' mainloop.
%define MAINLOOP glib
cp data/trigger-template.json %{buildroot}/opt/data/context-service/
sh data/template-json-to-sql.sh data/trigger-template.json > %{buildroot}/opt/data/context-service/trigger-template.sql
+mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
+install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dbus-1/system.d/
+
%post
sqlite3 -echo /opt/dbspace/.context-service.db < /opt/data/context-service/trigger-template.sql
chsmack -a "context-service" /opt/dbspace/.context-service.db*
%files
%manifest packaging/%{name}.manifest
+%config %{_sysconfdir}/dbus-1/system.d/*
%defattr(-,root,root,-)
%{_bindir}/*
%{_unitdir}/context-service.service
--- /dev/null
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy user="system">
+ <allow own="org.tizen.context"/>
+ <allow send_destination="org.tizen.context"/>
+ <allow send_interface="org.tizen.context"/>
+ </policy>
+ <policy at_console="true">
+ <allow send_destination="org.tizen.context"/>
+ </policy>
+ <policy context="default">
+ <deny own="org.tizen.context"/>
+ <allow send_destination="org.tizen.context"/>
+ </policy>
+</busconfig>