Common : rearrange rpm packages according to profiles for unified build 36/122936/5 accepted/tizen/unified/20170406.053653 submit/tizen/20170404.104342
authorlokilee73 <changjoo.lee@samsung.com>
Tue, 4 Apr 2017 04:26:59 +0000 (13:26 +0900)
committerlokilee73 <changjoo.lee@samsung.com>
Tue, 4 Apr 2017 05:43:58 +0000 (14:43 +0900)
Unified build is applied in tizen 4.0.
So, rearrange rpm packages as below.
tv is excluded in binary by the request of tv devision side.

mobile : crash, overheat, signal-sender, system-syspopup.mobile, system-servant,
         system-servant.mobile, powerkey.mobile,
wearable : crash, system-syspopup.wearable, system-servant, system-servant.wearable,
           powerkey.wearable
common : sysem-servant, system-servant.common
tv : system-servant, system-servant.tv
ivi : (nothing)

Change-Id: Idd26b45cdc3db532cbe8c8be1191137dc69a4a55
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
packaging/system-servant.spec
src/powerkey/CMakeLists.txt

index 8c4135b..a66c59d 100755 (executable)
@@ -73,10 +73,10 @@ The binary is shared between common/ivi/tv.
 Summary:       System-servant configured for mobile profile
 Provides:      system-servant-compat = %{version}-%{release}
 Requires:      org.tizen.crash-syspopup
-Requires:      org.tizen.powerkey-syspopup
 Requires:      org.tizen.overheat-syspopup
-Requires:      org.tizen.system-syspopup
 Requires:      org.tizen.system-signal-sender
+Requires:      org.tizen.powerkey-syspopup.mobile
+Requires:      org.tizen.system-syspopup.mobile
 %description profile_mobile
 System-popup (system-servant) configured for mobile profile.
 
@@ -87,8 +87,8 @@ Summary:      System-servant configured for wearable profile
 Provides:      system-servant-compat = %{version}-%{release}
 Provides:      system-servant-profile_wearable = %{version}-%{release}
 Requires:      org.tizen.crash-syspopup
-Requires:      org.tizen.powerkey-syspopup
-Requires:      org.tizen.system-syspopup
+Requires:      org.tizen.powerkey-syspopup.wearable
+Requires:      org.tizen.system-syspopup.wearable
 Provides:      system-servant-profile_wearable
 Provides:      system-servant-compat
 Conflicts:     system-servant-extension-rectangle-profile_wearable
@@ -100,8 +100,8 @@ Summary:    System-servant configured for wearable profile
 Provides:      system-servant-compat = %{version}-%{release}
 Provides:      system-servant-profile_wearable = %{version}-%{release}
 Requires:      org.tizen.crash-syspopup
-Requires:      org.tizen.powerkey-syspopup
-Requires:      org.tizen.system-syspopup
+Requires:      org.tizen.powerkey-syspopup.wearable
+Requires:      org.tizen.system-syspopup.wearable
 Provides:      system-servant-profile_wearable
 Provides:      system-servant-compat
 Conflicts:     system-servant-extension-circle-profile_wearable
@@ -118,12 +118,21 @@ Requires:   %{name} = %{version}-%{release}
 to inform user crash information. It is activated
 when crash event is happend
 
-%package -n org.tizen.powerkey-syspopup
+%package -n org.tizen.powerkey-syspopup.mobile
 Summary:    Powerkey-popup application
 Group:      System/Utilities
 Requires:   %{name} = %{version}-%{release}
 
-%description -n org.tizen.powerkey-syspopup
+%description -n org.tizen.powerkey-syspopup.mobile
+to inform user powerkey information. It is activated
+when user power key event is happened
+
+%package -n org.tizen.powerkey-syspopup.wearable
+Summary:    Powerkey-popup application
+Group:      System/Utilities
+Requires:   %{name} = %{version}-%{release}
+
+%description -n org.tizen.powerkey-syspopup.wearable
 to inform user powerkey information. It is activated
 when user power key event is happened
 
@@ -145,12 +154,21 @@ Requires:   %{name} = %{version}-%{release}
 to inform user system FW signal sender. It is activated
 when system event is happend
 
