Update package version to 1.6.8
[platform/core/uifw/ise-default.git] / packaging / ise-default.spec
index 276e5eb..ed11970 100644 (file)
@@ -1,12 +1,6 @@
-%if "%{profile}" == "mobile"
-%define WITH_CBHM TRUE
-%else
-%define WITH_CBHM FALSE
-%endif
-
 Name:       ise-default
 Summary:    Tizen keyboard
-Version:    1.3.32
+Version:    1.6.8
 Release:    1
 Group:      Graphics & UI Framework/Input
 License:    Apache-2.0
@@ -24,71 +18,532 @@ BuildRequires:  pkgconfig(efl-extension)
 BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires:  pkgconfig(stt)
 BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-appfw-preference)
 BuildRequires:  pkgconfig(capi-media-audio-io)
 BuildRequires:  pkgconfig(capi-ui-inputmethod)
-%if "%{WITH_CBHM}" == "TRUE"
+BuildRequires:  pkgconfig(smartreply)
+BuildRequires:  pkgconfig(key-manager)
+BuildRequires:  pkgconfig(ode)
+Requires:       ise-engine-tables
+Requires:       ise-engine-tables-zh
+Requires:       ise-engine-hangul
+Requires:       ise-engine-glm
+Requires:       ise-engine-anthy
+Requires:       ise-engine-default
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
 BuildRequires:  pkgconfig(cbhm)
 %endif
-BuildRequires:  model-build-features
-
+Requires:       %{name}-compat = %{version}-%{release}
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
+Recommends:     %{name}-profile_common = %{version}-%{release}
+%endif
 
 %description
 Description: Tizen keyboard
 
 
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
+%package profile_common
+Summary:    ise-default binaries and resources without flavors
+Provides:   %{name}-compat = %{version}-%{release}
+Conflicts:  %{name}-profile_mobile
+Conflicts:  %{name}-profile_tv
+Conflicts:  %{name}-profile_wearable
+Conflicts:  %{name}-profile_ivi
+%description profile_common
+Tizen keyboard (ise-default) binaries and resources without flavors, intended
+to support common profiles, which does not supply any additional options
+for the build.
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
+%package profile_mobile
+Summary:    ise-default binaries and resources with mobile profile
+Provides:   %{name}-compat = %{version}-%{release}
+Conflicts:  %{name}-profile_common
+Conflicts:  %{name}-profile_tv
+Conflicts:  %{name}-profile_wearable
+Conflicts:  %{name}-profile_ivi
+%description profile_mobile
+Tizen keyboard (ise-default) binaries and resources with mobile options.
+This is intended to support mobile profiles.
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
+%package profile_tv
+Summary:    ise-default binaries and resources with tv profile
+Provides:   %{name}-compat = %{version}-%{release}
+Conflicts:  %{name}-profile_common
+Conflicts:  %{name}-profile_mobile
+Conflicts:  %{name}-profile_wearable
+Conflicts:  %{name}-profile_ivi
+%description profile_tv
+Tizen keyboard (ise-default) binaries and resources with tv options.
+This is intended to support tv profiles.
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv"
+%package profile_ivi
+Summary:    ise-default binaries and resources with ivi profile
+Provides:   %{name}-compat = %{version}-%{release}
+Conflicts:  %{name}-profile_common
+Conflicts:  %{name}-profile_mobile
+Conflicts:  %{name}-profile_wearable
+Conflicts:  %{name}-profile_tv
+%description profile_ivi
+Tizen keyboard (ise-default) binaries and resources with ivi options.
+This is intended to support ivi profiles.
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+# Common is blocked because wearable has extra efl-ext entries, which will be
+# removed for unified build env later.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
+%package profile_wearable
+Summary:    Meta package of ise-default for wearable profiles. (circle/rectangle)
+Provides:   %{name}-compat = %{version}-%{release}
+Conflicts:  %{name}-profile_common
+Conflicts:  %{name}-profile_mobile
+Conflicts:  %{name}-profile_tv
+Conflicts:  %{name}-profile_ivi
+Requires:   %{name}-profile_wearable-extension = %{version}-%{release}
+Recommends: %{name}-profile_wearable-extension-circle = %{version}-%{release}
+%description profile_wearable
+Meta package of Tizen keyboard (ise-default) binaries and resources with
+wearable options.
+
+%package profile_wearable-extension-circle
+Summary:    ise-default binaries and resources with wearable profile (circle)
+Provides:   %{name}-profile_wearable-extension = %{version}-%{release}
+Conflicts:  %{name}-profile_wearable-extension-rectangle
+%description profile_wearable-extension-circle
+Tizen keyboard (ise-default) binaries and resources with wearable options.
+This is intended to support wearable profiles with circle display.
+
+%package profile_wearable-extension-rectangle
+Summary:    ise-default binaries and resources with wearable profile (rectangle)
+Provides:   %{name}-profile_wearable-extension = %{version}-%{release}
+Conflicts:  %{name}-profile_wearable-extension-circle
+%description profile_wearable-extension-rectangle
+Tizen keyboard (ise-default) binaries and resources with wearable options.
+This is intended to support wearable profiles with rectangle display.
+%endif
 
 %prep
 %setup -q
 
 
 %build
