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")
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
%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,-)