install -m 0644 example/rule/*fail*_rule.xml %{buildroot}%{modes_test_dir}/
install -m 0755 unittest/modes-gtest-run.sh %{buildroot}%{modes_test_dir}/
+%install_service multi-user.target.wants %{name}.path
+
%check
xmllint --noout --schema schema/tizen_mode.xsd example/mode/tizen_*_mode.xml
xmllint --noout --schema schema/tizen_action_rule.xsd example/rule/tizen_*_rule.xml
%post
/sbin/ldconfig
+#For Development
systemctl daemon-reload
-systemctl restart %{name}.service
+systemctl try-restart %{name}.path
+systemctl try-restart %{name}.service
%posttrans unittests
-systemctl restart %{name}.service
+systemctl try-restart %{name}.path
+systemctl try-restart %{name}.service
%{modes_test_dir}/modes-gtest-run.sh %{modes_data_dir} %{modes_test_dir}
%preun unittests
%postun -p /sbin/ldconfig
%postun unittests
-systemctl restart %{name}.service
+systemctl try-restart %{name}.path
+systemctl try-restart %{name}.service
%files
%manifest %{name}.manifest
%{_bindir}/mode-supervisor
%{_unitdir}/%{name}.service
+%{_unitdir}/%{name}.path
+%{_unitdir}/multi-user.target.wants/%{name}.path
%{_sysconfdir}/dbus-1/system.d/%{_dbus_interface}.conf
%{_datadir}/dbus-1/system-services/%{_dbus_interface}.service
%{modes_data_dir}/schema/*
CONFIGURE_FILE(${DBUS_INTERFACE}.service.in ${DBUS_INTERFACE}.service @ONLY)
CONFIGURE_FILE(${DBUS_INTERFACE}.conf.in ${DBUS_INTERFACE}.conf @ONLY)
CONFIGURE_FILE(${PROJECT_NAME}.service.in ${PROJECT_NAME}.service @ONLY)
+CONFIGURE_FILE(${PROJECT_NAME}.path.in ${PROJECT_NAME}.path @ONLY)
INSTALL(TARGETS ${DAEMON} DESTINATION ${BIN_INSTALL_DIR})
INSTALL(FILES ${PROJECT_NAME}.service DESTINATION ${SYSTEMD_DIR})
+INSTALL(FILES ${PROJECT_NAME}.path DESTINATION ${SYSTEMD_DIR})
INSTALL(FILES ${DBUS_INTERFACE}.conf DESTINATION ${SYSCONF_DIR}/dbus-1/system.d)
INSTALL(FILES ${DBUS_INTERFACE}.service DESTINATION ${SHARE_INSTALL_PREFIX}/dbus-1/system-services)