Fix RPMLINT error
[platform/core/system/oma-ds-agent.git] / packaging / oma-ds-agent.spec
1 Name:       oma-ds-agent
2 Summary:    OMA-DS Agent Daemon for Data Synchronization
3 Version:    0.1.66
4 Release:    1
5 Group:      Base/Device Management
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Requires(post): /sbin/ldconfig
9 Requires(postun): /sbin/ldconfig
10 BuildRequires:  pkgconfig(glib-2.0)
11 BuildRequires:  pkgconfig(libsoup-2.4)
12 BuildRequires:  pkgconfig(sqlite3)
13 BuildRequires:  pkgconfig(sync-agent)
14 BuildRequires:  pkgconfig(vconf)
15 BuildRequires:  pkgconfig(dbus-glib-1)
16 BuildRequires:  pkgconfig(check)
17 BuildRequires:  pkgconfig(memo)
18 BuildRequires:  pkgconfig(contacts-service2)
19 BuildRequires:  pkgconfig(dlog)
20 BuildRequires:  pkgconfig(aul)
21 BuildRequires:  expat-devel
22 BuildRequires:  cmake
23
24
25 %description
26 oma-ds-agent daemon (development headers)
27
28 %package -n ds-public-plugins
29 Summary:    DS Public Plugins
30 Group:      Base/Device Management
31
32 %description -n ds-public-plugins
33 ds public plugins for sync-agent
34
35
36 %prep
37 %setup -q
38
39
40 %build
41 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
42 make %{?jobs:-j%jobs}
43
44
45 %install
46 rm -rf %{buildroot}
47
48 if [ ! -d %{buildroot}/opt/dbspace ]
49 then
50         mkdir -p %{buildroot}/opt/dbspace
51 fi
52
53 sqlite3 %{buildroot}/opt/dbspace/.omasyncagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
54
55 %make_install
56
57 %clean
58 rm -rf %{buildroot}
59
60
61 %post
62 if [ ! -d /opt/dbspace ]
63 then
64         mkdir /opt/dbspace
65 fi
66 if [ ! -d /etc/rc.d/rc3.d ]
67 then
68         mkdir /etc/rc.d/rc3.d
69 fi
70 if [ ! -d /etc/rc.d/rc5.d ]
71 then
72         mkdir /etc/rc.d/rc5.d
73 fi
74
75
76 %preun
77
78
79 %postun
80
81 rm -f /tmp/agent_fw_event_omads*
82 rm -f /tmp/agent_fw_noti_reply_omads*
83
84 rm -f /etc/rc.d/rc3.d/S91oma-ds-agent
85 rm -f /etc/rc.d/rc5.d/S91oma-ds-agent
86
87 rm -f /opt/dbspace/.omasyncagent.db /opt/dbspace/.omasyncagent.db-journal
88
89 rm -rf /usr/share/oma-ds-cfg
90
91
92 %files
93 %attr(600,root,root) /opt/dbspace/.omasyncagent.db
94 %attr(600,root,root) /opt/dbspace/.omasyncagent.db-journal
95
96 %manifest oma-ds-agent.manifest
97 %defattr(-,root,root,-)
98 /usr/share/dbus-1/system-services/com.samsung.omadsagent.service
99 /usr/bin/oma-ds-agent
100
101 /usr/share/oma-ds-cfg/*
102
103 %defattr(700,root,root)
104 %defattr(644,root,root)
105 /usr/lib/systemd/system/oma-ds-agent.service
106 /usr/lib/systemd/system/graphical.target.wants/oma-ds-agent.service
107 /etc/dbus-1/system.d/com.samsung.omadsagent.conf
108
109 %files -n ds-public-plugins
110 %manifest ds-public-plugins.manifest
111 %defattr(-,root,root,-)
112 /usr/lib/sync-agent/ds-public/*