Remove Profile Build Dependency 99/98099/13
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 18 Jan 2017 02:24:31 +0000 (11:24 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 18 Jan 2017 02:34:45 +0000 (11:34 +0900)
- This is for Tizen 4.0.
(Tizen 4.0 Configurability & Building Blocks)

Change-Id: Id14f6f17e7aeb1e8fd1e2baa366fa6ca8ff00ce1
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: hk57.kim <hk57.kim@samsung.com>
CMakeLists.txt
packaging/libwidget_service.spec

index e26033cacb91aeec615d90f1a72a10dc8e3de1dd..2d165e3e29cd675e86bc2561360480cf0b314268 100644 (file)
@@ -76,7 +76,8 @@ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/widget_service_internal.h DEST
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/widget_errno.h DESTINATION include/${PROJECT_NAME})
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/widget_instance.h DESTINATION include/${PROJECT_NAME})
 
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${TARGET}/${PROFILE}.resolution.ini DESTINATION /usr/share/${PROJECT_NAME} RENAME "resolution.ini" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${TARGET}/wayland.mobile.resolution.ini DESTINATION /usr/share/${PROJECT_NAME} RENAME "mobile.resolution.ini" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${TARGET}/wayland.wearable.resolution.ini DESTINATION /usr/share/${PROJECT_NAME} RENAME "wearable.resolution.ini" PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
 
 IF("${TARGET}" STREQUAL "emulator")
 
index fe1237411fe430fe408d4cc37955cfa8469d9f5a..03ecf78c891da72022713c9a04213dcd62df7e99 100644 (file)
@@ -58,16 +58,10 @@ export TARGET=emulator
 export TARGET=device
 %endif
 
-%if "%{profile}" != "wearable"
-export PROFILE=wayland.mobile
-%else
-export PROFILE=wayland.wearable
-%endif
-
 sqlite3 .widget.db < ./parser/widget.sql
 
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DPROFILE=${PROFILE} -DTARGET=${TARGET}
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DTARGET=${TARGET}
 make %{?jobs:-j%jobs}
 
 %install
@@ -96,6 +90,24 @@ chsmack -a "User::Home" %{_sysconfdir}/skel/.applications/dbspace/.widget.db-jou
 %postun -n %{name}
 /sbin/ldconfig
 
+%posttrans
+if [ -e %{_sysconfdir}/config/model-config.xml ]; then
+       PROFILE=`grep "feature\/profile" %{_sysconfdir}/config/model-config.xml`
+       if [[ "${PROFILE}" == *"mobile"* ]]; then
+               rm %{_datarootdir}/widget_service/wearable.resolution.ini
+               mv -f %{_datarootdir}/widget_service/mobile.resolution.ini %{_datarootdir}/widget_service/resolution.ini
+       elif [[ "${PROFILE}" == *"wearable"* ]]; then
+               rm %{_datarootdir}/widget_service/mobile.resolution.ini
+               mv -f %{_datarootdir}/widget_service/wearable.resolution.ini %{_datarootdir}/widget_service/resolution.ini
+       else
+               rm %{_datarootdir}/widget_service/mobile.resolution.ini
+               rm %{_datarootdir}/widget_service/wearable.resolution.ini
+       fi
+else
+       rm %{_datarootdir}/widget_service/mobile.resolution.ini
+       rm %{_datarootdir}/widget_service/wearable.resolution.ini
+fi
+
 %files -n %{name}
 %manifest %{name}.manifest
 %defattr(-,root,root,-)