-%package -n org.tizen.system-syspopup
+%package -n org.tizen.system-syspopup.mobile
+Summary:    System popup application
+Group:      System/Utilities
+Requires:   %{name} = %{version}-%{release}
+
+%description -n org.tizen.system-syspopup.mobile
+to inform user system information. It is activated
+when system event is happend
+
+%package -n org.tizen.system-syspopup.wearable
 Summary:    System popup application
 Group:      System/Utilities
 Requires:   %{name} = %{version}-%{release}
 
-%description -n org.tizen.system-syspopup
+%description -n org.tizen.system-syspopup.wearable
 to inform user system information. It is activated
 when system event is happend
 
@@ -184,7 +202,9 @@ cp %{SOURCE2003} .
 
 # BUILD MOBILE
 echo T1
-%cmake . \
+mkdir -p build_mobile
+pushd build_mobile
+%cmake .. \
                -DCMAKE_INSTALL_PREFIX=%{_prefix} \
                -DPKGNAME=%{name} \
                -DPROFILE=mobile \
@@ -203,14 +223,19 @@ echo T2
 make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
+popd
+
 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/bin
 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
+mkdir -p profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin
 mv %{buildroot}/%{_bindir}/sysapp-launcher profile_mobile/%{_bindir}/sysapp-launcher.mobile
-mv %{buildroot}/%{_bindir}/system-cooperator profile_mobile/%{_bindir}/system-cooperator.mobile
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.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
@@ -226,7 +251,9 @@ 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 . \
+mkdir -p build_rec_wearable
+pushd build_rec_wearable
+%cmake .. \
                -DCMAKE_INSTALL_PREFIX=%{_prefix} \
                -DPKGNAME=%{name} \
                -DPROFILE=wearable \
@@ -243,16 +270,24 @@ ls -la profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res
 make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
+popd
+
 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/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin
+mkdir -p rec-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin
+mv %{buildroot}/%{_bindir}/sysapp-launcher rec-profile_wearable/%{_bindir}/sysapp-launcher.wearable
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup rec-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup rec-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable
+
 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 . \
+mkdir -p build_cir_wearable
+pushd build_cir_wearable
+%cmake .. \
                -DCMAKE_INSTALL_PREFIX=%{_prefix} \
                -DPKGNAME=%{name} \
                -DPROFILE=wearable \
@@ -269,10 +304,16 @@ mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png rec-
 make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
+popd
+
 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/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin
+mkdir -p cir-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin
+mv %{buildroot}/%{_bindir}/sysapp-launcher cir-profile_wearable/%{_bindir}/sysapp-launcher.wearable
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup cir-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup cir-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable
+
 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/
@@ -280,7 +321,9 @@ mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png cir-
 %endif
 
 # BUILD COMMON/TV/IVI
-%cmake . \
+mkdir -p build_common
+pushd build_common
+%cmake .. \
                -DCMAKE_INSTALL_PREFIX=%{_prefix} \
                -DPKGNAME=%{name} \
                -DPROFILE=common \
@@ -295,11 +338,21 @@ mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png cir-
                -DNOTIFICATION_SERVICE=off
 
 make %{?jobs:-j%jobs}
+rm -rf %{buildroot}
+%make_install
+popd
+
+mkdir -p profile_common
+mkdir -p profile_common/%{_bindir}
+mv %{buildroot}/%{_bindir}/sysapp-launcher profile_common/%{_bindir}/sysapp-launcher.common
 
 %install
-rm -rf %{buildroot}
+pushd build_common
 %make_install
+popd
 
