#include <tzplatform_config.h>
/*============== String ================= */
-#define BT_COMMON_PKG "ug-bluetooth-efl"
-#define BT_COMMON_RES "/usr/apps/ug-bluetooth-efl/shared/res/locale"
+#define BT_COMMON_PKG "ug-setting-bluetooth-efl"
+#define BT_COMMON_RES "/usr/ug/res/locale/"
#define BT_STR_MEMORY_FULL \
dgettext(BT_COMMON_PKG, "IDS_BT_POP_MEMORYFULL")
if (ret == -1 && errno == ENOENT)
{
DBG("DB %s doesn't exist, it needs to be created and initialized", BT_TRANSFER_DB);
+ DBG("script path: %s", SCRIPT_INIT_DB);
ret = system(SCRIPT_INIT_DB);
if (ret != EXIT_SUCCESS)
ERR("Exit code of epp not clean: %i", ret);
extern "C" {
#endif
-#define BT_TRANSFER_DB "/opt/usr/dbspace/.bluetooth_transfer.db"
+#define BT_TRANSFER_DB "/opt/dbspace/.bluetooth_transfer.db"
#define BT_INBOUND_TABLE "inbound"
#define BT_OUTBOUND_TABLE "outbound"
#define BT_DB_QUERY_LEN 512
-#define SCRIPT_INIT_DB tzplatform_mkpath(TZ_SYS_SHARE, "bluetooth-share/resources/init_db.sh")
+#define SCRIPT_INIT_DB tzplatform_mkpath(TZ_USER_DATA, "bluetooth-share/init_db.sh")
#define TABLE(type) ((type == BT_DB_INBOUND) ? BT_INBOUND_TABLE : BT_OUTBOUND_TABLE)
#define TEXT(s, n) (char *)sqlite3_column_text(s, n)
-%define TZ_SYS_SHARE /opt
+%define TZ_SYS_SHARE /opt/home/owner/data/
Name: bluetooth-share
Summary: Bluetooth file share Agent
%make_install
mkdir -p %{buildroot}%{TZ_SYS_SHARE}/bt-ftp
-install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_SYS_SHARE}/%{name}/ressources/init_db.sh
+install -D -m 0755 %{SOURCE1004} %{buildroot}%{TZ_SYS_SHARE}/%{name}/init_db.sh
+
+%post
+/sbin/ldconfig
+%{TZ_SYS_SHARE}/%{name}/init_db.sh
%post -n libbluetooth-share-devel -p /sbin/ldconfig
#!/bin/sh
-eval $(tzplatform-get TZ_USER_DB)
+eval $(tzplatform-get TZ_SYS_DB)
-if [ ! -f $TZ_USER_DB/.bluetooth_transfer.db ]
+if [ ! -f $TZ_SYS_DB/.bluetooth_transfer.db ]
then
- sqlite3 $TZ_USER_DB/.bluetooth_transfer.db 'PRAGMA journal_mode = PERSIST;
+ sqlite3 $TZ_SYS_DB/.bluetooth_transfer.db 'PRAGMA journal_mode = PERSIST;
create table if not exists inbound (
id INTEGER PRIMARY KEY autoincrement,
sid INTEGER,
'
fi
-chown :$UID $TZ_USER_DB/.bluetooth_transfer.db
-chown :$UID $TZ_USER_DB/.bluetooth_transfer.db-journal
-chmod 660 $TZ_USER_DB/.bluetooth_transfer.db
-chmod 660 $TZ_USER_DB/.bluetooth_transfer.db-journal
+chown network_fw:network_fw $TZ_SYS_DB/.bluetooth_transfer.db
+chown network_fw:network_fw $TZ_SYS_DB/.bluetooth_transfer.db-journal
+chmod 664 $TZ_SYS_DB/.bluetooth_transfer.db
+chmod 664 $TZ_SYS_DB/.bluetooth_transfer.db-journal
if [ -f /usr/lib/rpm-plugins/msm.so ]
then
- chsmack -a 'bt_share::db' $TZ_USER_DB/.bluetooth_transfer.db
- chsmack -a 'bt_share::db' $TZ_USER_DB/.bluetooth_transfer.db-journal
+ chsmack -a '*' $TZ_SYS_DB/.bluetooth_transfer.db
+ chsmack -a '*' $TZ_SYS_DB/.bluetooth_transfer.db-journal
fi