BuildRequires: pkgconfig(cryptsvc)
BuildRequires: pkgconfig(libtzplatform-config)
+%global ro_share_dir %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:%_datadir}
%global bin_dir %{?TZ_SYS_BIN:%TZ_SYS_BIN}%{!?TZ_SYS_BIN:%_bindir}
-%global ro_data_dir %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE/tizen_app_drm}%{!?TZ_SYS_RO_SHARE:%_datadir/tizen_app_drm}
-%global test_data_dir %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE/drm_test}%{!?TZ_SYS_RO_SHARE:%_datadir/drm_test}
+%global ro_data_dir %{ro_share_dir}/tizen_app_drm
+%global test_data_dir %{ro_share_dir}/drm_test
+%global upgrade_script_dir %{ro_share_dir}/upgrade/scripts
%global db_dir %{?TZ_SYS_DB:%TZ_SYS_DB}%{!?TZ_SYS_DB:/opt/dbspace}
%description
%install
%make_install
+mkdir -p %{buildroot}%{upgrade_script_dir}
+cp scripts/200.drm-service-core-tizen.sh %{buildroot}%{upgrade_script_dir}/
%post
%{bin_dir}/rm -f /etc/ld.so.cache
%{_libdir}/lib%{name}.so.*
%{bin_dir}/drm_tizen_initialize
%{ro_data_dir}/root_certs/ro_root_cert.pem
+%{upgrade_script_dir}/200.drm-service-core-tizen.sh
%files devel
%{_libdir}/pkgconfig/%{name}.pc
--- /dev/null
+#!/bin/bash
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# 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 200.drm-service-core-tizen.sh
+# @author Kyungwook Tak (k.tak@samsung.com)
+# @breif
+
+chsmack -a "System" /opt/dbspace/.dtapps.db*
+chown app_fw:app_fw /opt/dbspace/.dtapps.db*
+chmod 600 /opt/dbspace/.dtapps.db*