From: MyungJoo Ham Date: Wed, 9 Nov 2016 11:59:55 +0000 (+0900) Subject: Remove Profile Build Dependency and Model-Build-Features X-Git-Tag: submit/tizen/20161117.115127^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F17%2F96617%2F2;p=platform%2Fcore%2Fuifw%2Fise-default.git Remove Profile Build Dependency and Model-Build-Features - This is for Tizen 4.0 - When SR'ing this commit, the maintainer needs to create JIRA-TRE issue of: - Add ise-default-profile_mobile for mobile profile - Add ise-default-profile_common for common profile - Add ise-default-profile_tv for tv profile - Add ise-default-profile_ivi for ivi profile - Add ise-default-profile_wearable for wearable profile - Add ise-default-profile_wearable-extension-circle for wearable profile with circle display - Add ise-default-profile_wearable-extension-rectangle for wearable profile with rectangle display - With this, other packages with "Requires/BuildRequres" directly/indirectly to ise-default can be built profile-independently. (more than 100 packages!) Change-Id: Icccc97d4380a6a94cd5cfae132260712f0794486 Signed-off-by: MyungJoo Ham --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 25e3cf6..84c520c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,6 +129,7 @@ ADD_DEPENDENCIES(${PROJECT_NAME} layout_keypad.edj) INSTALL(FILES ${CMAKE_BINARY_DIR}/layout_keypad.edj DESTINATION ${ISE_LAYOUTDIR}/sdk/edc) if(${TARGET} STREQUAL "wearable") +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/res/wearable/edje) ADD_CUSTOM_TARGET(w-input-stt.edj COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/edje/wearable/images ${CMAKE_CURRENT_SOURCE_DIR}/res/wearable/edje/w-input-stt.edc @@ -148,6 +149,7 @@ INSTALL(FILES ${CMAKE_BINARY_DIR}/res/wearable/edje/w-input-stt-button.edj DESTI ${ISE_RESDIR}/edje/wearable) else() +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/res/mobile/edje) ADD_CUSTOM_TARGET(w-input-stt.edj COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/edje/mobile/images ${CMAKE_CURRENT_SOURCE_DIR}/res/mobile/edje/w-input-stt.edc diff --git a/packaging/ise-default.spec b/packaging/ise-default.spec index 8440dd0..9d78056 100644 --- a/packaging/ise-default.spec +++ b/packaging/ise-default.spec @@ -23,61 +23,361 @@ BuildRequires: pkgconfig(libtzplatform-config) 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