diff options
author | Jiyong Min <jiyong.min@samsung.com> | 2016-09-12 16:02:44 +0900 |
---|---|---|
committer | Jiyong Min <jiyong.min@samsung.com> | 2016-09-19 13:32:36 +0900 |
commit | 5fe97d563a61d1ec7aef9cc6f884d614945bfd2e (patch) | |
tree | 0c2990fbce3f57d529dcde8354f25722d1f8e626 | |
parent | 8ece3702c46c7a9bed5c933f90d744e8bd050922 (diff) | |
download | media-controller-5fe97d563a61d1ec7aef9cc6f884d614945bfd2e.tar.gz media-controller-5fe97d563a61d1ec7aef9cc6f884d614945bfd2e.tar.bz2 media-controller-5fe97d563a61d1ec7aef9cc6f884d614945bfd2e.zip |
Add upgrade scripts 2.4 to 3.0
Change-Id: Id40bd6b5410e52404b0eb50a8b168848ab5d0ad5
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
-rw-r--r-- | packaging/capi-media-controller.spec | 11 | ||||
-rw-r--r-- | packaging/media-controller.upgrade.sh | 28 |
2 files changed, 37 insertions, 2 deletions
diff --git a/packaging/capi-media-controller.spec b/packaging/capi-media-controller.spec index 74c4adf..a277989 100644 --- a/packaging/capi-media-controller.spec +++ b/packaging/capi-media-controller.spec @@ -1,6 +1,6 @@ Name: capi-media-controller Summary: A media controller library in Tizen Native API -Version: 0.1.23 +Version: 0.1.24 Release: 1 Group: Multimedia/API License: Apache-2.0 @@ -9,6 +9,7 @@ Source1: mediacontroller.service Source2: mediacontroller.socket Source3: media-controller-user.service Source4: mediacontroller-ipc.socket +Source5: media-controller.upgrade.sh BuildRequires: cmake BuildRequires: sqlite BuildRequires: pkgconfig(capi-base-common) @@ -26,6 +27,8 @@ BuildRequires: pkgconfig(libtzplatform-config) BuildRequires: pkgconfig(cynara-client) BuildRequires: pkgconfig(cynara-session) +%define upgrade_script_path /usr/share/upgrade/scripts + %description This package provides a media controller library in Tizen Native API @@ -74,6 +77,10 @@ install -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/mediacontroller-ipc.socket ln -s ../mediacontroller.socket %{buildroot}%{_unitdir}/sockets.target.wants/mediacontroller.socket ln -s ../mediacontroller-ipc.socket %{buildroot}%{_unitdir}/sockets.target.wants/mediacontroller-ipc.socket +#OS Upgrade +mkdir -p %{buildroot}%{upgrade_script_path} +cp -f %{SOURCE5} %{buildroot}%{upgrade_script_path} + %post %postun @@ -88,13 +95,13 @@ ln -s ../mediacontroller-ipc.socket %{buildroot}%{_unitdir}/sockets.target.wants %defattr(-,root,root,-) %{_bindir}/mediacontroller %manifest media-controller-service.manifest -%defattr(-,multimedia_fw,multimedia_fw,-) %{_unitdir}/mediacontroller.service %{_unitdir}/mediacontroller.socket %{_unitdir}/sockets.target.wants/mediacontroller.socket %{_unitdir}/mediacontroller-ipc.socket %{_unitdir}/sockets.target.wants/mediacontroller-ipc.socket %{_datadir}/license/mediacontroller +%{upgrade_script_path}/media-controller.upgrade.sh %files devel %{_libdir}/*.so diff --git a/packaging/media-controller.upgrade.sh b/packaging/media-controller.upgrade.sh new file mode 100644 index 0000000..ed5f617 --- /dev/null +++ b/packaging/media-controller.upgrade.sh @@ -0,0 +1,28 @@ +#!/bin/sh +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +#-----------------------------------------------# +# media-controller patch for upgrade (2.4 -> 3.0) # +#-------------------------------------------------# + +# Macro +DB_DIR_24=/opt/usr/dbspace +DB_DIR_30=/opt/usr/home/owner/.applications/dbspace + +DB_FILE_24=$DB_DIR_24/.media-controller.db +DB_FILE_30=$DB_DIR_30/.media-controller.db + +if [ -e $DB_FILE_24 ] +then +# Move +mv $DB_FILE_24 $DB_FILE_30 +mv $DB_FILE_24-journal $DB_FILE_30-journal + +# Set permission +chmod 0644 $DB_FILE_30 +chmod 0644 $DB_FILE_30-journal +chown -R multimedia_fw:multimedia_fw $DB_FILE_30 +chown -R multimedia_fw:multimedia_fw $DB_FILE_30-journal +chsmack -a 'User::Home' $DB_FILE_30 +chsmack -a 'User::Home' $DB_FILE_30-journal +fi |