From: hk57.kim Date: Wed, 29 Mar 2017 05:29:29 +0000 (+0900) Subject: [Tizen] Remove emulator build dependencies X-Git-Tag: accepted/tizen/unified/20170406.054734~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbf3ec33ed7e4f9aa6968cdcf65544216d751904;p=apps%2Fnative%2Fug-bluetooth-efl.git [Tizen] Remove emulator build dependencies - This is for Tizen 4.0. - Added backward-compatibility that does not deteriorate 4.0 Configurability - When you SR this, you need to create JIRA-TRE issue of: : add ug-bluetooth-efl-extension-emulator for all(common/mobile/wearable/ivi/tv) emulator (It's add, not replace.) Change-Id: I6804359f2ad38f4f97f3be58bbd1541b2ca4c608 Signed-off-by: hk57.kim --- diff --git a/packaging/ug-bluetooth-efl.spec b/packaging/ug-bluetooth-efl.spec index 3949b4e..8ee0dbc 100644 --- a/packaging/ug-bluetooth-efl.spec +++ b/packaging/ug-bluetooth-efl.spec @@ -57,6 +57,14 @@ Source1: contacts.h %description UI gadget about the bluetooth +%ifarch %{ix86} x86_64 +%package extension-emulator +Summary: UI gadget about the bluetooth for emulator +Requires: %{name} = %{version}-%{release} +%description extension-emulator +UI gadget about the bluetooth for emulator +%endif // ifarch %{ix86} x86_64 + %prep %setup -q @@ -71,21 +79,38 @@ cp %SOURCE1 common/include/contacts.h LDFLAGS="$LDFLAGS -Wl,-z -Wl,nodelete" -%if "%{?_with_emulator}" == "1" -export CFLAGS="$CFLAGS -DTIZEN_TEST_EMUL" -export CXXFLAGS="$CXXFLAGS -DTIZEN_TEST_EMUL" -export FFLAGS="$FFLAGS -DTIZEN_TEST_EMUL" -%endif - -export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE" -export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" -export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" -export LDFLAGS +export CFLAGS_BASE="${CFALGS}" +export CXXFLAGS_BASE="${CXXFLAGS}" +export FFLAGS_BASE="${FFLAGS}" # Uncomment to disable BT_HOG of mobile. (refer to the end of common/include/bt-util.h) # Without TIZEN_FEATURE_DISBALE_BT_HOG, BT_HOG is enabled for mobile. #export CFLAGS+=" -DTIZEN_FEATURE_DISABLE_BT_HOG" +# extension-emulator +%ifarch %{ix86} x86_64 +export CFLAGS="${CFLAGS_BASE} -DTIZEN_TEST_EMUL" +export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_TEST_EMUL" +export FFLAGS="${FFLAGS_BASE} -DTIZEN_TEST_EMUL" + +mkdir -p build_emulator +pushd build_emulator +# TV profile does not have contacts-service2. +# Do not build for unified environment if it is TV. +# ==> The usage of "profile" in this spec file is allowed only for excluding TV profile +# from unified building. +%if "%{?profile}" != "tv" +%cmake .. -DCMAKE_INSTALL_PREFIX=%{_ugdir}/ +%else +%cmake .. -DTIZEN_WITHOUT_CONTACTS="1" -DCMAKE_INSTALL_PREFIX=%{_ugdir}/ +%endif +popd +%endif // ifarch %{ix86} x86_64 + +# non-emulator +export CFLAGS="${CFLAGS_BASE} -DTIZEN_DEBUG_ENABLE" +export CXXFLAGS="${CXXFLAGS_BASE} -DTIZEN_DEBUG_ENABLE" +export FFLAGS="${FFLAGS_BASE} -DTIZEN_DEBUG_ENABLE" # TV profile does not have contacts-service2. # Do not build for unified environment if it is TV. @@ -107,6 +132,17 @@ ln -sf /usr/bin/ug-client /usr/ug/bin/setting-bluetooth-efl-single %install rm -rf %{buildroot} +# extension-emulator +%ifarch %{ix86} x86_64 +pushd build_emulator +%make_install +popd +pushd %{buildroot}%{_ugdir}/lib/ +for FILE in libug-setting-bluetooth-efl.so*; do mv "${FILE}" "${FILE}.emulator"; done +popd +%endif // ifarch %{ix86} x86_64 + +# non-emulator %make_install %files @@ -123,3 +159,22 @@ rm -rf %{buildroot} %exclude %{_ugdir}/res/tables/ug-setting-bluetooth-efl/ug-bluetooth-efl_ChangeableColorTable.xml %exclude %{_ugdir}/res/tables/ug-setting-bluetooth-efl/ug-bluetooth-efl_FontInfoTable.xml %{_ugdir}/lib/libug-setting-bluetooth-efl.so.* +%exclude %{_ugdir}/lib/libug-setting-bluetooth-efl.so.emulator +%exclude %{_ugdir}/lib/libug-setting-bluetooth-efl.so.*.emulator + +%ifarch %{ix86} x86_64 +%post extension-emulator +pushd %{_ugdir}/lib/ +for FILE in libug-setting-bluetooth-efl.so*.emulator; do mv "${FILE}" "${FILE%.emulator}"; done +popd +/sbin/ldconfig +%preun extension-emulator +pushd %{_ugdir}/lib/ +for FILE in libug-setting-bluetooth-efl.so*; do mv "${FILE}" "${FILE}.emulator"; done +popd +%postun extension-emulator -p /sbin/ldconfig +%files extension-emulator +%manifest ug-bluetooth-efl.manifest +%{_ugdir}/lib/libug-setting-bluetooth-efl.so.emulator +%{_ugdir}/lib/libug-setting-bluetooth-efl.so.*.emulator +%endif // ifarch %{ix86} x86_64