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