BuildRequires: pkgconfig(stt)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-media-audio-io)
-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"
+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"
+%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
+%description profile_common
+Tizen keyboard (ise-default) binaries and resources without flavors, intended
+to support common/ivi 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"
+%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
+%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"
+%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
+%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.
+# 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"
+%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
+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"
-export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE -std=c++11"
+export CFLAGS_BASE+=" -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS_BASE+=" -DTIZEN_DEBUG_ENABLE -std=c++11"
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"
+mkdir -p build_wearable_rec
+pushd build_wearable_rec
+export CFLAGS="${CFLAGS_BASE} -D_WEARABLE";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_WEARABLE";
+cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -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 .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -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"
+mkdir -p build_mobile
+pushd build_mobile
+export CFLAGS="${CFLAGS_BASE} -D_MOBILE";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_MOBILE";
+cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DTARGET=mobile \
+ -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+ -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
+
+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"
+mkdir -p build_tv
+pushd build_tv
+export CFLAGS="${CFLAGS_BASE} -D_TV";
+export CXXFLAGS="${CXXFLAGS_BASE} -D_TV";
+cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DTARGET=tv \
+ -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
+# 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"
+export CFLAGS="${CFLAGS_BASE}";
+export CXXFLAGS="${CXXFLAGS_BASE}";
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DTARGET=%{?profile} \
+ -DTARGET=common \
-DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
-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"
%make_install
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/common
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+rm -Rf res_shared
+mkdir -p res_shared
+mv res/locale res_shared
+mv bin res common/
+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"
+pushd build_mobile
+%make_install
+popd
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/mobile
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+rm -Rf res_shared
+mkdir -p res_shared
+mv res/locale res_shared
+mv bin res mobile
+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"
+pushd build_tv
+%make_install
+popd
+mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/tv
+pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
+rm -Rf res_shared
+mkdir -p res_shared
+mv res/locale res_shared
+mv bin res tv
+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"
+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/
+rm -Rf res_shared
+mkdir -p res_shared
+mv res/locale res_shared
+mv bin res wearable-circle
+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/
+rm -Rf res_shared
+mkdir -p res_shared
+mv res/locale res_shared
+mv bin res wearable-rectangle
+popd
+%endif
+
+mv %{buildroot}%{TZ_SYS_RO_APP}/ise-default/res_shared %{buildroot}%{TZ_SYS_RO_APP}/ise-default/res
+
%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"
+%post profile_common
+pushd %{TZ_SYS_RO_APP}/ise-default
+ln -sf common/bin bin
+pushd res
+ln -sf ../common/res/* .
+popd
+popd
+%preun profile_common
+pushd %{TZ_SYS_RO_APP}/ise-default
+rm bin
+popd
+%files profile_common
+%exclude %{TZ_SYS_RO_APP}/ise-default/common/res/locale
+%{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"
+%post profile_mobile
+pushd %{TZ_SYS_RO_APP}/ise-default
+ln -sf mobile/bin bin
+pushd res
+ln -sf ../mobile/res/* .
+popd
+popd
+%preun profile_mobile
+pushd %{TZ_SYS_RO_APP}/ise-default
+rm bin
+popd
+%files profile_mobile
+%exclude %{TZ_SYS_RO_APP}/ise-default/mobile/res/locale
+%{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"
+%post profile_tv
+pushd %{TZ_SYS_RO_APP}/ise-default
+ln -sf tv/bin bin
+pushd res
+ln -sf ../tv/res/* .
+popd
+popd
+%preun profile_tv
+pushd %{TZ_SYS_RO_APP}/ise-default
+rm bin
+popd
+%files profile_tv
+%exclude %{TZ_SYS_RO_APP}/ise-default/tv/res/locale
+%{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.
+# 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"
+%files profile_wearable
+
+%post profile_wearable-extension-circle
+pushd %{TZ_SYS_RO_APP}/ise-default
+ln -sf wearable-circle/bin bin
+pushd res
+ln -sf ../wearable-circle/res/* .
+popd
+popd
+%preun profile_wearable-extension-circle
+pushd %{TZ_SYS_RO_APP}/ise-default
+rm bin
+popd
+%files profile_wearable-extension-circle
+%exclude %{TZ_SYS_RO_APP}/ise-default/wearable-circle/res/locale
+%{TZ_SYS_RO_APP}/ise-default/wearable-circle/*
+
+
+%post profile_wearable-extension-rectangle
+pushd %{TZ_SYS_RO_APP}/ise-default
+ln -sf wearable-rectangle/bin bin
+pushd res
+ln -sf ../wearable-rectangle/res/* .
+popd
+popd
+%preun profile_wearable-extension-rectangle
+pushd %{TZ_SYS_RO_APP}/ise-default
+rm bin
+popd
+%files profile_wearable-extension-rectangle
+%exclude %{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/res/locale
+%{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/*
+%endif