-export CFLAGS+=" -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
-export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden"
+export CFLAGS_BASE="${CFLAGS} -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
+export CXXFLAGS_BASE="${CXXFLAGS} -DTIZEN_DEBUG_ENABLE -std=c++11 -fvisibility-inlines-hidden -fvisibility=hidden"
 export FFLAGS+=" -DTIZEN_DEBUG_ENABLE"
 
-%if "%{profile}" == "wearable"
-CFLAGS+=" -D_WEARABLE";
-CXXFLAGS+=" -D_WEARABLE";
-%if "%{model_build_feature_formfactor}" == "circle"
-CFLAGS+=" -D_CIRCLE";
-CXXFLAGS+=" -D_CIRCLE";
-%endif
+rm -rf CMakeFiles
+rm -rf CMakeCache.txt
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+# Common is blocked because wearable has extra efl-ext entries, which will be
+# removed for unified build env later.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
+mkdir -p build_wearable_rec
+pushd build_wearable_rec
+export CFLAGS="${CFLAGS_BASE} -D_WEARABLE";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_WEARABLE";
+%cmake .. -DTARGET=wearable \
+         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
+
+make %{?jobs:-j%jobs}
+popd
+
+mkdir -p build_wearable_cir
+pushd build_wearable_cir
+export CFLAGS="${CFLAGS_BASE} -D_WEARABLE -D_CIRCLE";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_WEARABLE -D_CIRCLE";
+%cmake .. -DTARGET=wearable \
+         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
+
+make %{?jobs:-j%jobs}
+popd
 %endif
 
-%if "%{profile}" == "mobile"
-CFLAGS+=" -D_MOBILE";
-CXXFLAGS+=" -D_MOBILE";
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+mkdir -p build_mobile
+pushd build_mobile
+export CFLAGS="${CFLAGS_BASE} -D_MOBILE";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_MOBILE";
+%cmake .. -DTARGET=mobile \
+         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
+         -Dwith_cbhm=TRUE
+
+make %{?jobs:-j%jobs}
+popd
 %endif
 
-%if "%{profile}" == "tv"
-CFLAGS+=" -D_TV";
-CXXFLAGS+=" -D_TV";
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+mkdir -p build_tv
+pushd build_tv
+export CFLAGS="${CFLAGS_BASE} -D_TV";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_TV";
+%cmake .. -DTARGET=tv \
+         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
+
+make %{?jobs:-j%jobs}
+popd
 %endif
 
-%if "%{profile}" == "ivi"
-CFLAGS+=" -D_IVI";
-CXXFLAGS+=" -D_IVI";
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common"
+mkdir -p build_ivi
+pushd build_ivi
+export CFLAGS="${CFLAGS_BASE} -D_IVI";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_IVI";
+%cmake .. -DTARGET=ivi \
+         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
+
+make %{?jobs:-j%jobs}
+popd
 %endif
 
-rm -rf CMakeFiles
-rm -rf CMakeCache.txt
-%cmake . -DTARGET=%{?profile} \
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
+export CFLAGS="${CFLAGS_BASE}";
+export CXXFLAGS="${CXXFLAGS_BASE}";
+%cmake . -DTARGET=common \
         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
-        -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
-        -Dwith_cbhm=%{WITH_CBHM}
+        -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
 
 make %{?jobs:-j%jobs}
