summaryrefslogtreecommitdiff
path: root/packaging/oma-ds-agent.spec
blob: 753183133e1a8dbfa85637a4364e21470d0632b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Name:       oma-ds-agent
Summary:    OMA-DS Agent Daemon for Data Synchronization
Version:    0.1.66
Release:    0
Group:      Base/Device Management
License:    Apache-2.0
Source0:    %{name}-%{version}.tar.gz
Requires(post):   /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires:    pkgconfig(glib-2.0)
BuildRequires:    pkgconfig(libsoup-2.4)
BuildRequires:    pkgconfig(sqlite3)
BuildRequires:    pkgconfig(sync-agent)
BuildRequires:    pkgconfig(vconf)
BuildRequires:    pkgconfig(dbus-glib-1)
BuildRequires:    pkgconfig(check)
BuildRequires:    pkgconfig(memo)
BuildRequires:    pkgconfig(contacts-service2)
BuildRequires:    pkgconfig(dlog)
BuildRequires:    pkgconfig(aul)
BuildRequires:    pkgconfig(libtzplatform-config)
BuildRequires:    expat-devel
BuildRequires:    cmake


%description
oma-ds-agent daemon (development headers)

%package -n ds-public-plugins
Summary:    DS Public Plugins
Group:      Base/Device Management

%description -n ds-public-plugins
ds public plugins for sync-agent


%prep
%setup -q


%build
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DTZ_SYS_DB=%TZ_SYS_DB
make %{?jobs:-j%jobs}


%install
rm -rf %{buildroot}

if [ ! -d %{buildroot}%{TZ_SYS_DB} ]
then
	mkdir -p %{buildroot}%{TZ_SYS_DB}
fi

sqlite3 %{buildroot}%{TZ_SYS_DB}/.omasyncagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null

%make_install

%clean
rm -rf %{buildroot}


%post
if [ ! -d %{TZ_SYS_DB} ]
then
	mkdir %{TZ_SYS_DB}
fi
if [ ! -d %{_sysconfdir}/rc.d/rc3.d ]
then
	mkdir %{_sysconfdir}/rc.d/rc3.d
fi
if [ ! -d %{_sysconfdir}/rc.d/rc5.d ]
then
	mkdir %{_sysconfdir}/rc.d/rc5.d
fi


%postun

rm -f /tmp/agent_fw_event_omads*
rm -f /tmp/agent_fw_noti_reply_omads*

rm -f %{_sysconfdir}/rc.d/rc3.d/S91oma-ds-agent
rm -f %{_sysconfdir}/rc.d/rc5.d/S91oma-ds-agent

rm -f %{TZ_SYS_DB}/.omasyncagent.db %{TZ_SYS_DB}/.omasyncagent.db-journal

rm -rf /usr/share/oma-ds-cfg


%files
%attr(600,root,root) %{TZ_SYS_DB}/.omasyncagent.db
%attr(600,root,root) %{TZ_SYS_DB}/.omasyncagent.db-journal

%manifest oma-ds-agent.manifest
%defattr(-,root,root,-)
/usr/share/dbus-1/system-services/com.samsung.omadsagent.service
%{_bindir}/oma-ds-agent

/usr/share/oma-ds-cfg/*

%defattr(700,root,root)
%defattr(644,root,root)
/usr/lib/systemd/system/oma-ds-agent.service
/usr/lib/systemd/system/graphical.target.wants/oma-ds-agent.service
%{_sysconfdir}/dbus-1/system.d/com.samsung.omadsagent.conf

%files -n ds-public-plugins
%manifest ds-public-plugins.manifest
%defattr(-,root,root,-)
/usr/lib/sync-agent/ds-public/*