Remove Profile Build Dependency and Model-Build-Features
[platform/core/system/system-popup.git] / packaging / system-servant.spec
index 508b3e5..b285ccb 100755 (executable)
@@ -1,73 +1,9 @@
 %bcond_with wayland
 %bcond_with emulator
 
-%define PROFILE common
-%define FORMFACTOR none
-
-#Main applications
-%define powerkey_popup off
-%define overheat_popup off
-%define crash_popup off
-%define system_popup off
-%define notification_service off
-%define signal_sender off
-#sub-popups of system-popup
-%define battery_popup off
-%define cooldown_popup off
-%define mmc_popup off
-%define power_popup off
-%define usb_popup off
-%define watchdog_popup off
-%define storage_popup off
-%define system_cooperator off
-
-%if "%{?profile}" == "mobile"
-%define PROFILE mobile
-#Main applicaitons
-%define powerkey_popup on
-%define overheat_popup on
-%define crash_popup on
-%define system_popup on
-%define notification_service on
-%define signal_sender on
-%define system_cooperator on
-#sub-popups of system-popup
-%define battery_popup on
-%define cooldown_popup on
-%define mmc_popup on
-%define power_popup on
-%define usb_popup on
-%define watchdog_popup on
-%define storage_popup on
-%endif
-
-%if "%{?profile}" == "wearable"
-%define PROFILE wearable
-#Main applicaitons
-%define powerkey_popup on
-%define overheat_popup off
-%define crash_popup on
-%define system_popup on
-%define system_cooperator on
-#sub-popups of system-popup
-%define storage_popup on
-%define watchdog_popup on
-%define battery_popup on
-%define cooldown_popup on
-%define power_popup on
-%endif
-
-%if "%{?profile}" == "tv"
-%define PROFILE tv
-#Main applications
-%define powerkey_popup on
-%define crash_popup on
-#sub-popups of system-popup
-%endif
-
 Name:       system-servant
 Summary:    Servant application for System FW
-Version:    0.2.0
+Version:    0.2.2
 Release:    1
 Group:      System/Utilities
 License:    Apache-2.0
@@ -101,13 +37,8 @@ BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-appfw-app-manager)
 BuildRequires:  pkgconfig(capi-media-recorder)
 BuildRequires:  pkgconfig(capi-system-info)
-BuildRequires:  model-build-features
-
-%if "%{?model_build_feature_formfactor}" == "circle"
-       %define FORMFACTOR circle
-%else
-       %define FORMFACTOR rectangle
-%endif
+Requires:      system-servant-compat = %{version}-%{release}
+Recommends:     system-servant-profile_common = %{version}-%{release}
 
 BuildRequires:  cmake
 BuildRequires:  gettext-devel
@@ -116,7 +47,68 @@ BuildRequires:  gettext-devel
 System applications such as app-launcher
 and service file for dbus activation
 
-%if %{?crash_popup} == on
+%package profile_common
+Summary:       System-servant configured for common profile
+Provides:      system-servant-compat = %{version}-%{release}
+%description profile_common
+System-popup (system-servant) configured for common profile.
+The binary is shared between common/ivi/tv.
+
+%package profile_ivi
+Summary:       System-servant configured for common profile
+Provides:      system-servant-compat = %{version}-%{release}
+%description profile_ivi
+System-popup (system-servant) configured for IVI profile.
+The binary is shared between common/ivi/tv.
+
+%package profile_tv
+Summary:       System-servant configured for TV profile
+Provides:      system-servant-compat = %{version}-%{release}
+Requires:      org.tizen.crash-syspopup
+%description profile_tv
+System-popup (system-servant) configured for TV profile.
+The binary is shared between common/ivi/tv.
+
+%package profile_mobile
+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
+%description profile_mobile
+System-popup (system-servant) configured for mobile profile.
+
+# 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"
+%package extension-circle-profile_wearable
+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
+Provides:      system-servant-profile_wearable
+Provides:      system-servant-compat
+Conflicts:     system-servant-extension-rectangle-profile_wearable
+%description extension-circle-profile_wearable
+System-popup (system-servant) configured for wearable profile.
+
+%package extension-rectangle-profile_wearable
+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
+Provides:      system-servant-profile_wearable
+Provides:      system-servant-compat
+Conflicts:     system-servant-extension-circle-profile_wearable
+%description extension-rectangle-profile_wearable
+System-popup (system-servant) configured for wearable profile.
+%endif
+
 %package -n org.tizen.crash-syspopup
 Summary:    System popup application (crash system popup)
 Group:      System/Utilities
