1 %global _support_weblog 0
3 # Do not provide .so automatically for the extensions.
4 # This if statement is for backward compatibility with GBM/Obsolete build systems
5 %if "%{?profile}" != "wearable" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
6 %global __provides_exclude_from ^.*\\.(wearable|mobile|tv|ivi|common)$
10 Summary: Push services and client library
13 Group: Application Framework/Service
15 Source0: %{name}-%{version}.tar.gz
16 Source1: pushd.service
17 Requires(post): /sbin/ldconfig
18 Requires(post): /usr/bin/sqlite3
19 Requires(postun): /sbin/ldconfig
20 BuildRequires: pkgconfig(libtzplatform-config)
23 # There are not ready for .so files of wearable aarch64 and x86_64
24 %if "%{?profile}" == "wearable"
25 ExcludeArch: aarch64 x86_64
28 # There are not ready for .so files of tv aarch64
29 %if "%{?profile}" == "tv"
34 %if %{_support_weblog}
35 BuildRequires: pkgconfig(zlib)
36 BuildRequires: pkgconfig(json-glib-1.0)
40 Push services and client library.
43 Summary: Push service client library
44 Group: Application Framework/Libraries
45 Requires: %{name}-bin = %{version}-%{release}
46 Requires: libpush-compat = %{version}-%{release}
47 Recommends: libpush-profile_common = %{version}-%{release}
48 %description -n libpush
49 Push service client library
51 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
52 # if mobile || ivi || common || "undefined"
53 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
54 %package -n libpush-profile_common
55 Summary: Push service client library for common/mobile/ivi
56 Group: Application Framework/Libraries
57 Provides: libpush-compat = %{version}-%{release}
58 Provides: libpush-profile_mobile = %{version}-%{release}
59 Provides: libpush-profile_ivi = %{version}-%{release}
60 Conflicts: libpush-profile_wearable
61 Conflicts: libpush-profile_tv
62 %description -n libpush-profile_common
63 Push service client library for common/mobile/ivi
66 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
67 # if tv || "undefined"
68 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
69 %package -n libpush-profile_tv
70 Summary: Push service client library for tv
71 Group: Application Framework/Libraries
72 Provides: libpush-compat = %{version}-%{release}
73 Conflicts: libpush-profile_common
74 Conflicts: libpush-profile_wearable
75 %description -n libpush-profile_tv
76 Push service client library for tv
79 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
80 # if wearable || "undefined"
81 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
82 %package -n libpush-profile_wearable
83 Summary: Push service client library for wearable
84 Group: Application Framework/Libraries
85 Provides: libpush-compat = %{version}-%{release}
86 Conflicts: libpush-profile_common
87 Conflicts: libpush-profile_tv
88 %description -n libpush-profile_wearable
89 Push service client library for wearable
92 %package -n libpush-devel
93 Summary: Push service client library (DEV)
94 Group: Development/Libraries
95 Requires: libpush = %{version}-%{release}
96 Requires: capi-appfw-application-devel
97 %description -n libpush-devel
98 Push service client library (DEV)
101 Summary: Push service daemon
102 Group: Application Framework/Service
103 Requires: %{name}-bin-compat = %{version}-%{release}
104 Recommends: %{name}-bin-profile_common = %{version}-%{release}
108 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
109 # if mobile || ivi || common || "undefined"
110 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
111 %package bin-profile_common
112 Summary: Push service daemon for mobile/common/ivi
113 Group: Application Framework/Service
114 Provides: %{name}-bin-compat = %{version}-%{release}
115 Provides: %{name}-bin-profile_mobile = %{version}-%{release}
116 Provides: %{name}-bin-profile_ivi = %{version}-%{release}
117 Conflicts: %{name}-bin-profile_wearable
118 Conflicts: %{name}-bin-profile_tv
119 %description bin-profile_common
120 Push service daemon for mobile/common/ivi
123 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
124 # if tv || "undefined"
125 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
126 %package bin-profile_tv
127 Summary: Push service daemon for tv
128 Group: Application Framework/Service
129 Provides: %{name}-bin-compat = %{version}-%{release}
130 Conflicts: %{name}-bin-profile_wearable
131 Conflicts: %{name}-bin-profile_common
132 %description bin-profile_tv
133 Push service daemon for tv
136 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
137 # if wearable || "undefined"
138 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
139 %package bin-profile_wearable
140 Summary: Push service daemon for wearable
141 Group: Application Framework/Service
142 Provides: %{name}-bin-compat = %{version}-%{release}
143 Conflicts: %{name}-bin-profile_tv
144 Conflicts: %{name}-bin-profile_common
145 %description bin-profile_wearable
146 Push service daemon for wearable
150 Summary: Push service tool
151 Group: Development/Tools
152 Requires: libpush = %{version}-%{release}
153 Requires: %{name}-bin = %{version}-%{release}
154 Requires: %{name}-tool-compat = %{version}-%{release}
155 Recommends: %{name}-tool-profile_common = %{version}-%{release}
159 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
160 # if mobile || ivi || common || "undefined"
161 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
162 %package tool-profile_common
163 Summary: Push service tool for mobile/common/ivi
164 Group: Development/Tools
165 Provides: %{name}-tool-compat = %{version}-%{release}
166 Provides: %{name}-tool-profile_mobile = %{version}-%{release}
167 Provides: %{name}-tool-profile_ivi = %{version}-%{release}
168 Conflicts: %{name}-tool-profile_wearable
169 Conflicts: %{name}-tool-profile_tv
170 %description tool-profile_common
171 Push service tool for mobile/common/ivi
174 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
175 # if tv || "undefined"
176 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
177 %package tool-profile_tv
178 Summary: Push service tool for tv
179 Group: Development/Tools
180 Provides: %{name}-tool-compat = %{version}-%{release}
181 Conflicts: %{name}-tool-profile_wearable
182 Conflicts: %{name}-tool-profile_common
183 %description tool-profile_tv
184 Push service tool for tv
187 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
188 # if wearable || "undefined"
189 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
190 %package tool-profile_wearable
191 Summary: Push service tool for wearable
192 Group: Development/Tools
193 Provides: %{name}-tool-compat = %{version}-%{release}
194 Conflicts: %{name}-tool-profile_tv
195 Conflicts: %{name}-tool-profile_common
196 %description tool-profile_wearable
197 Push service tool for wearable
201 %define _upgrade_script_path /usr/share/upgrade/scripts/
202 %define _upgrade_script 500.sppc.sh
214 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
215 install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/pushd.service
216 %install_service multi-user.target.wants pushd.service
219 mkdir -p %{buildroot}%{_includedir}
220 cp -a include/push-service.h %{buildroot}%{_includedir}
221 cp -a include/push.h %{buildroot}%{_includedir}
222 %if %{_support_weblog}
223 include/pushlog.h %{buildroot}%{_includedir}
226 mkdir -p %{buildroot}%{_libdir}/pkgconfig
227 cp -a push.pc %{buildroot}%{_libdir}/pkgconfig/
228 mkdir -p %{buildroot}%{_bindir}
230 mkdir -p %{buildroot}%{_upgrade_script_path}
231 cp -f scripts/%{_upgrade_script} %{buildroot}%{_upgrade_script_path}
233 mkdir -p %{buildroot}/usr/share/push
238 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
239 # if mobile || ivi || common || "undefined"
240 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
242 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
245 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
247 pushd arm/share/push/
248 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
250 %if %{_support_weblog}
255 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
256 # if tv || "undefined"
257 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
259 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
262 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
264 pushd arm_tv/share/push/
265 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
267 %if %{_support_weblog}
268 arm_tv/bin/pushlog_tool
272 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
273 # if wearable || "undefined"
274 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
275 pushd arm_wearable/lib/
276 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.wearable"; done
278 pushd arm_wearable/bin/
279 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.wearable"; done
281 pushd arm_wearable/share/push/
282 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.wearable"; done
284 %if %{_support_weblog}
285 arm_wearable/bin/pushlog_tool
289 %endif //%ifarch %{arm}
295 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
298 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
300 pushd aarch64/share/push/
301 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
303 %if %{_support_weblog}
304 aarch64/bin/pushlog_tool
312 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
313 # if mobile || ivi || common || "undefined"
314 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
316 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
319 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
321 pushd x86/share/push/
322 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
324 %if %{_support_weblog}
329 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
330 # if tv || "undefined"
331 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
333 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
336 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
338 pushd x86_tv/share/push/
339 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
341 %if %{_support_weblog}
342 x86_tv/bin/pushlog_tool
346 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
347 # if wearable || "undefined"
348 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
349 pushd x86_wearable/lib/
350 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.wearable"; done
352 pushd x86_wearable/bin/
353 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.wearable"; done
355 pushd x86_wearable/share/push/
356 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.wearable"; done
358 %if %{_support_weblog}
359 x86_wearable/bin/pushlog_tool
363 %endif //%ifarch %{ix86}
368 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
369 # if mobile || ivi || common || "undefined"
370 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
372 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
375 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
377 pushd x86_64/share/push/
378 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
380 %if %{_support_weblog}
381 x86_64/bin/pushlog_tool
385 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
386 # if tv || "undefined"
387 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
388 pushd x86_64_tv/lib64/
389 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
392 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
394 pushd x86_64_tv/share/push/
395 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
397 %if %{_support_weblog}
398 x86_64_tv/bin/pushlog_tool
402 %endif //%ifarch %{x86_64}
406 mkdir -p %{TZ_SYS_GLOBALUSER_DB}
407 sqlite3 %{TZ_SYS_GLOBALUSER_DB}/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
408 chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db
409 chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
410 chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db
411 chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
413 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db
414 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
417 %ifarch %{ix86} || %{arm}
419 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
420 # if tv || "undefined"
421 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
425 for FILE in push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
427 pushd /usr/share/push/
428 for FILE in Push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
431 %post tool-profile_tv
432 ln -sf push_tool.tv %{_bindir}/push_tool
434 %post -n libpush-profile_tv
436 for FILE in libpush.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
442 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
443 # if wearable || "undefined"
444 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
446 %post bin-profile_wearable
448 for FILE in push*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
450 pushd /usr/share/push/
451 for FILE in Push*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
454 %post tool-profile_wearable
455 ln -sf push_tool.wearable %{_bindir}/push_tool
457 %post -n libpush-profile_wearable
459 for FILE in libpush.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
465 %endif //%ifarch %{ix86} || %{arm}
470 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
471 # if tv || "undefined"
472 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
476 for FILE in push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
478 pushd /usr/share/push/
479 for FILE in Push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
482 %post tool-profile_tv
483 ln -sf push_tool.tv %{_bindir}/push_tool
485 %post -n libpush-profile_tv
487 for FILE in libpush.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
495 %manifest libpush.manifest
497 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
498 # if mobile || ivi || common || "undefined"
499 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
500 %attr(755,root,root) %{_libdir}/libpush.so*
501 %exclude %{_libdir}/libpush.so*.tv
502 %exclude %{_libdir}/libpush.so*.wearable
505 %files -n libpush-devel
507 %{_libdir}/pkgconfig/*.pc
510 %manifest push-bin.manifest
511 %{_unitdir}/pushd.service
514 %attr(755,root,root) %{_upgrade_script_path}%{_upgrade_script}
515 %{_unitdir}/multi-user.target.wants/pushd.service
518 %manifest push-tool.manifest
519 %if %{_support_weblog}
520 %{_bindir}/pushlog_tool
523 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
524 # if mobile || ivi || common || "undefined"
525 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
527 %files -n libpush-profile_common
528 # default .so files are housed in the main pkg.
530 %files bin-profile_common
532 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer
534 %files tool-profile_common
540 %ifarch %{ix86} || %{arm}
542 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
543 # if tv || "undefined"
544 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
546 %files -n libpush-profile_tv
547 %manifest libpush.manifest
548 %attr(755,root,root) %{_libdir}/libpush.so*.tv
550 %files bin-profile_tv
552 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.tv
555 %files tool-profile_tv
556 %{_bindir}/push_tool.tv
561 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
562 # if wearable || "undefined"
563 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
565 %files -n libpush-profile_wearable
566 %manifest libpush.manifest
567 %attr(755,root,root) %{_libdir}/libpush.so*.wearable
569 %files bin-profile_wearable
570 %{_bindir}/pushd.wearable
571 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.wearable
574 %files tool-profile_wearable
575 %{_bindir}/push_tool.wearable
579 %endif //%ifarch %{ix86} || %{arm}
584 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
585 # if tv || "undefined"
586 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
588 %files -n libpush-profile_tv
589 %manifest libpush.manifest
590 %attr(755,root,root) %{_libdir}/libpush.so*.tv
592 %files bin-profile_tv
594 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.tv
597 %files tool-profile_tv
598 %{_bindir}/push_tool.tv
606 * Sat Nov 3 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.26
607 - Prevent bug fixed(out-of bounds read, dead code,..)
608 * Mon Oct 22 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.25
609 - bundle null check added & protobuf null check added
610 * Wed Sep 19 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.24
611 - when pkg is uninstalled, db process is added
612 * Fri Sep 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.23
613 - emul check logic is changed(using capi-system-info)
614 * Tue Sep 4 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.22
615 - decoding of message with space character which is urlencoded to "+"
616 * Wed Aug 29 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.21
617 - package uninstalled event added
618 * Fri Aug 17 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.20
619 - debug msg added & some internal function name changed
620 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.19
621 - push noti default action is silent, and old key is deleted
622 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.18
623 - tapi imei api is changed for new tapi
624 * Tue Aug 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.17
625 - emulator check func is added
626 * Wed Jul 25 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.16
627 - OSP Push noti support(alertMessage,..)