+
+# BUILD MOBILE
+echo T1
+%cmake . \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DPKGNAME=%{name} \
+ -DPROFILE=mobile \
+ -DFORMFACTOR=rectangle \
+ -DDPMS=%{DPMS} \
+ -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
+ -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
+ -DTZ_SYS_SMACK=%{TZ_SYS_SMACK} \
+ -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
+ -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
+ -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
+ -DNOTIFICATION_SERVICE=on \
+
+echo T2
+
+make %{?jobs:-j%jobs}
+rm -rf %{buildroot}
+%make_install
+mkdir -p profile_mobile
+mkdir -p profile_mobile/%{_bindir}
+mkdir -p profile_mobile/%{_datadir}/system-apps/res/icons
+mkdir -p profile_mobile/%{TZ_SYS_RO_SHARE}/system-apps/res/icons
+mkdir -p profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res
+mkdir -p profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res
+mv %{buildroot}/%{_bindir}/sysapp-launcher profile_mobile/%{_bindir}/sysapp-launcher.mobile
+mv %{buildroot}/%{_bindir}/system-cooperator profile_mobile/%{_bindir}/system-cooperator.mobile
+mv %{buildroot}/%{_datadir}/system-apps/res/icons/*.png profile_mobile/%{_datadir}/system-apps/res/icons
+%if "%{_datadir}" != "%{TZ_SYS_RO_SHARE}"
+mv %{buildroot}/%{TZ_SYS_RO_SHARE}/system-apps/res/icons/*.png profile_mobile/%{TZ_SYS_RO_SHARE}/system-apps/res/icons
+%endif
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res
+ls -la profile_mobile/%{_bindir}
+ls -la profile_mobile/%{_datadir}/system-apps/res/icons
+ls -la profile_mobile/%{TZ_SYS_RO_SHARE}/system-apps/res/icons
+ls -la profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res
+
+# Because of CAPI incompatibility from EFL-EXT, wearable is buildable only for wearable and "unified (undefined)"
+%if "%{?profile}"!="mobile" && "%{?profile}"!="tv" && "%{?profile}"!="ivi" && "%{?profile}"!="common"
+# BUILD WEARABLE
+%cmake . \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DPKGNAME=%{name} \
+ -DPROFILE=wearable \
+ -DFORMFACTOR=rectangle \
+ -DDPMS=%{DPMS} \
+ -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
+ -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
+ -DTZ_SYS_SMACK=%{TZ_SYS_SMACK} \
+ -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
+ -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
+ -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
+ -DNOTIFICATION_SERVICE=off
+
+make %{?jobs:-j%jobs}
+rm -rf %{buildroot}
+%make_install
+mkdir -p rec-profile_wearable/%{_bindir}
+mv %{buildroot}/%{_bindir}/sysapp-launcher rec-profile_wearable/%{_bindir}/sysapp-launcher.wearable.rectangle
+mv %{buildroot}/%{_bindir}/system-cooperator rec-profile_wearable/%{_bindir}/system-cooperator.wearable.rectangle
+mkdir -p rec-profile_wearable/shared/res
+mkdir -p rec-profile_wearable/res/
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/cooldown-popup.edj rec-profile_wearable/shared/res/
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png rec-profile_wearable/res/
+
+# BUILD WEARABLE CIRCLE EXTENSION
+%cmake . \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DPKGNAME=%{name} \
+ -DPROFILE=wearable \
+ -DFORMFACTOR=circle \
+ -DDPMS=%{DPMS} \
+ -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
+ -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
+ -DTZ_SYS_SMACK=%{TZ_SYS_SMACK} \
+ -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
+ -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
+ -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
+ -DNOTIFICATION_SERVICE=off
+
+make %{?jobs:-j%jobs}
+rm -rf %{buildroot}
+%make_install
+mkdir -p cir-profile_wearable
+mkdir -p cir-profile_wearable/%{_bindir}
+mv %{buildroot}/%{_bindir}/sysapp-launcher cir-profile_wearable/%{_bindir}/sysapp-launcher.wearable.circle
+mv %{buildroot}/%{_bindir}/system-cooperator cir-profile_wearable/%{_bindir}/system-cooperator.wearable.circle
+mkdir -p cir-profile_wearable/shared/res
+mkdir -p cir-profile_wearable/res/
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/cooldown-popup.edj cir-profile_wearable/shared/res/
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png cir-profile_wearable/res/
+%endif
+
+# BUILD COMMON/TV/IVI