@@ -125,9 +117,7 @@ Requires:   %{name} = %{version}-%{release}
 %description -n org.tizen.crash-syspopup
 to inform user crash information. It is activated
 when crash event is happend
-%endif
 
-%if %{?powerkey_popup} == on
 %package -n org.tizen.powerkey-syspopup
 Summary:    Powerkey-popup application
 Group:      System/Utilities
@@ -136,9 +126,7 @@ Requires:   %{name} = %{version}-%{release}
 %description -n org.tizen.powerkey-syspopup
 to inform user powerkey information. It is activated
 when user power key event is happened
-%endif
 
-%if %{?overheat_popup} == on
 %package -n org.tizen.overheat-syspopup
 Summary:    Overheat-popup application
 Group:      System/Utilities
@@ -147,9 +135,7 @@ Requires:   %{name} = %{version}-%{release}
 %description -n org.tizen.overheat-syspopup
 to inform user overheat information. It is activated
 when overheat event is happened
-%endif
 
-%if %{?signal_sender} == on
 %package -n org.tizen.system-signal-sender
 Summary:    System FW signal sender
 Group:      System/Utilities
@@ -158,9 +144,7 @@ Requires:   %{name} = %{version}-%{release}
 %description -n org.tizen.system-signal-sender
 to inform user system FW signal sender. It is activated
 when system event is happend
-%endif
 
-%if %{?system_popup} == on
 %package -n org.tizen.system-syspopup
 Summary:    System popup application
 Group:      System/Utilities
@@ -170,8 +154,6 @@ Requires:   %{name} = %{version}-%{release}
 to inform user system information. It is activated
 when system event is happend
 
-%endif # system_popup
-
 %prep
 %setup -q
 
@@ -179,41 +161,130 @@ when system event is happend
 chmod 0644 %{SOURCE1}
 cp %{SOURCE1} .
 
-%if %{powerkey_popup} == on
 chmod 0644 %{SOURCE1001}
 cp %{SOURCE1001} .
-%endif
 
-%if %{overheat_popup} == on
 chmod 0644 %{SOURCE1002}
 cp %{SOURCE1002} .
-%endif
 
-%if %{crash_popup} == on
 chmod 0644 %{SOURCE1015}
 cp %{SOURCE1015} .
-%endif
 
-%if %{system_popup} == on
 chmod 0644 %{SOURCE2001}
 cp %{SOURCE2001} .
-%endif
 
-%if %{signal_sender} == on
 chmod 0644 %{SOURCE2003}
 cp %{SOURCE2003} .
-%endif
 
 %define DPMS none
 %if %{with wayland}
 %define DPMS wayland
 %endif
 
+
+# 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
 %cmake . \
                -DCMAKE_INSTALL_PREFIX=%{_prefix} \
                -DPKGNAME=%{name} \
-               -DPROFILE=%{PROFILE} \
-               -DFORMFACTOR=%{FORMFACTOR} \
+               -DPROFILE=common \
+               -DFORMFACTOR=rectangle \
                -DDPMS=%{DPMS} \
                -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
                -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
@@ -221,20 +292,7 @@ cp %{SOURCE2003} .
                -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
                -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
                -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
-               -DPOWERKEY_POPUP=%{powerkey_popup} \
-               -DCRASH_POPUP=%{crash_popup} \
-               -DNOTIFICATION_SERVICE=%{notification_service} \
-               -DBATTERY_POPUP=%{battery_popup} \
-               -DCOOLDOWN_POPUP=%{cooldown_popup} \
-               -DSYSTEM_POPUP=%{system_popup} \
-               -DSIGNAL_SENDER=%{signal_sender} \
-               -DSYSTEM_COOPERATOR=%{system_cooperator} \
-               -DMMC_POPUP=%{mmc_popup} \
-               -DSTORAGE_POPUP=%{storage_popup} \
-               -DUSB_POPUP=%{usb_popup} \
-               -DWATCHDOG_POPUP=%{watchdog_popup} \
-               -DOVERHEAT_POPUP=%{overheat_popup} \
-               -DPOWER_POPUP=%{power_popup} \
+               -DNOTIFICATION_SERVICE=off
 
 make %{?jobs:-j%jobs}
 
