3 Summary: Account DB library
8 Source0: libaccounts-svc-%{version}.tar.gz
9 Source1001: libaccounts-svc.manifest
12 BuildRequires: pkgconfig(glib-2.0)
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(db-util)
15 BuildRequires: pkgconfig(capi-base-common)
16 BuildRequires: pkgconfig(vconf)
17 BuildRequires: pkgconfig(capi-appfw-application)
18 BuildRequires: pkgconfig(libxml-2.0)
19 BuildRequires: pkgconfig(pkgmgr-info)
20 BuildRequires: pkgconfig(aul)
21 Requires(post): /sbin/ldconfig
22 Requires(post): /usr/bin/sqlite3
23 Requires(postun): /sbin/ldconfig
26 Account DB libraryXB-Public-Package: no
29 Summary: Development files for %{name}
30 Group: Development/Libraries
31 Requires: %{name} = %{version}-%{release}
33 Development files for %{name}
40 export CFLAGS="${CFLAGS} -fPIC -fvisibility=hidden"
49 rm -rf %{buildroot}%{_libdir}/accounts-svc
53 if [ ! -d /opt/dbspace ]
57 if [ ! -f /opt/dbspace/.account.db ]
58 #rm -rf /opt/dbspace/.account.db*
60 sqlite3 /opt/dbspace/.account.db 'PRAGMA journal_mode = PERSIST;
61 CREATE TABLE if not exists label (AppId TEXT, Label TEXT, Locale TEXT);
62 CREATE TABLE if not exists account_type (_id INTEGER PRIMARY KEY AUTOINCREMENT, AppId TEXT,
63 ServiceProviderId TEXT, IconPath TEXT, SmallIconPath TEXT, MultipleAccountSupport INT);
64 CREATE TABLE if not exists account_custom (AccountId INTEGER, AppId TEXT, Key TEXT, Value TEXT);
65 CREATE TABLE if not exists account (_id INTEGER PRIMARY KEY AUTOINCREMENT, user_name TEXT, email_address TEXT, display_name TEXT, icon_path TEXT,
66 source TEXT, package_name TEXT, access_token TEXT, domain_name TEXT, auth_type INTEGER, secret INTEGER, sync_support INTEGER,
67 txt_custom0 TEXT, txt_custom1 TEXT, txt_custom2 TEXT, txt_custom3 TEXT, txt_custom4 TEXT,
68 int_custom0 INTEGER, int_custom1 INTEGER, int_custom2 INTEGER, int_custom3 INTEGER, int_custom4 INTEGER);
69 CREATE TABLE if not exists capability (_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, value INTEGER,
70 package_name TEXT, user_name TEXT, account_id INTEGER, FOREIGN KEY (account_id) REFERENCES account(_id));
71 CREATE TABLE if not exists provider_feature (app_id TEXT, key TEXT);'
74 mkdir -p /opt/usr/share/account
75 chown 5000:5000 /opt/dbspace/.account.db
76 chown 5000:5000 /opt/dbspace/.account.db-journal
77 chown 5000:5000 /opt/usr/share/account
79 chmod 660 /opt/dbspace/.account.db
80 chmod 660 /opt/dbspace/.account.db-journal
81 chmod 755 /opt/usr/share/account
83 #set message key value to NULL
84 vconftool set -t string db/account/msg '' -g 6514
87 %postun -p /sbin/ldconfig
90 %manifest %{name}.manifest
91 %defattr(-,root,root,-)
93 %{_bindir}/account-xml-verify
96 %manifest %{name}.manifest
97 %defattr(-,root,root,-)
99 %{_libdir}/pkgconfig/accounts-svc.pc
101 %{_bindir}/account-xml-verify