modify PHN_LOCATION_DIR to use macro 88/64488/3
authorJongkyu Koo <jk.koo@samsung.com>
Fri, 1 Apr 2016 10:52:15 +0000 (19:52 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Mon, 11 Apr 2016 04:35:41 +0000 (13:35 +0900)
Change-Id: I2b64750a63036b0b768bd2589332574b96c2e050
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
daemon/CMakeLists.txt
daemon/phnd-location.c
packaging/phonenumber-utils.spec

index c245b653ac70ce82a6acf9a5c9bcaca8bd440c06..b4cdcbe8bffde27a23c81e36f604effdfb197c10 100644 (file)
@@ -8,7 +8,7 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/common/phn-dbus.c
        PROPERTIES GENERATED TRUE)
 
 pkg_check_modules(daemon_pkgs REQUIRED dlog icu-i18n glib-2.0 gio-2.0 gio-unix-2.0
-       capi-base-common capi-system-system-settings tapi)
+       capi-base-common capi-system-system-settings tapi libtzplatform-config)
 
 INCLUDE_DIRECTORIES(${daemon_pkgs_INCLUDE_DIRS})
 LINK_DIRECTORIES(${daemon_pkgs_LIBRARY_DIRS})
index e4ac5afeecb326bd2f9c696c5dc5916d1d9de712..6951fc2fdc32b22c163a57f6856e8376529ba89f 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <glib.h>
+#include <tzplatform_config.h>
 
 #include "phnd.h"
 #include "phnd-region-data.h"
 #include "phnd-location.h"
 
-#define PHN_LOCATION_DIR "/opt/usr/data/phonenumber-utils"
+#define PHN_LOCATION_DIR tzplatform_mkpath(TZ_SYS_DATA, "phonenumber-utils")
 #define PHN_LOCATION_FILE_PREFIX "location"
 
 #define PHN_LOCATION_CHINA_MOBILE_SUFFIX_OFFSET 10000
index 9cf90a2a8cfcdb19421cc36d7282ba202da9fb1c..8f7f736ac03a7d24741199dc8363644e6b9792a9 100644 (file)
@@ -18,6 +18,7 @@ BuildRequires: pkgconfig(capi-base-common)
 BuildRequires: pkgconfig(capi-system-system-settings)
 BuildRequires: pkgconfig(tapi)
 BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(libtzplatform-config)
 BuildRequires: libphonenumber-devel
 
 %define _unitdir /usr/lib/systemd/system
@@ -74,8 +75,6 @@ if [ $1 == 1 ]; then
     systemctl restart %{name}.service
 fi
 
-chown :5000 -R /opt/usr/data/%{name}
-chmod 775 -R /opt/usr/data/%{name}
 
 %postun
 /sbin/ldconfig