@@ -242,6 +300,58 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
 
+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/
+%if "%{_datadir}" != "%{TZ_SYS_RO_SHARE}"
+mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/system-apps/res/icons/
+install -m 0644 profile_mobile/%{TZ_SYS_RO_SHARE}/system-apps/res/icons/*.png %{buildroot}/%{TZ_SYS_RO_SHARE}/system-apps/res/icons/
+%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/
+mkdir -p %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/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"
+mkdir -p %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res
+mkdir -p %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res
+install -m 0644 rec-profile_wearable/shared/res/*.edj %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/
+install -m 0644 rec-profile_wearable/res/*.png %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/
+install -m 0755 cir-profile_wearable/%{_bindir}/* %{buildroot}/%{_bindir}
+install -m 0755 rec-profile_wearable/%{_bindir}/* %{buildroot}/%{_bindir}
+install -m 0644 data/circle_btn_check.png %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/
+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/
+%endif
+
+# This is not used. (mobile/wearable has its own postfixed version)
+rm %{buildroot}%{_bindir}/system-cooperator
+
+%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
+
+# 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"
+%post extension-circle-profile_wearable
+# 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
+
+%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
+%endif
+
 
 %files
 %manifest %{name}.manifest
@@ -313,7 +423,9 @@ rm -rf %{buildroot}
 %lang(zh_HK) %{_datadir}/locale/zh_HK/LC_MESSAGES/system-servant.mo
 %lang(zh_TW) %{_datadir}/locale/zh_TW/LC_MESSAGES/system-servant.mo
 
-%if %{notification_service} == on
+%files profile_mobile
+%{_bindir}/sysapp-launcher.mobile
+%{_bindir}/system-cooperator.mobile
 %{_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
@@ -321,56 +433,52 @@ rm -rf %{buildroot}
 %{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
-%endif
+# usb-popup.edj is used for system-syspopup only for mobile.
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj
+
+# 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
 
-%if %{system_cooperator} == on
-%{_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
 %endif
 
-%if %{crash_popup} == on
 %files -n org.tizen.crash-syspopup
 %manifest org.tizen.crash-syspopup.manifest
 %license LICENSE
 %defattr(-,root,root,-)
 %{TZ_SYS_RO_APP}/org.tizen.crash-syspopup/bin/crash-popup
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.crash-syspopup.xml
-%endif
 
-%if %{system_popup} == on
 %files -n org.tizen.system-syspopup
 %manifest org.tizen.system-syspopup.manifest
 %defattr(-,root,root,-)
 %{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
-%if "%{?profile}" == "mobile"
-%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj
-%endif
-%if "%{?profile}" == "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
-%endif
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.system-syspopup.xml
-%endif
 
-%if %{powerkey_popup} == on
 %files -n org.tizen.powerkey-syspopup
 %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_SHARE}/packages/org.tizen.powerkey-syspopup.xml
-%if "%{?profile}" == "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
-%endif
-%if "%{?profile}" == "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
-%endif
-%endif
 
-%if %{overheat_popup} == on
 %files -n org.tizen.overheat-syspopup
 %manifest org.tizen.overheat-syspopup.manifest
 %license LICENSE
@@ -378,12 +486,14 @@ rm -rf %{buildroot}
 %{TZ_SYS_RO_APP}/org.tizen.overheat-syspopup/bin/overheat-popup
 %{TZ_SYS_RO_APP}/org.tizen.overheat-syspopup/shared/res/overheat-popup.edj
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.overheat-syspopup.xml
-%endif
 
-%if %{signal_sender} == on
 %files -n org.tizen.system-signal-sender
 %manifest org.tizen.system-signal-sender.manifest
 %defattr(-,root,root,-)
 %{TZ_SYS_RO_APP}/org.tizen.system-signal-sender/bin/system-signal-sender
 %{TZ_SYS_RO_SHARE}/packages/org.tizen.system-signal-sender.xml
-%endif
+
+# The followings are meta packages to keep the compatibility with conventional profiles.
+%files profile_common
+%files profile_tv
+%files profile_ivi