-%if "%{profile}" == "mobile"
-%define WITH_CBHM TRUE
-%else
-%define WITH_CBHM FALSE
-%endif
-
Name: ise-default
Summary: Tizen keyboard
- Version: 1.3.22
+ Version: 1.3.23
Release: 1
Group: Graphics & UI Framework/Input
License: Apache-2.0
%build
- export CFLAGS_BASE="${CFLGAS} -DTIZEN_DEBUG_ENABLE"
- export CXXFLAGS_BASE="${CXXFLAGS} -DTIZEN_DEBUG_ENABLE -std=c++11"
-export CFLAGS+=" -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
-export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden"
++export CFLAGS_BASE="${CFLGAS} -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
++export CXXFLAGS_BASE="${CXXFLAGS} -DTIZEN_DEBUG_ENABLE -std=c++11 -fvisibility-inlines-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 .. -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" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+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 \
+ -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 .. -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
-%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 .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -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
+# 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 . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DTARGET=%{?profile} \
+ -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}