3 Summary: Account Manager
6 Group: Social & Content/Other
8 Source0: account-manager-%{version}.tar.gz
9 Source1: org.tizen.account.manager.service
10 Source2: org.tizen.account.manager.conf
13 BuildRequires: pkgconfig(dlog)
14 BuildRequires: pkgconfig(db-util)
15 BuildRequires: pkgconfig(capi-base-common)
16 BuildRequires: pkgconfig(pkgmgr-info)
17 BuildRequires: pkgconfig(aul)
18 BuildRequires: pkgconfig(glib-2.0) >= 2.26
19 BuildRequires: pkgconfig(gio-2.0)
20 BuildRequires: pkgconfig(vconf)
21 BuildRequires: pkgconfig(cynara-client)
22 BuildRequires: pkgconfig(cynara-session)
23 BuildRequires: pkgconfig(cynara-creds-gdbus)
24 BuildRequires: pkgconfig(account-common)
25 BuildRequires: pkgconfig(accounts-svc)
27 Requires(post): /sbin/ldconfig
28 Requires(post): /usr/bin/sqlite3
29 Requires(postun): /sbin/ldconfig
39 #export CFLAGS+=" -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default"
40 #export CXXFLAGS+=" -Wextra -Wcast-align -Wcast-qual -Wshadow -Wwrite-strings -Wswitch-default -Wnon-virtual-dtor -Wno-c++0x-compat"
41 #export CFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
42 #export CXXFLAGS+=" -Wno-unused-parameter -Wno-empty-body"
44 #export CFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow -fno-common"
45 #export CXXFLAGS+=" -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-strict-aliasing -fno-unroll-loops -fsigned-char -fstrict-overflow"
47 export CFLAGS="${CFLAGS} -fvisibility=hidden -fPIE"
48 export LDFLAGS="${LDFLAGS} -pie"
49 cmake . -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DBINDIR=%{_bindir}
57 rm -rf %{buildroot}/usr/lib/account-manager
59 mkdir -p %{buildroot}/usr/share/dbus-1/system-services
60 install -m 0644 %SOURCE1 %{buildroot}/usr/share/dbus-1/system-services/org.tizen.account.manager.service
62 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
63 install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dbus-1/system.d/
67 #if [ ! -d /opt/usr/dbspace ]
69 # mkdir -p /opt/usr/dbspace
71 if [ ! -f %{TZ_SYS_DB}/.account.db ]
73 sqlite3 %{TZ_SYS_DB}/.account.db 'PRAGMA journal_mode = PERSIST;
74 CREATE TABLE if not exists label (AppId TEXT, Label TEXT, Locale TEXT);
75 CREATE TABLE if not exists account_type (_id INTEGER PRIMARY KEY AUTOINCREMENT, AppId TEXT,
76 ServiceProviderId TEXT, IconPath TEXT, SmallIconPath TEXT, MultipleAccountSupport INT);
77 CREATE TABLE if not exists account_custom (AccountId INTEGER, AppId TEXT, Key TEXT, Value TEXT);
78 CREATE TABLE if not exists account (_id INTEGER PRIMARY KEY AUTOINCREMENT, user_name TEXT, email_address TEXT, display_name TEXT, icon_path TEXT,
79 source TEXT, package_name TEXT, access_token TEXT, domain_name TEXT, auth_type INTEGER, secret INTEGER, sync_support INTEGER,
80 txt_custom0 TEXT, txt_custom1 TEXT, txt_custom2 TEXT, txt_custom3 TEXT, txt_custom4 TEXT,
81 int_custom0 INTEGER, int_custom1 INTEGER, int_custom2 INTEGER, int_custom3 INTEGER, int_custom4 INTEGER);
82 CREATE TABLE if not exists capability (_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, value INTEGER,
83 package_name TEXT, user_name TEXT, account_id INTEGER, FOREIGN KEY (account_id) REFERENCES account(_id));
84 CREATE TABLE if not exists provider_feature (app_id TEXT, key TEXT);
88 chown system:system %{TZ_SYS_DB}/.account.db
89 chown system:system %{TZ_SYS_DB}/.account.db-journal
91 chmod 600 %{TZ_SYS_DB}/.account.db
92 chmod 600 %{TZ_SYS_DB}/.account.db-journal
95 chsmack -a 'System' %{TZ_SYS_DB}/.account.db-journal
96 chsmack -a 'System' %{TZ_SYS_DB}/.account.db
97 %postun -p /sbin/ldconfig
101 %manifest account-svcd.manifest
102 %defattr(-,system,system,-)
103 %config %{_sysconfdir}/dbus-1/system.d/org.tizen.account.manager.conf
104 %{_bindir}/account-svcd
105 %attr(0644,system,system) /usr/share/dbus-1/system-services/org.tizen.account.manager.service