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
11 Source3: accounts-service.service
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(db-util)
16 BuildRequires: pkgconfig(capi-base-common)
17 BuildRequires: pkgconfig(pkgmgr-info)
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(libtzplatform-config)
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/
65 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
66 install -m 644 %SOURCE3 %{buildroot}%{_unitdir}/accounts-service.service
67 %install_service multi-user.target.wants accounts-service.service
71 #if [ ! -d /opt/usr/dbspace ]
73 # mkdir -p /opt/usr/dbspace
75 if [ ! -f %{TZ_SYS_DB}/.account.db ]
77 sqlite3 %{TZ_SYS_DB}/.account.db 'PRAGMA journal_mode = PERSIST;
78 CREATE TABLE if not exists label (AppId TEXT, Label TEXT, Locale TEXT);
79 CREATE TABLE if not exists account_type (_id INTEGER PRIMARY KEY AUTOINCREMENT, AppId TEXT,
80 ServiceProviderId TEXT, IconPath TEXT, SmallIconPath TEXT, MultipleAccountSupport INT);
81 CREATE TABLE if not exists account_custom (AccountId INTEGER, AppId TEXT, Key TEXT, Value TEXT);
82 CREATE TABLE if not exists account (_id INTEGER PRIMARY KEY AUTOINCREMENT, user_name TEXT, email_address TEXT, display_name TEXT, icon_path TEXT,
83 source TEXT, package_name TEXT, access_token TEXT, domain_name TEXT, auth_type INTEGER, secret INTEGER, sync_support INTEGER,
84 txt_custom0 TEXT, txt_custom1 TEXT, txt_custom2 TEXT, txt_custom3 TEXT, txt_custom4 TEXT,
85 int_custom0 INTEGER, int_custom1 INTEGER, int_custom2 INTEGER, int_custom3 INTEGER, int_custom4 INTEGER);
86 CREATE TABLE if not exists capability (_id INTEGER PRIMARY KEY AUTOINCREMENT, key TEXT, value INTEGER,
87 package_name TEXT, user_name TEXT, account_id INTEGER, FOREIGN KEY (account_id) REFERENCES account(_id));
88 CREATE TABLE if not exists provider_feature (app_id TEXT, key TEXT);
92 #chown system:system %{TZ_SYS_DB}/.account.db
93 #chown system:system %{TZ_SYS_DB}/.account.db-journal
95 #chmod 600 %{TZ_SYS_DB}/.account.db
96 #chmod 600 %{TZ_SYS_DB}/.account.db-journal
99 #chsmack -a 'System::Shared' %{TZ_SYS_DB}/.account.db-journal
100 #chsmack -a 'System::Shared' %{TZ_SYS_DB}/.account.db
101 %postun -p /sbin/ldconfig
105 %manifest account-svcd.manifest
106 #%defattr(-,system,system,-)
107 %config %{_sysconfdir}/dbus-1/system.d/org.tizen.account.manager.conf
108 %{_bindir}/account-svcd
109 %attr(0644,root,root) %{_unitdir}/accounts-service.service
110 %attr(0644,root,root) %{_unitdir}/multi-user.target.wants/accounts-service.service
111 %attr(0644,root,root) /usr/share/dbus-1/system-services/org.tizen.account.manager.service