Remove executable flag from non-executable files
[platform/core/system/system-popup.git] / packaging / system-servant.spec
old mode 100755 (executable)
new mode 100644 (file)
index 2c64f9b..dcf8a0f
@@ -1,42 +1,25 @@
-%bcond_with x
 %bcond_with wayland
-%bcond_with emulator
-
-%define PROFILE common
-
-#Main applications
-%define poweroff_popup on
-
-%if "%{?tizen_profile_name}" == "mobile"
-%define PROFILE mobile
-#Main applicaitons
-%define poweroff_popup on
-%endif
-
-%if "%{?tizen_profile_name}" == "wearable"
-%define PROFILE wearable
-#Main applicaitons
-%define poweroff_popup on
-%endif
-
-%if "%{?tizen_profile_name}" == "tv"
-%define PROFILE tv
-%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
 Source0:    %{name}-%{version}.tar.gz
 Source1:    %{name}.manifest
-Source1001:    org.tizen.poweroff-syspopup.manifest
+Source1001:    org.tizen.powerkey-syspopup.manifest
+Source1002:    org.tizen.overheat-syspopup.manifest
+Source1015:    org.tizen.crash-syspopup.manifest
+Source2001:    org.tizen.system-syspopup.manifest
+Source2003:    org.tizen.system-signal-sender.manifest
+BuildRequires:  pkgconfig(appsvc)
+BuildRequires:  pkgconfig(pkgmgr-info)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(syspopup)
 BuildRequires:  pkgconfig(syspopup-caller)
-BuildRequires:  pkgconfig(notification) 
+BuildRequires:  pkgconfig(notification)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(dlog)
@@ -46,10 +29,16 @@ BuildRequires:  pkgconfig(deviced)
 BuildRequires:  pkgconfig(feedback)
 BuildRequires:  pkgconfig(efl-extension)
 BuildRequires:  pkgconfig(libtzplatform-config)
-%if %{with x}
-BuildRequires:  pkgconfig(ecore-x)
-BuildRequires:  pkgconfig(utilX)
-%endif
+BuildRequires:  edje-bin
+BuildRequires:  pkgconfig(capi-media-sound-manager)
+BuildRequires:  pkgconfig(capi-media-wav-player)
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(capi-media-recorder)
+BuildRequires:  pkgconfig(capi-system-info)
+Requires:      system-servant-compat = %{version}-%{release}
+Recommends:     system-servant-profile_common = %{version}-%{release}
+
 BuildRequires:  cmake
 BuildRequires:  gettext-devel
 
@@ -57,58 +46,407 @@ BuildRequires:  gettext-devel
 System applications such as app-launcher
 and service file for dbus activation
 
-%if %{?poweroff_popup} == on
-%package -n org.tizen.poweroff-syspopup
-Summary:    poweroff-popup application
-Group:      main
-Requires:   %{name} = %{version}-%{release}
+%package profile_common
+Summary:       System-servant configured for common profile
+Provides:      system-servant-compat = %{version}-%{release}
+Conflicts:     system-servant-profile_mobile
+Conflicts:     system-servant-extension-rectangle-profile_wearable
+Conflicts:     system-servant-extension-circle-profile_wearable
+Conflicts:     system-servant-extension-profile_tv
+%description profile_common
+System-popup (system-servant) configured for common profile.
+The binary is shared between common/tv.
+
+%package profile_tv
+Summary:       System-servant configured for TV profile
+Provides:      system-servant-compat = %{version}-%{release}
+Requires:      org.tizen.crash-syspopup
+Conflicts:     system-servant-profile_mobile
+Conflicts:     system-servant-extension-rectangle-profile_wearable
+Conflicts:     system-servant-extension-circle-profile_wearable
+Conflicts:     system-servant-profile_common
+%description profile_tv
+System-popup (system-servant) configured for TV profile.
+The binary is shared between common/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.overheat-syspopup
+Requires:      org.tizen.system-signal-sender
+Requires:      org.tizen.powerkey-syspopup.mobile
+Requires:      org.tizen.system-syspopup.mobile
+Conflicts:     system-servant-extension-rectangle-profile_wearable
+Conflicts:     system-servant-extension-circle-profile_wearable
+Conflicts:     system-servant-profile_common
+Conflicts:     system-servant-extension-profile_tv
+%description profile_mobile
+System-popup (system-servant) configured for mobile profile.
 
