This patch applies cuse-driver related smack rules in
the post script.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
# Install Core (NPU-Engine)
DESTDIR=%{buildroot} ninja install -C build %{?_smp_mflags}
+# Add access permission to temp files for the CUSE driver
+%if 0%{?npu_cuse}
+%post
+touch /tmp/npu-engine-pid.txt
+touch /tmp/npu-engine.log
+chmod 666 /tmp/npu-engine-pid.txt
+chmod 666 /tmp/npu-engine.log
+chsmack -a "User::App::Shared" /tmp/npu-engine-pid.txt
+chsmack -a "User::App::Shared" /tmp/npu-engine.log
+%endif
+
%files
%manifest npu-engine.manifest
%defattr(-,root,root,-)