[SR:oma-dm-agent_0.1.73] SR Release
[framework/system/oma-dm-agent.git] / packaging / oma-dm-agent.spec
1 Name:       oma-dm-agent
2 Summary:    oma-dm-agent daemon for FOTA,DM,CP,FMM Service
3 Version:    0.1.73
4 Release:    1
5 Group:      TO_BE/FILLED_IN
6 License:    Apache License, Version 2.0
7 Source0:    oma-dm-agent-%{version}.tar.gz
8 Source1:    oma-dm-agent.service
9
10 #Requires(post): /sbin/ldconfig
11 BuildRequires:  pkgconfig(glib-2.0)
12 BuildRequires:  pkgconfig(sqlite3)
13 BuildRequires:  pkgconfig(libsoup-2.4)
14 BuildRequires:  pkgconfig(vconf)
15 BuildRequires:  pkgconfig(libwbxml2)
16 BuildRequires:  pkgconfig(libxml-2.0)
17 BuildRequires:  pkgconfig(check)
18 BuildRequires:  pkgconfig(sync-agent)
19 BuildRequires:  pkgconfig(aul)
20 BuildRequires:  pkgconfig(appsvc)
21 BuildRequires:  pkgconfig(push)
22 BuildRequires:  pkgconfig(sysman)
23 BuildRequires:  pkgconfig(capi-base-common)
24 BuildRequires:  pkgconfig(bundle)
25 BuildRequires:  pkgconfig(location)
26 BuildRequires:  pkgconfig(tapi)
27 BuildRequires:  pkgconfig(pmapi)
28 BuildRequires:  pkgconfig(capi-system-info)
29 BuildRequires:  pkgconfig(capi-telephony-sim)
30 BuildRequires:  pkgconfig(dlog)
31 BuildRequires:  pkgconfig(dbus-glib-1)
32 #BuildRequires:  pkgconfig(oauth)
33 #BuildRequires:  pkgconfig(samsung-sso-svc)
34
35 #BuildRequires:  pkgconfig(appcore-efl)
36 #BuildRequires:  pkgconfig(appcore-common)
37 BuildRequires:  libgcrypt-devel
38 BuildRequires:  expat-devel
39 BuildRequires:  cmake
40
41
42 %description
43 oma-dm-agent Daemon servcie
44
45 %package -n dm-private-plugins
46 Summary:    DM Private Plugins
47 Group:      TO_BE_FILLED
48
49 %description -n dm-private-plugins
50 dm private plugins for sync-agent
51
52 %package -n dm-public-plugins
53 Summary:    DM Public Plugins
54 Group:      TO_BE_FILLED
55
56 %description -n dm-public-plugins
57 dm public plugins for sync-agent
58
59 %prep
60 %setup -q
61
62
63 %build
64 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
65 make %{?jobs:-j%jobs}
66
67
68 %install
69 rm -rf %{buildroot}
70
71 if [ ! -d %{buildroot}/opt/usr/dbspace ]
72 then
73         mkdir -p %{buildroot}/opt/usr/dbspace
74 fi
75
76 sqlite3 %{buildroot}/opt/usr/dbspace/.dm_service.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
77 sqlite3 %{buildroot}/opt/usr/dbspace/.omadmagent.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
78 sqlite3 %{buildroot}/opt/usr/dbspace/.momanager.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
79
80 %make_install
81
82 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
83 install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/oma-dm-agent.service
84 ln -s ../oma-dm-agent.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/oma-dm-agent.service
85
86 mkdir -p %{buildroot}/usr/share/license
87 cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
88
89
90 %clean
91 rm -rf %{buildroot}
92
93
94
95 %post
96
97 ###############################################################################################################
98 ##  Vconf setting... start
99 ###############################################################################################################
100 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/ConfVersion "0.1" -s oma-dm-agent::vconf_internal
101 /usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/NbDevManagement 3 -s oma-dm-agent::vconf_internal
102 ## mformation test server  ( http://mfiop25.mformation.com/iop )
103 ## Input the Phone number -> Input the IMEI number -> Manufacturer : Samsung -> Model : SGHT989 -> Not check Factory Bootstrapped -> Add button click
104 ## --> Modify device -> Server Auth Preference : syncml:auth-basic -> Client Auth Preference : syncml:auth-basic -> Modify button clieck
105 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" -s oma-dm-agent::vconf_internal
106 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "mform" -s oma-dm-agent::vconf_internal
107 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServAddr "https://bobafett.mformation.com:461/oma/iop" -s oma-dm-agent::vconf_internal
108 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "serverpwd" -s oma-dm-agent::vconf_internal
109 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "MTIzNDU=" -s oma-dm-agent::vconf_internal
110 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "MTIzNDU=" -s oma-dm-agent::vconf_internal
111 ## 0 : BASIC , 1 : DIGEST MD5 , 2 : HMAC , Default : DIGEST
112 #/usr/bin/vconftool set -t int  -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 0 -s oma-dm-agent::vconf_internal
113 #/usr/bin/vconftool set -t int  -f db/SyncML/oma-dm-service/DevManagement/1/Port 461 -s oma-dm-agent::vconf_internal
114 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "clientid" -s oma-dm-agent::vconf_internal
115 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "clientpwd" -s oma-dm-agent::vconf_internal
116 ##gcf test server
117 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" -s oma-dm-agent::vconf_internal
118 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "RSate" -s oma-dm-agent::vconf_internal
119 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServAddr "http://192.168.168.169/dm" -s oma-dm-agent::vconf_internal
120 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "RSatepass" -s oma-dm-agent::vconf_internal
121 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "" -s oma-dm-agent::vconf_internal
122 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "" -s oma-dm-agent::vconf_internal
123 /usr/bin/vconftool set -t int   -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 1 -s oma-dm-agent::vconf_internal
124 /usr/bin/vconftool set -t int   -f db/SyncML/oma-dm-service/DevManagement/1/Port 80 -s oma-dm-agent::vconf_internal
125 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "RSuser" -s oma-dm-agent::vconf_internal
126 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "RSpass" -s oma-dm-agent::vconf_internal
127 ###############################################################################################################
128 ##  Vconf setting... end
129 ###############################################################################################################
130
131 %postun
132
133 rm -f /tmp/agent_fw_event_omadm*
134 rm -f /tmp/agent_fw_noti_reply_omadm*
135
136 rm -f /opt/usr/dbspace/.dm_service.db /opt/usr/dbspace/.dm_service.db-journal
137 rm -f /opt/usr/dbspace/.omadmagent.db /opt/usr/dbspace/.omadmagent.db-journal
138 rm -f /opt/usr/dbspace/.momanager.db /opt/usr/dbspace/.momanager.db-journal
139
140 rm -rf /usr/share/oma-dm-cfg
141
142
143 %files
144 %attr(600,root,root) /opt/usr/dbspace/.dm_service.db
145 %attr(600,root,root) /opt/usr/dbspace/.dm_service.db-journal
146 %attr(600,root,root) /opt/usr/dbspace/.omadmagent.db
147 %attr(600,root,root) /opt/usr/dbspace/.omadmagent.db-journal
148 %attr(600,root,root) /opt/usr/dbspace/.momanager.db
149 %attr(600,root,root) /opt/usr/dbspace/.momanager.db-journal
150 /etc/smack/accesses2.d/oma-dm-agent.rule
151 /usr/share/license/%{name}
152
153 %manifest oma-dm-agent.manifest
154 %defattr(-,root,root,-)
155 /usr/share/dbus-1/services/*
156 /usr/bin/oma-dm-agent
157
158 /usr/share/oma-dm-cfg/ddf/*
159 /usr/share/oma-dm-cfg/delta_size/*
160 /usr/share/oma-dm-cfg/fw-init/*
161 /usr/share/oma-dm-cfg/ipc/*
162
163
164 %defattr(700,root,root)
165 /usr/share/oma-dm-cfg/csc-setting/change_csc_value.sh
166 /usr/share/oma-dm-cfg/imei-setting/change_imei_callnum.sh
167
168 %{_libdir}/systemd/system/oma-dm-agent.service
169 %{_libdir}/systemd/system/multi-user.target.wants/oma-dm-agent.service
170
171 %files -n dm-private-plugins
172 %manifest dm-private-plugins.manifest
173 %defattr(-,root,root,-)
174 /usr/lib/sync-agent/dm-private/*
175 /usr/include/sync-agent/plugin/plugin_slp_device_dm.h
176
177 %files -n dm-public-plugins
178 %manifest dm-public-plugins.manifest
179 %defattr(-,root,root,-)
180 /usr/lib/sync-agent/dm-public/*
181