%define upgrade_script_path %{TZ_SYS_RO_SHARE}/upgrade/scripts
+#Engineer mode
+%define eng_mode_path %{TZ_SYS_ETC}
+
%build
cp %{SOURCE1001} .
%define ARCH_BIT 64
%endif
+%if 0%{?tizen_build_devel_mode}
+ %define eng_mode on
+%else
+ %define eng_mode off
+%endif
+
%cmake . \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DTMP_FILES_DIR=%{_sysconfdir}/tmpfiles.d \
mkdir -p %{buildroot}%{crash_dump_gen}
cp dump_scripts/* %{buildroot}%{crash_dump_gen}
+%if "%{eng_mode}" == "on"
+install -m 644 src/crash-manager/debugmode %{buildroot}%{eng_mode_path}/.debugmode
+%endif
+
%if "%{?sys_assert}" == "on"
%post
%{_libexecdir}/crash-pipe
%{_libexecdir}/crash-stack
+%if "%{eng_mode}" == "on"
+%{eng_mode_path}/.debugmode
+%endif
+
#upgrade script
%attr(-,root,root) %{upgrade_script_path}/crash-manager-upgrade.sh