SET(DECLARE_POPUP_SMACK_PROCESS_LABEL "")
CONFIGURE_FILE(packaging/${SERVICE_NAME}.manifest.in ${SERVICE_NAME}.manifest @ONLY)
CONFIGURE_FILE(packaging/${SERVICE_NAME}-test.manifest.in ${SERVICE_NAME}-test.manifest @ONLY)
+ CONFIGURE_FILE(data/scripts/${SERVICE_NAME}-upgrade.sh.in data/scripts/${SERVICE_NAME}-upgrade.sh @ONLY)
ELSE (PLATFORM_VERSION_3)
SET(DECLARE_POPUP_USER User=app)
SET(DECLARE_POPUP_GROUP Group=app)
--- /dev/null
+#!/bin/bash
+#
+# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# @file csr-upgrade.sh.in
+# @author Kyungwook Tak (k.tak@samsung.com)
+# @brief Create RW data/directory for platform upgrade(2.4->3.0) scenario
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+mkdir -p @RW_DBSPACE@ @ENGINE_RW_WORKING_DIR@
+chown @SERVICE_USER@:@SERVICE_GROUP@ @RW_DBSPACE@ @ENGINE_RW_WORKING_DIR@
+chsmack -t -a @SMACK_DOMAIN_NAME@ @RW_DBSPACE@ @ENGINE_RW_WORKING_DIR@
%global popup_service_env_file_path /run/tizen-system-env
%global smack_domain_name System
%global popup_unitdir %{_unitdir_user}
+%global upgrade_script_dir %{ro_data_dir}/upgrade/scripts
%else
%global service_user system
%global service_group system
mkdir -p %{buildroot}%{ro_db_dir}
cp data/scripts/*.sql %{buildroot}%{ro_db_dir}
+%if "%{?tizen_version}" == "3.0"
+mkdir -p %{buildroot}%{upgrade_script_dir}
+cp data/scripts/%{service_name}-upgrade.sh %{buildroot}%{upgrade_script_dir}
+%endif
+
mkdir -p %{buildroot}%{engine_dir}
mkdir -p %{buildroot}%{engine_rw_working_dir}
%dir %{engine_dir}
%dir %attr(775, %{service_user}, %{service_group}) %{engine_rw_working_dir}
+# RW area platform upgrade script
+%if "%{?tizen_version}" == "3.0"
+%attr(755, -, -) %{upgrade_script_dir}/%{service_name}-upgrade.sh
+%endif
+
%files -n lib%{name}-common
%defattr(-,root,root,-)
%manifest %{service_name}-common.manifest