-%description -n org.tizen.poweroff-syspopup
-poweroff-popup application.
+# Because of CAPI incompatibility from EFL-EXT, circle is buildable only for wearable and "unified (undefined)"
+%if "%{?profile}"!="mobile" && "%{?profile}"!="tv" && "%{?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.wearable
+Requires:      org.tizen.system-syspopup.wearable
+Provides:      system-servant-profile_wearable
+Provides:      system-servant-compat
+Conflicts:     system-servant-profile_mobile
+Conflicts:     system-servant-extension-rectangle-profile_wearable
+Conflicts:     system-servant-profile_common
+Conflicts:     system-servant-extension-profile_tv
+%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.wearable
+Requires:      org.tizen.system-syspopup.wearable
+Provides:      system-servant-profile_wearable
+Provides:      system-servant-compat
+Conflicts:     system-servant-profile_mobile
+Conflicts:     system-servant-extension-circle-profile_wearable
+Conflicts:     system-servant-profile_common
+Conflicts:     system-servant-extension-profile_tv
+%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
+Requires:   %{name} = %{version}-%{release}
+
+%description -n org.tizen.crash-syspopup
+to inform user crash information. It is activated
+when crash event is happend
+
+%package -n org.tizen.powerkey-syspopup.mobile
+Summary:    Powerkey-popup application
+Group:      System/Utilities
+Requires:   %{name} = %{version}-%{release}
+
+%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
+
+%package -n org.tizen.overheat-syspopup
+Summary:    Overheat-popup application
+Group:      System/Utilities
+Requires:   %{name} = %{version}-%{release}
+
+%description -n org.tizen.overheat-syspopup
+to inform user overheat information. It is activated
+when overheat event is happened
+
+%package -n org.tizen.system-signal-sender
+Summary:    System FW signal sender
+Group:      System/Utilities
+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
+
+%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.wearable
+to inform user system information. It is activated
+when system event is happend
+
 %prep
 %setup -q
 
 %build
+chmod 0644 %{SOURCE1}
 cp %{SOURCE1} .
 
-%if %{poweroff_popup} == on
+chmod 0644 %{SOURCE1001}
 cp %{SOURCE1001} .
-%endif
+
+chmod 0644 %{SOURCE1002}
+cp %{SOURCE1002} .
+
+chmod 0644 %{SOURCE1015}
+cp %{SOURCE1015} .
+
+chmod 0644 %{SOURCE2001}
+cp %{SOURCE2001} .
+
+chmod 0644 %{SOURCE2003}
+cp %{SOURCE2003} .
 
 %define DPMS none
-%if %{with x}
-%define DPMS x
-%endif
 %if %{with wayland}
 %define DPMS wayland
 %endif
 
-%cmake . \
+
+# BUILD MOBILE
+echo T1
+mkdir -p build_mobile
+pushd build_mobile
+%cmake .. \
                -DCMAKE_INSTALL_PREFIX=%{_prefix} \
                -DPKGNAME=%{name} \
-               -DPROFILE=%{PROFILE} \
+               -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} \
-               -DPOWEROFF_POPUP=%{poweroff_popup} \
+               -DNOTIFICATION_SERVICE=on \
+
+echo T2
 
 make %{?jobs:-j%jobs}
+rm -rf %{buildroot}
+%make_install
+popd
 