+%endif
 
 %install
 rm -rf %{buildroot}
 
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
 %make_install
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/common
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+mv bin common/
+mkdir -p common/res
+pushd res
+for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../common/res/; fi; done
+popd
+popd
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+pushd build_mobile
+%make_install
+popd
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/mobile
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+mv bin mobile/
+mkdir -p mobile/res
+pushd res
+for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../mobile/res/; fi; done
+popd
+popd
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+pushd build_tv
+%make_install
+popd
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/tv
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+mv bin tv/
+mkdir -p tv/res
+pushd res
+for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../tv/res/; fi; done
+popd
+popd
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common"
+pushd build_ivi
+%make_install
+popd
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ivi
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+mv bin ivi/
+mkdir -p ivi/res
+pushd res
+for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../ivi/res/; fi; done
+popd
+popd
+%endif
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+# Common is blocked because wearable has extra efl-ext entries, which will be
+# removed for unified build env later.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
+pushd build_wearable_cir
+%make_install
+popd
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/wearable-circle
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+mv bin wearable-circle/
+mkdir -p wearable-circle/res
+pushd res
+for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../wearable-circle/res/; fi; done
+popd
+popd
+
+pushd build_wearable_rec
+%make_install
+popd
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/wearable-rectangle
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+mv bin wearable-rectangle/
+mkdir -p wearable-rectangle/res
+pushd res
+for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../wearable-rectangle/res/; fi; done
+popd
+popd
+%endif
+
 %find_lang %{name}
 
 %files -f %{name}.lang
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%{TZ_SYS_RO_APP}/*
 %{TZ_SYS_RO_PACKAGES}/%{name}.xml
 %license LICENSE
 
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
+%post profile_common
+pushd %{TZ_SYS_RO_APP}/ise-default/common/
+mkdir -p ../res
+mkdir -p ../bin
+# If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
+if [ "$1" = "2" ]; then
+    rm -Rf ../bin/*
+    pushd ../res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+fi
+for FILE in bin/*; do ln -sf "../common/${FILE}" ../bin; done
+for FILE in res/*; do ln -sf "../common/${FILE}" ../res; done
+popd
+%preun profile_common
+# Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
+if [ "$1" = "0" ]; then
+    pushd %{TZ_SYS_RO_APP}/ise-default
+    rm -Rf bin
+    pushd res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+    popd
+fi
+%files profile_common
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/ise-default/common/*
+%endif
+
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post profile_mobile
+pushd %{TZ_SYS_RO_APP}/ise-default/mobile/
+mkdir -p ../res
+mkdir -p ../bin
+# If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
+if [ "$1" = "2" ]; then
+    rm -Rf ../bin/*
+    pushd ../res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+fi
+for FILE in bin/*; do ln -sf "../mobile/${FILE}" ../bin; done
+for FILE in res/*; do ln -sf "../mobile/${FILE}" ../res; done
+popd
+%preun profile_mobile
+# Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
+if [ "$1" = "0" ]; then
+    pushd %{TZ_SYS_RO_APP}/ise-default
+    rm -Rf bin
+    pushd res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+    popd
+fi
+%files profile_mobile
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/ise-default/mobile/*
+%endif
+
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%post profile_tv
+pushd %{TZ_SYS_RO_APP}/ise-default/tv/
+mkdir -p ../res
+mkdir -p ../bin
+# If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
+if [ "$1" = "2" ]; then
+    rm -Rf ../bin/*
+    pushd ../res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+fi
+for FILE in bin/*; do ln -sf "../tv/${FILE}" ../bin; done
+for FILE in res/*; do ln -sf "../tv/${FILE}" ../res; done
+popd
+%preun profile_tv
+# Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
+if [ "$1" = "0" ]; then
+    pushd %{TZ_SYS_RO_APP}/ise-default
+    rm -Rf bin
+    pushd res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+    popd
+fi
+%files profile_tv
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/ise-default/tv/*
+%endif
+
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common"
+%post profile_ivi
+pushd %{TZ_SYS_RO_APP}/ise-default/ivi/
+mkdir -p ../res
+mkdir -p ../bin
+# If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
+if [ "$1" = "2" ]; then
+    rm -Rf ../bin/*
+    pushd ../res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+fi
+for FILE in bin/*; do ln -sf "../ivi/${FILE}" ../bin; done
+for FILE in res/*; do ln -sf "../ivi/${FILE}" ../res; done
+popd
+%preun profile_ivi
+# Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
+if [ "$1" = "0" ]; then
+    pushd %{TZ_SYS_RO_APP}/ise-default
+    rm -Rf bin
+    pushd res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+    popd
+fi
+%files profile_ivi
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/ise-default/ivi/*
+%endif
+
+
+# This is for old profile-based OBS project optimizations.
+# In 4.0 unified build env, this if statement is always true.
+# Common is blocked because wearable has extra efl-ext entries, which will be
+# removed for unified build env later.
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
+%files profile_wearable
+
+%post profile_wearable-extension-circle
+pushd %{TZ_SYS_RO_APP}/ise-default/wearable-circle/
+mkdir -p ../res
+mkdir -p ../bin
+# If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
+if [ "$1" = "2" ]; then
+    rm -Rf ../bin/*
+    pushd ../res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+fi
+for FILE in bin/*; do ln -sf "../wearable-circle/${FILE}" ../bin; done
+for FILE in res/*; do ln -sf "../wearable-circle/${FILE}" ../res; done
+popd
+%preun profile_wearable-extension-circle
+# Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
+if [ "$1" = "0" ]; then
+    pushd %{TZ_SYS_RO_APP}/ise-default
+    rm -Rf bin
+    pushd res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+    popd
+fi
+%files profile_wearable-extension-circle
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/ise-default/wearable-circle/*
+
+
+%post profile_wearable-extension-rectangle
+pushd %{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/
+mkdir -p ../res
+mkdir -p ../bin
+# If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
+if [ "$1" = "2" ]; then
+    rm -Rf ../bin/*
+    pushd ../res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+fi
+for FILE in bin/*; do ln -sf "../wearable-rectangle/${FILE}" ../bin; done
+for FILE in res/*; do ln -sf "../wearable-rectangle/${FILE}" ../res; done
+popd
+%preun profile_wearable-extension-rectangle
+# Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
+if [ "$1" = "0" ]; then
+    pushd %{TZ_SYS_RO_APP}/ise-default
+    rm -Rf bin
+    pushd res
+    for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
+    popd
+    popd
+fi
+%files profile_wearable-extension-rectangle
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/*
+%endif