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}")
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)
%define major 0
%define minor 1
-%define patchlevel 68
+%define patchlevel 69
Name: tel-plugin-atmodem
Version: %{major}.%{minor}.%{patchlevel}
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(tcore)
+BuildRequires: pkgconfig(libtzplatform-config)
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%defattr(644,system,system,-)
#%doc COPYING
%{_libdir}/telephony/plugins/modems/atmodem-plugin*
-/usr/share/license/%{name}
+%{_datadir}/license/%{name}
#include <stdlib.h>
#include <string.h>
#include <glib.h>
+
+#include <tzplatform_config.h>
#include <tcore.h>
#include <hal.h>
#include <core_object.h>
#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 */
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;