-%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/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}/%{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
+%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}"!="common"
+# BUILD WEARABLE
+mkdir -p build_rec_wearable
+pushd build_rec_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
+popd
+
+mkdir -p rec-profile_wearable/%{_bindir}
+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
+mkdir -p build_cir_wearable
+pushd build_cir_wearable
+%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
+popd
+
+mkdir -p cir-profile_wearable
+mkdir -p cir-profile_wearable/%{_bindir}
+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/
+mv %{buildroot}/%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png cir-profile_wearable/res/
+%endif
+
+# BUILD COMMON/TV
+mkdir -p build_common
+pushd build_common
+%cmake .. \
+               -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+               -DPKGNAME=%{name} \
+               -DPROFILE=common \
+               -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
+popd
+
+mkdir -p profile_common
+mkdir -p profile_common/%{_bindir}
+mv %{buildroot}/%{_bindir}/sysapp-launcher profile_common/%{_bindir}/sysapp-launcher.common
+
+%install
+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/
+%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/
+install -m 0755 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 0755 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}"!="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/circle_btn_check.png %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/
+install -m 0644 data/circle_btn_delete.png %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.system-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 0755 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 0755 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}/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 /%{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}"!="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 /%{_bindir}/sysapp-launcher
+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 /%{_bindir}/sysapp-launcher
+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
+
+%post -n org.tizen.powerkey-syspopup.mobile
+mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.mobile /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
+
+%post -n org.tizen.powerkey-syspopup.wearable
+mv /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup.wearable /%{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
 
 %files
 %manifest %{name}.manifest
-%{_bindir}/sysapp-launcher
-%{_datadir}/license/sysapp-launcher
+%license LICENSE.Apache-2.0
+%{_unitdir}/system-popup.service
 %{_datadir}/dbus-1/system-services/org.tizen.system.popup.service
+%config %{_sysconfdir}/dbus-1/system.d/launcher.conf
 
 #po files to support multi-languages
 %lang(ar) %{_datadir}/locale/ar/LC_MESSAGES/system-servant.mo
@@ -145,6 +483,7 @@ rm -rf %{buildroot}
 %lang(ka) %{_datadir}/locale/ka/LC_MESSAGES/system-servant.mo
 %lang(kk) %{_datadir}/locale/kk/LC_MESSAGES/system-servant.mo
 %lang(kn) %{_datadir}/locale/kn/LC_MESSAGES/system-servant.mo
+%lang(ko_KR) %{_datadir}/locale/ko_KR/LC_MESSAGES/system-servant.mo
 %lang(lt) %{_datadir}/locale/lt/LC_MESSAGES/system-servant.mo
 %lang(lv) %{_datadir}/locale/lv/LC_MESSAGES/system-servant.mo
 %lang(mk) %{_datadir}/locale/mk/LC_MESSAGES/system-servant.mo
@@ -172,12 +511,102 @@ 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
 
+%files profile_mobile
+%license LICENSE.Apache-2.0
+%defattr(-,root,root,-)
+%{_bindir}/sysapp-launcher.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
+%{_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}"!="common"
+%files extension-circle-profile_wearable
+%license LICENSE.Apache-2.0
+%defattr(-,root,root,-)
+%{_bindir}/sysapp-launcher.wearable
+%{_bindir}/system-cooperator
 
-%if %{poweroff_popup} == on
-%files -n org.tizen.poweroff-syspopup
-%manifest org.tizen.poweroff-syspopup.manifest
-%license LICENSE
+%files extension-rectangle-profile_wearable
+%license LICENSE.Apache-2.0
 %defattr(-,root,root,-)
-%{TZ_SYS_RO_APP}/org.tizen.poweroff-syspopup/bin/poweroff-popup
-%{TZ_SYS_SHARE}/packages/org.tizen.poweroff-syspopup.xml
+%{_bindir}/sysapp-launcher.wearable
+%{_bindir}/system-cooperator
 %endif
+
+%files profile_common
+%license LICENSE.Apache-2.0
+%defattr(-,root,root,-)
+%{_bindir}/sysapp-launcher.common
+
+%files -n org.tizen.crash-syspopup
+%manifest org.tizen.crash-syspopup.manifest
+%license LICENSE.Apache-2.0
+%defattr(-,root,root,-)
+%{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.mobile
+%manifest org.tizen.system-syspopup.manifest
+%license LICENSE.Apache-2.0
+%defattr(-,root,root,-)
+%{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
+
+# Because of CAPI incompatibility from EFL-EXT, wearable is buildable only for wearable and "unified (undefined)"
+%if "%{?profile}"!="mobile" && "%{?profile}"!="tv" && "%{?profile}"!="common"
+%files -n org.tizen.system-syspopup.wearable
+%manifest org.tizen.system-syspopup.manifest
+%license LICENSE.Apache-2.0
+%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_APP}/org.tizen.system-syspopup/res/circle_btn_check.png
+%{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/circle_btn_delete.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.Apache-2.0
+%defattr(-,root,root,-)
+%{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.Apache-2.0
+%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
+%manifest org.tizen.overheat-syspopup.manifest
+%license LICENSE.Apache-2.0
+%defattr(-,root,root,-)
+%{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
+
+%files -n org.tizen.system-signal-sender
+%manifest org.tizen.system-signal-sender.manifest
+%license LICENSE.Apache-2.0
+%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
+
+# The followings are meta packages to keep the compatibility with conventional profiles.
+%files profile_tv