+#for mobile profile
+mkdir -p %{buildroot}/%{_bindir}
 install -m 0755 profile_mobile/%{_bindir}/* %{buildroot}/%{_bindir}
 mkdir -p %{buildroot}/%{_datadir}/system-apps/res/icons/
 install -m 0644 profile_mobile/%{_datadir}/system-apps/res/icons/*.png %{buildroot}/%{_datadir}/system-apps/res/icons/
@@ -309,7 +362,11 @@ install -m 0644 profile_mobile/%{TZ_SYS_RO_SHARE}/system-apps/res/icons/*.png %{
 %endif
 mkdir -p %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/
 install -m 0644 profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/
+install -m 0644 profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.mobile %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.mobile
 mkdir -p %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/
+install -m 0644 profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile
+install -m 0644 profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png
+install -m 0644 profile_mobile/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png
 
 # 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"
@@ -323,17 +380,26 @@ install -m 0644 data/circle_btn_check.png %{buildroot}%{TZ_SYS_RO_APP}/org.tizen
 install -m 0644 data/circle_btn_delete.png %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/
 install -m 0644 data/gear_device_options_bg.png %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/
 install -m 0644 data/gear_device_options_power_off.png %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/
+install -m 0644 cir-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable
+install -m 0644 cir-profile_wearable/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable
 %endif
 
+#for common profile
+install -m 0755 profile_common/%{_bindir}/* %{buildroot}/%{_bindir}
+
 # This is not used. (mobile/wearable has its own postfixed version)
-rm %{buildroot}%{_bindir}/system-cooperator
+rm %{buildroot}%{_bindir}/sysapp-launcher
+rm %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
+rm %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
+
 
 %post profile_mobile
 # This does not support proper uninstall. To uninstall profile_mobile with
 # correct system-servant kept, you need to reinstall system-servant after
 # uninstalling profile_mobile
 mv /%{_bindir}/sysapp-launcher.mobile /%{_bindir}/sysapp-launcher
-mv /%{_bindir}/system-cooperator.mobile /%{_bindir}/system-cooperator
+mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
+mv /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.mobile /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
 
 # Because of CAPI incompatibility from EFL-EXT, circle is buildable only for wearable and "unified (undefined)"
 %if "%{?profile}"!="mobile" && "%{?profile}"!="tv" && "%{?profile}"!="ivi" && "%{?profile}"!="common"
@@ -341,22 +407,28 @@ mv /%{_bindir}/system-cooperator.mobile /%{_bindir}/system-cooperator
 # This does not support proper uninstall. To uninstall profile_wearable-circle with
 # correct system-servant kept, you need to reinstall system-servant after
 # uninstalling profile_wearable-circle
-mv /%{_bindir}/sysapp-launcher.wearable.circle /%{_bindir}/sysapp-launcher
-mv /%{_bindir}/system-cooperator.wearable.circle /%{_bindir}/system-cooperator
+mv /%{_bindir}/sysapp-launcher.wearable /%{_bindir}/sysapp-launcher
+mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
+mv /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
 
 %post extension-rectangle-profile_wearable
 # This does not support proper uninstall. To uninstall profile_wearable-rectangle with
 # correct system-servant kept, you need to reinstall system-servant after
 # uninstalling profile_wearable-rectangle
-mv /%{_bindir}/sysapp-launcher.wearable.rectangle /%{_bindir}/sysapp-launcher
-mv /%{_bindir}/system-cooperator.wearable.rectangle /%{_bindir}/system-cooperator
+mv /%{_bindir}/sysapp-launcher.wearable /%{_bindir}/sysapp-launcher
+mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
+mv /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable /%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
 %endif
 
+%post profile_common
+# This does not support proper uninstall. To uninstall profile_common with
+# correct system-servant kept, you need to reinstall system-servant after
+# uninstalling profile_common
+mv /%{_bindir}/sysapp-launcher.common /%{_bindir}/sysapp-launcher
 
 %files
 %manifest %{name}.manifest
 %license LICENSE
-%{_bindir}/sysapp-launcher
 %{_datadir}/dbus-1/system-services/org.tizen.system.popup.service
 %config %{_sysconfdir}/dbus-1/system.d/launcher.conf
 
@@ -424,41 +496,38 @@ mv /%{_bindir}/system-cooperator.wearable.rectangle /%{_bindir}/system-cooperato
 %lang(zh_TW) %{_datadir}/locale/zh_TW/LC_MESSAGES/system-servant.mo
 
 %files profile_mobile
+%license LICENSE
+%defattr(-,root,root,-)
 %{_bindir}/sysapp-launcher.mobile
-%{_bindir}/system-cooperator.mobile
+%{_bindir}/system-cooperator
 %{_datadir}/system-apps/res/icons/batt_full_icon.png
 %{_datadir}/system-apps/res/icons/batt_full_indicator.png
 %{_datadir}/system-apps/res/icons/noti_charging_battery_low.png
 %{_datadir}/system-apps/res/icons/noti_cooling_down.png
-%{TZ_SYS_RO_SHARE}/system-apps/res/icons/datausage_warning.png
-%{TZ_SYS_RO_SHARE}/system-apps/res/icons/led_torch.png
-%{TZ_SYS_RO_SHARE}/system-apps/res/icons/usb_icon.png
-# usb-popup.edj is used for system-syspopup only for mobile.
-%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj
+%{_datadir}/system-apps/res/icons/datausage_warning.png
+%{_datadir}/system-apps/res/icons/led_torch.png
+%{_datadir}/system-apps/res/icons/usb_icon.png
 
 # 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"
 %files extension-circle-profile_wearable
-%{_bindir}/sysapp-launcher.wearable.circle
-%{_bindir}/system-cooperator.wearable.circle
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_check.png
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_delete.png
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_bg.png
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_power_off.png
-%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/cooldown-popup.edj
-%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png
+%license LICENSE
+%defattr(-,root,root,-)
+%{_bindir}/sysapp-launcher.wearable
+%{_bindir}/system-cooperator
 
 %files extension-rectangle-profile_wearable
-%{_bindir}/sysapp-launcher.wearable.rectangle
-%{_bindir}/system-cooperator.wearable.rectangle
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_check.png
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_delete.png
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_bg.png
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_power_off.png
-%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/cooldown-popup.edj
-%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png
+%license LICENSE
+%defattr(-,root,root,-)
+%{_bindir}/sysapp-launcher.wearable
+%{_bindir}/system-cooperator
 %endif
 
+%files profile_common
+%license LICENSE
+%defattr(-,root,root,-)
+%{_bindir}/sysapp-launcher.common
+
 %files -n org.tizen.crash-syspopup
 %manifest org.tizen.crash-syspopup.manifest
 %license LICENSE
@@ -466,18 +535,44 @@ mv /%{_bindir}/system-cooperator.wearable.rectangle /%{_bindir}/system-cooperato
 %{TZ_SYS_RO_APP}/org.tizen.crash-syspopup/bin/crash-popup
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.crash-syspopup.xml
 
-%files -n org.tizen.system-syspopup
+%files -n org.tizen.system-syspopup.mobile
 %manifest org.tizen.system-syspopup.manifest
 %license LICENSE
 %defattr(-,root,root,-)
-%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.mobile
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.system-syspopup.xml
 
-%files -n org.tizen.powerkey-syspopup
+# 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"
+%files -n org.tizen.system-syspopup.wearable
+%manifest org.tizen.system-syspopup.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup.wearable
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/cooldown-popup.edj
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png
+%{TZ_SYS_RO_SHARE}/packages/org.tizen.system-syspopup.xml
+
+%files -n org.tizen.powerkey-syspopup.wearable
 %manifest org.tizen.powerkey-syspopup.manifest
 %license LICENSE
 %defattr(-,root,root,-)
-%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_check.png
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_delete.png
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_bg.png
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_power_off.png
+%{TZ_SYS_RO_SHARE}/packages/org.tizen.powerkey-syspopup.xml
+%endif
+
+%files -n org.tizen.powerkey-syspopup.mobile
+%manifest org.tizen.powerkey-syspopup.manifest
+%license LICENSE
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png
+%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.powerkey-syspopup.xml
 
 %files -n org.tizen.overheat-syspopup
@@ -496,6 +591,5 @@ mv /%{_bindir}/system-cooperator.wearable.rectangle /%{_bindir}/system-cooperato
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.system-signal-sender.xml
 
 # The followings are meta packages to keep the compatibility with conventional profiles.
-%files profile_common
 %files profile_tv
 %files profile_ivi
index 6aa0155..fd13ba6 100755 (executable)
@@ -2,13 +2,9 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
 IF(PROFILE_WEARABLE)
        SET(POWERKEY_SRCS ${COMMON_SRCS} powerkey-wearable.c)
-ENDIF()
-
-IF (PROFILE_MOBILE)
+ELSEIF(PROFILE_MOBILE)
        SET(POWERKEY_SRCS ${COMMON_SRCS} powerkey-mobile.c)
-ENDIF()
-
-IF (PROFILE_TV)
+ELSE()
        SET(POWERKEY_SRCS ${COMMON_SRCS} powerkey-tv.c)
 ENDIF()