summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjomui <jongmun.woo@samsung.com>2016-09-06 10:59:10 +0900
committerjomui <jongmun.woo@samsung.com>2016-09-06 11:43:36 +0900
commit7e2c135b772eac67642da2c92a12e98e1a17d26f (patch)
treeeb354850fdebdb94a763942c5ac40877f407aadc
parentd9eccda1618626a95fbaf90136b417b537a3967c (diff)
downloadgeofence-server-7e2c135b772eac67642da2c92a12e98e1a17d26f.tar.gz
geofence-server-7e2c135b772eac67642da2c92a12e98e1a17d26f.tar.bz2
geofence-server-7e2c135b772eac67642da2c92a12e98e1a17d26f.zip
Signed-off-by: jomui <jongmun.woo@samsung.com> Change-Id: I880537d0b7252d59954fa5654e48918ccee8c930
-rw-r--r--packaging/geofence-server.spec7
-rw-r--r--scripts/geofence-server_upgrade.sh21
2 files changed, 27 insertions, 1 deletions
diff --git a/packaging/geofence-server.spec b/packaging/geofence-server.spec
index 3855e92..728ef7b 100644
--- a/packaging/geofence-server.spec
+++ b/packaging/geofence-server.spec
@@ -11,6 +11,8 @@ Source1: geofence-server.service
ExcludeArch: %{arm} %ix86 x86_64
%endif
+%define upgrade_script_path /usr/share/upgrade/scripts/
+
Requires(post): sqlite
Requires(post): lbs-server
BuildRequires: cmake
@@ -60,6 +62,9 @@ make %{?jobs:-j%jobs}
rm -rf %{buildroot}
%make_install
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/geofence-server_upgrade.sh %{buildroot}%{upgrade_script_path}
+
#service for systemd is not installed to support only DBus auto activation
#mkdir -p %{buildroot}%{_unitdir_user}/default.target.wants
#install -m 644 %{SOURCE1} %{buildroot}%{_unitdir_user}/geofence-server.service
@@ -76,9 +81,9 @@ rm -rf %{buildroot}
%manifest geofence-server.manifest
%defattr(-,root,root,-)
/usr/bin/geofence-server
-
/usr/share/dbus-1/services/org.tizen.lbs.Providers.GeofenceServer.service
%config %{_sysconfdir}/dbus-1/session.d/geofence-server.conf
+%{upgrade_script_path}/geofence-server_upgrade.sh
#service for systemd is not installed to support only DBus auto activation
#%{_unitdir_user}/geofence-server.service
diff --git a/scripts/geofence-server_upgrade.sh b/scripts/geofence-server_upgrade.sh
new file mode 100644
index 0000000..fb359b0
--- /dev/null
+++ b/scripts/geofence-server_upgrade.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+#------------------------------------------------#
+# geofence-server 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=.geofence-server.db
+
+# move DB
+mv $DB_DIR_24$DB_FILE $DB_DIR_30
+mv $DB_DIR_24$DB_FILE-journal $DB_DIR_30
+
+#set Permission
+chown owner:users $DB_DIR_30$DB_FILE
+chown owner:users $DB_DIR_30$DB_FILE-journal
+
+exit 0