[Tizen][Push] Modified for platform permission test
[platform/core/appfw/sppc.git] / packaging / push.spec
1 %global _support_weblog 0
2
3 Name:       push
4 Summary:    Push services and client library
5 Version:    0.4.39
6 Release:    1
7 Group:      Application Framework/Service
8 License:    Apache-2.0
9 Source0:    %{name}-%{version}.tar.gz
10 Source1:    pushd.service
11 Requires(post): /sbin/ldconfig
12 Requires(post): /usr/bin/sqlite3
13 Requires(postun): /sbin/ldconfig
14
15 %if %{_support_weblog}
16 BuildRequires:  pkgconfig(zlib)
17 BuildRequires:  pkgconfig(json-glib-1.0)
18 %endif
19
20 %description
21 Push services and client library.
22
23 %package -n libpush
24 Summary:    Push service client library
25 Group:      Application Framework/Libraries
26 Requires:   %{name}-bin = %{version}-%{release}
27 Provides:   libpush.so.0
28
29 %description -n libpush
30 Push service client library
31
32 %package -n libpush-devel
33 Summary:    Push service client library (DEV)
34 Group:      Development/Libraries
35 Requires:   libpush = %{version}-%{release}
36 Requires:   capi-appfw-application-devel
37
38 %description -n libpush-devel
39 Push service client library (DEV)
40
41 %package bin
42 Summary:    Push service daemon
43 Group:      Application Framework/Service
44 Requires(post): telephony-daemon
45
46 %description bin
47 Push service daemon
48
49 %package tool
50 Summary:    Push service tool
51 Group:      Development/Tools
52 Requires:   libpush = %{version}-%{release}
53 Requires:   %{name}-bin = %{version}-%{release}
54
55 %description tool
56 Push service tool
57
58 %prep
59 %setup -q
60
61 %build
62
63 %install
64 rm -rf %{buildroot}
65 mkdir -p %{buildroot}%{_unitdir_user}/default.target.wants
66 install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir_user}/pushd.service
67 ln -s ../pushd.service %{buildroot}%{_unitdir_user}/default.target.wants/pushd.service
68
69 mkdir -p %{buildroot}/usr/share/license
70 cp -f LICENSE %{buildroot}/usr/share/license/%{name}
71
72 %if %{_support_weblog}
73 cp -a share/push/push_sslkey.pem %{buildroot}/usr/share/push/
74 cp -a share/push/prd-dl-key.pem %{buildroot}/usr/share/push/
75 %endif
76
77 mkdir -p %{buildroot}%{_includedir}
78 cp -a include/push-service.h %{buildroot}%{_includedir}
79 cp -a include/push.h %{buildroot}%{_includedir}
80 %if %{_support_weblog}
81         include/pushlog.h %{buildroot}%{_includedir}
82 %endif
83
84 mkdir -p %{buildroot}%{_libdir}/pkgconfig
85 cp -a push.pc %{buildroot}%{_libdir}/pkgconfig/
86
87 mkdir -p %{buildroot}/usr/share/push/
88 mkdir -p %{buildroot}%{_bindir}
89
90
91 %ifarch %{arm}
92
93 %if "%{profile}" == "tv"
94 #libpush
95 cp -a arm_tv/lib/libpush.so.* %{buildroot}%{_libdir}
96 #libpus-devel
97 cp -a arm_tv/lib/libpush.so %{buildroot}%{_libdir}
98 #push-bin
99 cp -a arm_tv/bin/pushd %{buildroot}%{_bindir}
100 cp -a arm_tv/bin/push_tool %{buildroot}%{_bindir}
101 cp -a arm_tv/share/push/*.cer %{buildroot}/usr/share/push/
102 %if %{_support_weblog}
103         arm_tv/bin/pushlog_tool
104 %endif
105 %endif
106
107 %if "%{profile}" == "wearable"
108 #libpush
109 cp -a arm_wearable/lib/libpush.so.* %{buildroot}%{_libdir}
110 #libpus-devel
111 cp -a arm_wearable/lib/libpush.so %{buildroot}%{_libdir}
112 #push-bin
113 cp -a arm_wearable/bin/pushd %{buildroot}%{_bindir}
114 cp -a arm_wearable/bin/push_tool %{buildroot}%{_bindir}
115 cp -a arm_wearable/share/push/*.cer %{buildroot}/usr/share/push/
116 %if %{_support_weblog}
117         arm_wearable/bin/pushlog_tool
118 %endif
119 %else
120
121 #mobile & etc...
122 #libpush
123 cp -a arm/lib/libpush.so.* %{buildroot}%{_libdir}
124 #libpus-devel
125 cp -a arm/lib/libpush.so %{buildroot}%{_libdir}
126 #push-bin
127 cp -a arm/bin/pushd %{buildroot}%{_bindir}
128 cp -a arm/bin/push_tool %{buildroot}%{_bindir}
129 cp -a arm/share/push/*.cer %{buildroot}/usr/share/push/
130 %if %{_support_weblog}
131         arm/bin/pushlog_tool
132 %endif
133 %endif
134
135 %endif
136
137
138 %ifarch aarch64
139 #libpush
140 cp -a aarch64/lib64/libpush.so.* %{buildroot}%{_libdir}
141 #libpush-devel
142 cp -a aarch64/lib64/libpush.so %{buildroot}%{_libdir}
143 #push-bin
144 cp -a aarch64/bin/pushd %{buildroot}%{_bindir}
145 cp -a aarch64/bin/push_tool %{buildroot}%{_bindir}
146 cp -a aarch64/share/push/*.cer %{buildroot}/usr/share/push/
147 %if %{_support_weblog}
148         aarch64/bin/pushlog_tool
149 %endif
150 %endif
151
152
153 %ifarch %{ix86}
154
155 %if "%{profile}" == "tv"
156 #libpush
157 cp -a x86_tv/lib/libpush.so.* %{buildroot}%{_libdir}
158 #libpus-devel
159 cp -a x86_tv/lib/libpush.so %{buildroot}%{_libdir}
160 #push-bin
161 cp -a x86_tv/bin/pushd %{buildroot}%{_bindir}
162 cp -a x86_tv/bin/push_tool %{buildroot}%{_bindir}
163 cp -a x86_tv/share/push/*.cer %{buildroot}/usr/share/push/
164 %if %{_support_weblog}
165         x86_tv/bin/pushlog_tool
166 %endif
167 %endif
168
169 %if "%{profile}" == "wearable"
170 #libpush
171 cp -a x86_wearable/lib/libpush.so.* %{buildroot}%{_libdir}
172 #libpus-devel
173 cp -a x86_wearable/lib/libpush.so %{buildroot}%{_libdir}
174 #push-bin
175 cp -a x86_wearable/bin/pushd %{buildroot}%{_bindir}
176 cp -a x86_wearable/bin/push_tool %{buildroot}%{_bindir}
177 cp -a x86_wearable/share/push/*.cer %{buildroot}/usr/share/push/
178 %if %{_support_weblog}
179         x86_wearable/bin/pushlog_tool
180 %endif
181 %else
182
183 #mobile & etc...
184 #libpush
185 cp -a x86/lib/libpush.so.* %{buildroot}%{_libdir}
186 #libpus-devel
187 cp -a x86/lib/libpush.so %{buildroot}%{_libdir}
188 #push-bin
189 cp -a x86/bin/pushd %{buildroot}%{_bindir}
190 cp -a x86/bin/push_tool %{buildroot}%{_bindir}
191 cp -a x86/share/push/*.cer %{buildroot}/usr/share/push/
192 %if %{_support_weblog}
193         x86/bin/pushlog_tool
194 %endif
195 %endif
196
197 %endif
198
199
200 %ifarch x86_64
201 #libpush
202 cp -a x86_64/lib64/libpush.so.* %{buildroot}%{_libdir}
203 #libpus-devel
204 cp -a x86_64/lib64/libpush.so %{buildroot}%{_libdir}
205 #push-bin
206 cp -a x86_64/bin/pushd %{buildroot}%{_bindir}
207 cp -a x86_64/bin/push_tool %{buildroot}%{_bindir}
208 cp -a x86_64/share/push/*.cer %{buildroot}/usr/share/push/
209 %if %{_support_weblog}
210         x86_64/bin/pushlog_tool
211 %endif
212 %endif
213
214
215 %post bin
216 #mkdir -p /usr/dbspace
217 #sqlite3 /usr/dbspace/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
218 #chown system:system /usr/dbspace/.push.db
219 #chown system:system /usr/dbspace/.push.db-journal
220 #chmod 660 /usr/dbspace/.push.db
221 #chmod 660 /usr/dbspace/.push.db-journal
222
223 %post -n libpush
224 /sbin/ldconfig
225
226 %postun -n libpush -p /sbin/ldconfig
227
228 %files -n libpush
229 %manifest libpush.manifest
230 %attr(644,system,system)%{_libdir}/libpush.so.*
231
232 %files -n libpush-devel
233 %{_includedir}/*.h
234 %{_libdir}/pkgconfig/*.pc
235 %{_libdir}/libpush.so
236
237 %files bin
238 %manifest push-bin.manifest
239 %{_bindir}/pushd
240 %attr(644,system,system)/usr/share/push/*.cer
241 %attr(644,system,system)/usr/share/license/%{name}
242
243 # This is a certificate file to access to logging server by HTTPS.
244 %if %{_support_weblog}
245 %attr(644,system,system)/usr/share/push/push_sslkey.pem
246 %attr(644,system,system)/usr/share/push/prd-dl-key.pem
247 %endif
248
249 %{_unitdir_user}/pushd.service
250 %{_unitdir_user}/default.target.wants/pushd.service
251
252 %files tool
253 %manifest push-tool.manifest
254 %{_bindir}/push_tool
255
256 %if %{_support_weblog}
257         %{_bindir}/pushlog_tool
258 %endif
259
260 %changelog
261 * Sat Nov 3 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.26
262 - Prevent bug fixed(out-of bounds read, dead code,..)
263 * Mon Oct 22 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.25
264 - bundle null check added & protobuf null check added
265 * Wed Sep 19 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.24
266 - when pkg is uninstlled, db process is added
267 * Fri Sep 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.23
268 - emul check logic is changed(using capi-system-info)
269 * Tue Sep 4 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.22
270 - decoding of message with space character which is urlencoded to "+"
271 * Wed Aug 29 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.21
272 - package uninstalled event added
273 * Fri Aug 17 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.20
274 - debug msg added & some internal function name changed
275 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.19
276 - push noti default action is silent, and old key is deleted
277 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.18
278 - tapi imei api is changed for new tapi
279 * Tue Aug 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.17
280 - emulator check func is added
281 * Wed Jul 25 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.16
282 - OSP Push noti support(alertMessage,..)
283