Change directory path to use tzplatform-config 84/61084/1 accepted/tizen/common/20160304.195422 accepted/tizen/ivi/20160305.093051 accepted/tizen/mobile/20160305.093003 accepted/tizen/tv/20160305.093016 accepted/tizen/wearable/20160305.093033 submit/tizen/20160304.043929
authorJiwan Kim <ji-wan.kim@samsung.com>
Fri, 4 Mar 2016 01:59:15 +0000 (10:59 +0900)
committerJiwan Kim <ji-wan.kim@samsung.com>
Fri, 4 Mar 2016 01:59:15 +0000 (10:59 +0900)
Change-Id: I1f6f76afa08f54feb0b76c5bb5b4afcd5df123ee

CMakeLists.txt
packaging/tel-plugin-atmodem.spec
src/s_network.c

index 78d2119..a4edee0 100755 (executable)
@@ -6,10 +6,11 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(EXEC_PREFIX "\${prefix}")
 SET(LIBDIR ${LIB_INSTALL_DIR})
 SET(INCLUDEDIR "\${prefix}/include")
+SET(DATAROOTDIR "\${prefix}/share")
 
 # Set required packages
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED glib-2.0 tcore dlog)
+pkg_check_modules(pkgs REQUIRED glib-2.0 tcore dlog libtzplatform-config)
 
 FOREACH(flag ${pkgs_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
@@ -49,4 +50,4 @@ SET_TARGET_PROPERTIES(atmodem-plugin PROPERTIES PREFIX "" OUTPUT_NAME atmodem-pl
 INSTALL(TARGETS atmodem-plugin
                LIBRARY DESTINATION ${LIBDIR}/telephony/plugins/modems)
 
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME tel-plugin-atmodem)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${DATAROOTDIR}/license RENAME tel-plugin-atmodem)
index 2eadbe5..cf46345 100644 (file)
@@ -1,6 +1,6 @@
 %define major 0
 %define minor 1
-%define patchlevel 68
+%define patchlevel 69
 
 Name:              tel-plugin-atmodem
 Version:           %{major}.%{minor}.%{patchlevel}
@@ -13,6 +13,7 @@ BuildRequires:     cmake
 BuildRequires:     pkgconfig(glib-2.0)
 BuildRequires:     pkgconfig(dlog)
 BuildRequires:     pkgconfig(tcore)
+BuildRequires:     pkgconfig(libtzplatform-config)
 Requires(post):    /sbin/ldconfig
 Requires(postun):  /sbin/ldconfig
 
@@ -42,4 +43,4 @@ cp LICENSE %{buildroot}/usr/share/license/%{name}
 %defattr(644,system,system,-)
 #%doc COPYING
 %{_libdir}/telephony/plugins/modems/atmodem-plugin*
-/usr/share/license/%{name}
+%{_datadir}/license/%{name}
index e7c445e..f29713c 100644 (file)
@@ -22,6 +22,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <glib.h>
+
+#include <tzplatform_config.h>
 #include <tcore.h>
 #include <hal.h>
 #include <core_object.h>
@@ -37,6 +39,7 @@
 #include "s_network.h"
 
 #define ATMODEM_NETWORK_BASE_16        16
+#define MCC_MNC_OPER_LIST_DB   tzplatform_mkpath(TZ_SYS_DB, ".mcc_mnc_oper_list.db")
 
 typedef enum {
        ATMDOEM_NETWORK_ACT_GSM, /* GSM */
@@ -114,7 +117,7 @@ static void _insert_mcc_mnc_oper_list(TcorePlugin *p, CoreObject *co_network)
        s = tcore_plugin_ref_server(p);
        strg = tcore_server_find_storage(s, "database");
 
-       handle = tcore_storage_create_handle(strg, "/opt/dbspace/.mcc_mnc_oper_list.db");
+       handle = tcore_storage_create_handle(strg, MCC_MNC_OPER_LIST_DB);
        if (!handle) {
                err("fail to create database handle");
                return;