Change a smack file from manifest to rule
[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): /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
87 %clean
88 rm -rf %{buildroot}
89
90
91
92 %post
93
94 ###############################################################################################################
95 ##  Vconf setting... start
96 ###############################################################################################################
97 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/ConfVersion "0.1" -s oma-dm-agent::vconf_internal
98 /usr/bin/vconftool set -t int -f db/SyncML/oma-dm-service/DevManagement/NbDevManagement 3 -s oma-dm-agent::vconf_internal
99 ## mformation test server  ( http://mfiop25.mformation.com/iop )
100 ## Input the Phone number -> Input the IMEI number -> Manufacturer : Samsung -> Model : SGHT989 -> Not check Factory Bootstrapped -> Add button click
101 ## --> Modify device -> Server Auth Preference : syncml:auth-basic -> Client Auth Preference : syncml:auth-basic -> Modify button clieck
102 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" -s oma-dm-agent::vconf_internal
103 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "mform" -s oma-dm-agent::vconf_internal
104 #/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
105 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "serverpwd" -s oma-dm-agent::vconf_internal
106 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "MTIzNDU=" -s oma-dm-agent::vconf_internal
107 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "MTIzNDU=" -s oma-dm-agent::vconf_internal
108 ## 0 : BASIC , 1 : DIGEST MD5 , 2 : HMAC , Default : DIGEST
109 #/usr/bin/vconftool set -t int  -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 0 -s oma-dm-agent::vconf_internal
110 #/usr/bin/vconftool set -t int  -f db/SyncML/oma-dm-service/DevManagement/1/Port 461 -s oma-dm-agent::vconf_internal
111 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "clientid" -s oma-dm-agent::vconf_internal
112 #/usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "clientpwd" -s oma-dm-agent::vconf_internal
113 ##gcf test server
114 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/AccName "gcf" -s oma-dm-agent::vconf_internal
115 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServID "RSate" -s oma-dm-agent::vconf_internal
116 /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
117 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServPwd "RSatepass" -s oma-dm-agent::vconf_internal
118 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ServNonce "" -s oma-dm-agent::vconf_internal
119 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientNonce "" -s oma-dm-agent::vconf_internal
120 /usr/bin/vconftool set -t int   -f db/SyncML/oma-dm-service/DevManagement/1/AuthType 1 -s oma-dm-agent::vconf_internal
121 /usr/bin/vconftool set -t int   -f db/SyncML/oma-dm-service/DevManagement/1/Port 80 -s oma-dm-agent::vconf_internal
122 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/UserName "RSuser" -s oma-dm-agent::vconf_internal
123 /usr/bin/vconftool set -t string -f db/SyncML/oma-dm-service/DevManagement/1/ClientPwd "RSpass" -s oma-dm-agent::vconf_internal
124 ###############################################################################################################
125 ##  Vconf setting... end
126 ###############################################################################################################
127
128 #/etc/init.d/oma-dm start
129
130
131
132 %preun
133 /etc/init.d/oma-dm stop
134
135
136 %postun
137
138 rm -f /tmp/agent_fw_event_omadm*
139 rm -f /tmp/agent_fw_noti_reply_omadm*
140
141 rm -f /opt/usr/dbspace/.dm_service.db /opt/usr/dbspace/.dm_service.db-journal
142 rm -f /opt/usr/dbspace/.omadmagent.db /opt/usr/dbspace/.omadmagent.db-journal
143 rm -f /opt/usr/dbspace/.momanager.db /opt/usr/dbspace/.momanager.db-journal
144
145 rm -rf /usr/share/oma-dm-cfg
146
147
148 %files
149 %attr(600,root,root) /opt/usr/dbspace/.dm_service.db
150 %attr(600,root,root) /opt/usr/dbspace/.dm_service.db-journal
151 %attr(600,root,root) /opt/usr/dbspace/.omadmagent.db
152 %attr(600,root,root) /opt/usr/dbspace/.omadmagent.db-journal
153 %attr(600,root,root) /opt/usr/dbspace/.momanager.db
154 %attr(600,root,root) /opt/usr/dbspace/.momanager.db-journal
155 /etc/smack/accesses2.d/oma-dm-agent.rule
156
157 %manifest oma-dm-agent.manifest
158 %defattr(-,root,root,-)
159 /usr/share/dbus-1/services/*
160 /usr/bin/oma-dm-agent
161
162 /usr/share/oma-dm-cfg/ddf/*
163 /usr/share/oma-dm-cfg/delta_size/*
164 /usr/share/oma-dm-cfg/fw-init/*
165 /usr/share/oma-dm-cfg/ipc/*
166
167
168 %defattr(700,root,root)
169 /usr/share/oma-dm-cfg/csc-setting/change_csc_value.sh
170 /usr/share/oma-dm-cfg/imei-setting/change_imei_callnum.sh
171
172 /etc/init.d/oma-dm
173 %{_libdir}/systemd/system/oma-dm-agent.service
174 %{_libdir}/systemd/system/multi-user.target.wants/oma-dm-agent.service
175
176 %files -n dm-private-plugins
177 %manifest dm-private-plugins.manifest
178 %defattr(-,root,root,-)
179 /usr/lib/sync-agent/dm-private/*
180 /usr/include/sync-agent/plugin/plugin_slp_device_dm.h
181
182 %files -n dm-public-plugins
183 %manifest dm-public-plugins.manifest
184 %defattr(-,root,root,-)
185 /usr/lib/sync-agent/dm-public/*
186