3 Summary: Account DB library
8 Source0: libaccounts-svc-%{version}.tar.gz
11 BuildRequires: pkgconfig(glib-2.0)
12 BuildRequires: pkgconfig(dlog)
13 BuildRequires: pkgconfig(db-util)
14 BuildRequires: pkgconfig(capi-base-common)
15 BuildRequires: pkgconfig(vconf)
16 BuildRequires: pkgconfig(capi-appfw-application)
17 BuildRequires: pkgconfig(libxml-2.0)
18 BuildRequires: pkgconfig(pkgmgr-info)
19 BuildRequires: pkgconfig(aul)
20 Requires(post): /sbin/ldconfig
21 Requires(post): /usr/bin/sqlite3
22 Requires(postun): /sbin/ldconfig
25 Account DB libraryXB-Public-Package: no
28 Summary: Development files for %{name}
29 Group: Development/Libraries
30 Requires: %{name} = %{version}-%{release}
32 Development files for %{name}
38 export CFLAGS="${CFLAGS} -fPIC -fvisibility=hidden"
39 cmake . -DCMAKE_INSTALL_PREFIX=/usr
47 rm -rf %{buildroot}/usr/lib/accounts-svc
51 if [ ! -d /opt/dbspace ]
55 if [ ! -f /opt/dbspace/.account.db ]
56 rm -rf /opt/dbspace/.account.db*
58 sqlite3 /opt/dbspace/.account.db 'PRAGMA journal_mode = PERSIST;
59 CREATE TABLE if not exists label (AppId TEXT, Label TEXT, Locale TEXT);
60 CREATE TABLE if not exists account_type (_id INTEGER PRIMARY KEY AUTOINCREMENT, AppId TEXT,
61 ServiceProviderId TEXT, IconPath TEXT, SmallIconPath TEXT, MultipleAccountSupport INT);
62 CREATE TABLE if not exists account_custom (AccountId INTEGER, AppId TEXT, Key TEXT, Value TEXT);
63 CREATE TABLE if not exists account (_id INTEGER PRIMARY KEY AUTOINCREMENT, user_name TEXT, email_address TEXT, display_name TEXT, icon_path TEXT,
64 source TEXT, package_name TEXT, access_token TEXT, domain_name TEXT, auth_type INTEGER, secret INTEGER, sync_support INTEGER,
65 txt_custom0 TEXT, txt_custom1 TEXT, txt_custom2 TEXT, txt_custom3 TEXT, txt_custom4 TEXT,
66 int_custom0 INTEGER, int_custom1 INTEGER, int_custom2 INTEGER, int_custom3 INTEGER, int_custom4 INTEGER);
67 CREATE TABLE if not exists capability (_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, value INTEGER,
68 package_name TEXT, user_name TEXT, account_id INTEGER, FOREIGN KEY (account_id) REFERENCES account(_id));
69 CREATE TABLE if not exists provider_feature (app_id TEXT, key TEXT);'
72 mkdir -p /opt/usr/share/account
73 chown 5000:5000 /opt/dbspace/.account.db
74 chown 5000:5000 /opt/dbspace/.account.db-journal
75 chown 5000:5000 /opt/usr/share/account
77 chmod 660 /opt/dbspace/.account.db
78 chmod 660 /opt/dbspace/.account.db-journal
79 chmod 755 /opt/usr/share/account
81 #set message key value to NULL
82 vconftool set -t string db/account/msg '' -g 6514
85 if [ -f /usr/lib/rpm-plugins/msm.so ]
87 chsmack -a 'libaccounts-svc::db' /opt/dbspace/.account.db-journal
88 chsmack -a 'libaccounts-svc::db' /opt/dbspace/.account.db
91 %postun -p /sbin/ldconfig
94 %manifest libaccounts-svc.manifest
95 %defattr(-,root,root,-)
97 %{_bindir}/account-xml-verify
100 %defattr(-,root,root,-)
102 %{_libdir}/pkgconfig/accounts-svc.pc
104 %{_bindir}/account-xml-verify