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
18 Requires(post): /sbin/ldconfig
19 Requires(post): /usr/bin/sqlite3
20 Requires(postun): /sbin/ldconfig
21 BuildRequires: pkgconfig(libtzplatform-config)
24 # There are not ready for .so files of wearable aarch64 and x86_64
25 %if "%{?profile}" == "wearable"
26 ExcludeArch: aarch64 x86_64
29 # There are not ready for .so files of tv aarch64
30 %if "%{?profile}" == "tv"
35 %if %{_support_weblog}
36 BuildRequires: pkgconfig(zlib)
37 BuildRequires: pkgconfig(json-glib-1.0)
41 Push services and client library.
44 Summary: Push service client library
45 Group: Application Framework/Libraries
46 Requires: %{name}-bin = %{version}-%{release}
47 Requires: libpush-compat = %{version}-%{release}
48 Recommends: libpush-profile_common = %{version}-%{release}
49 %description -n libpush
50 Push service client library
52 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
53 # if mobile || ivi || common || "undefined"
54 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
55 %package -n libpush-profile_common
56 Summary: Push service client library for common/mobile/ivi
57 Group: Application Framework/Libraries
58 Provides: libpush-compat = %{version}-%{release}
59 Provides: libpush-profile_mobile = %{version}-%{release}
60 Provides: libpush-profile_ivi = %{version}-%{release}
61 Conflicts: libpush-profile_wearable
62 Conflicts: libpush-profile_tv
63 %description -n libpush-profile_common
64 Push service client library for common/mobile/ivi
67 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
68 # if tv || "undefined"
69 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
70 %package -n libpush-profile_tv
71 Summary: Push service client library for tv
72 Group: Application Framework/Libraries
73 Provides: libpush-compat = %{version}-%{release}
74 Conflicts: libpush-profile_common
75 Conflicts: libpush-profile_wearable
76 %description -n libpush-profile_tv
77 Push service client library for tv
80 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
81 # if wearable || "undefined"
82 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
83 %package -n libpush-profile_wearable
84 Summary: Push service client library for wearable
85 Group: Application Framework/Libraries
86 Provides: libpush-compat = %{version}-%{release}
87 Conflicts: libpush-profile_common
88 Conflicts: libpush-profile_tv
89 %description -n libpush-profile_wearable
90 Push service client library for wearable
93 %package -n libpush-devel
94 Summary: Push service client library (DEV)
95 Group: Development/Libraries
96 Requires: libpush = %{version}-%{release}
97 Requires: capi-appfw-application-devel
98 %description -n libpush-devel
99 Push service client library (DEV)
102 Summary: Push service daemon
103 Group: Application Framework/Service
104 Requires: %{name}-bin-compat = %{version}-%{release}
105 Recommends: %{name}-bin-profile_common = %{version}-%{release}
109 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
110 # if mobile || ivi || common || "undefined"
111 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
112 %package bin-profile_common
113 Summary: Push service daemon for mobile/common/ivi
114 Group: Application Framework/Service
115 Provides: %{name}-bin-compat = %{version}-%{release}
116 Provides: %{name}-bin-profile_mobile = %{version}-%{release}
117 Provides: %{name}-bin-profile_ivi = %{version}-%{release}
118 Conflicts: %{name}-bin-profile_wearable
119 Conflicts: %{name}-bin-profile_tv
120 %description bin-profile_common
121 Push service daemon for mobile/common/ivi
124 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
125 # if tv || "undefined"
126 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
127 %package bin-profile_tv
128 Summary: Push service daemon for tv
129 Group: Application Framework/Service
130 Provides: %{name}-bin-compat = %{version}-%{release}
131 Conflicts: %{name}-bin-profile_wearable
132 Conflicts: %{name}-bin-profile_common
133 %description bin-profile_tv
134 Push service daemon for tv
137 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
138 # if wearable || "undefined"
139 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
140 %package bin-profile_wearable
141 Summary: Push service daemon for wearable
142 Group: Application Framework/Service
143 Provides: %{name}-bin-compat = %{version}-%{release}
144 Conflicts: %{name}-bin-profile_tv
145 Conflicts: %{name}-bin-profile_common
146 %description bin-profile_wearable
147 Push service daemon for wearable
151 Summary: Push service tool
152 Group: Development/Tools
153 Requires: libpush = %{version}-%{release}
154 Requires: %{name}-bin = %{version}-%{release}
155 Requires: %{name}-tool-compat = %{version}-%{release}
156 Recommends: %{name}-tool-profile_common = %{version}-%{release}
160 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
161 # if mobile || ivi || common || "undefined"
162 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
163 %package tool-profile_common
164 Summary: Push service tool for mobile/common/ivi
165 Group: Development/Tools
166 Provides: %{name}-tool-compat = %{version}-%{release}
167 Provides: %{name}-tool-profile_mobile = %{version}-%{release}
168 Provides: %{name}-tool-profile_ivi = %{version}-%{release}
169 Conflicts: %{name}-tool-profile_wearable
170 Conflicts: %{name}-tool-profile_tv
171 %description tool-profile_common
172 Push service tool for mobile/common/ivi
175 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
176 # if tv || "undefined"
177 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
178 %package tool-profile_tv
179 Summary: Push service tool for tv
180 Group: Development/Tools
181 Provides: %{name}-tool-compat = %{version}-%{release}
182 Conflicts: %{name}-tool-profile_wearable
183 Conflicts: %{name}-tool-profile_common
184 %description tool-profile_tv
185 Push service tool for tv
188 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
189 # if wearable || "undefined"
190 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
191 %package tool-profile_wearable
192 Summary: Push service tool for wearable
193 Group: Development/Tools
194 Provides: %{name}-tool-compat = %{version}-%{release}
195 Conflicts: %{name}-tool-profile_tv
196 Conflicts: %{name}-tool-profile_common
197 %description tool-profile_wearable
198 Push service tool for wearable
202 %define _upgrade_script_path /usr/share/upgrade/scripts/
203 %define _upgrade_script 500.sppc.sh
215 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
216 install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/pushd.service
218 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
219 # if mobile //Lazy mount is for mobile only
220 %if "%{?profile}" == "mobile"
221 install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/pushd.path
224 %ifarch %{ix86} || %{arm}
225 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
226 # if not mobile //Lazy mount is for mobile only
227 %if "%{?profile}" != "mobile"
228 %install_service multi-user.target.wants pushd.service
230 %endif //%ifarch %{ix86} || %{arm}
233 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
234 # if wearable || tv || "undefined"
235 %if "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
236 #install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/multi-user.target.wants/pushd.service
237 %install_service multi-user.target.wants pushd.service
239 %endif //%ifarch x86_64
242 mkdir -p %{buildroot}/usr/share/licenses/%{name}
243 cp -f LICENSE %{buildroot}/usr/share/licenses/%{name}
245 mkdir -p %{buildroot}%{_includedir}
246 cp -a include/push-service.h %{buildroot}%{_includedir}
247 cp -a include/push.h %{buildroot}%{_includedir}
248 %if %{_support_weblog}
249 include/pushlog.h %{buildroot}%{_includedir}
252 mkdir -p %{buildroot}%{_libdir}/pkgconfig
253 cp -a push.pc %{buildroot}%{_libdir}/pkgconfig/
254 mkdir -p %{buildroot}%{_bindir}
256 mkdir -p %{buildroot}%{_upgrade_script_path}
257 cp -f scripts/%{_upgrade_script} %{buildroot}%{_upgrade_script_path}
259 mkdir -p %{buildroot}/usr/share/push
264 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
265 # if mobile || ivi || common || "undefined"
266 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
268 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
271 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
273 pushd arm/share/push/
274 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
276 %if %{_support_weblog}
281 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
282 # if tv || "undefined"
283 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
285 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
288 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
290 pushd arm_tv/share/push/
291 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
293 %if %{_support_weblog}
294 arm_tv/bin/pushlog_tool
298 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
299 # if wearable || "undefined"
300 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
301 pushd arm_wearable/lib/
302 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.wearable"; done
304 pushd arm_wearable/bin/
305 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.wearable"; done
307 pushd arm_wearable/share/push/
308 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.wearable"; done
310 %if %{_support_weblog}
311 arm_wearable/bin/pushlog_tool
315 %endif //%ifarch %{arm}
321 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
324 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
326 pushd aarch64/share/push/
327 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
329 %if %{_support_weblog}
330 aarch64/bin/pushlog_tool
338 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
339 # if mobile || ivi || common || "undefined"
340 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
342 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
345 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
347 pushd x86/share/push/
348 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
350 %if %{_support_weblog}
355 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
356 # if tv || "undefined"
357 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
359 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
362 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
364 pushd x86_tv/share/push/
365 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
367 %if %{_support_weblog}
368 x86_tv/bin/pushlog_tool
372 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
373 # if wearable || "undefined"
374 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
375 pushd x86_wearable/lib/
376 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.wearable"; done
378 pushd x86_wearable/bin/
379 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.wearable"; done
381 pushd x86_wearable/share/push/
382 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.wearable"; done
384 %if %{_support_weblog}
385 x86_wearable/bin/pushlog_tool
389 %endif //%ifarch %{ix86}
394 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
395 # if mobile || ivi || common || "undefined"
396 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
398 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
401 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
403 pushd x86_64/share/push/
404 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
406 %if %{_support_weblog}
407 x86_64/bin/pushlog_tool
411 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
412 # if tv || "undefined"
413 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
414 pushd x86_64_tv/lib64/
415 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
418 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
420 pushd x86_64_tv/share/push/
421 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
423 %if %{_support_weblog}
424 x86_64_tv/bin/pushlog_tool
428 %endif //%ifarch %{x86_64}
432 mkdir -p %{TZ_SYS_GLOBALUSER_DB}
433 sqlite3 %{TZ_SYS_GLOBALUSER_DB}/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
434 chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db
435 chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
436 chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db
437 chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
439 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db
440 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
443 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
444 # if mobile //Lazy mount is for mobile only
445 %if "%{?profile}" == "mobile"
446 ln -sf ../pushd.path %{_unitdir}/multi-user.target.wants/
450 %ifarch %{ix86} || %{arm}
452 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
453 # if tv || "undefined"
454 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
458 for FILE in push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
460 pushd /usr/share/push/
461 for FILE in Push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
464 %post tool-profile_tv
465 ln -sf push_tool.tv %{_bindir}/push_tool
467 %post -n libpush-profile_tv
469 for FILE in libpush.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
475 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
476 # if wearable || "undefined"
477 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
479 %post bin-profile_wearable
481 for FILE in push*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
483 pushd /usr/share/push/
484 for FILE in Push*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
487 %post tool-profile_wearable
488 ln -sf push_tool.wearable %{_bindir}/push_tool
490 %post -n libpush-profile_wearable
492 for FILE in libpush.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
498 %endif //%ifarch %{ix86} || %{arm}
502 %manifest libpush.manifest
503 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
504 # if mobile || ivi || common || "undefined"
505 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
506 %attr(755,root,root) %{_libdir}/libpush.so*
507 %exclude %{_libdir}/libpush.so*.tv
508 %exclude %{_libdir}/libpush.so*.wearable
511 %files -n libpush-devel
513 %{_libdir}/pkgconfig/*.pc
516 %manifest push-bin.manifest
517 %{_unitdir}/pushd.service
518 %attr(644,root,root) /usr/share/licenses/%{name}/LICENSE
519 %attr(755,root,root) %{_upgrade_script_path}%{_upgrade_script}
522 %manifest push-tool.manifest
523 %if %{_support_weblog}
524 %{_bindir}/pushlog_tool
527 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
528 # if mobile || ivi || common || "undefined"
529 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
531 %files -n libpush-profile_common
532 # default .so files are housed in the main pkg.
534 %files bin-profile_common
536 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer
537 %{_unitdir}/pushd.path
539 %files tool-profile_common
545 %ifarch %{ix86} || %{arm}
547 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
548 # if tv || "undefined"
549 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
551 %files -n libpush-profile_tv
552 %manifest libpush.manifest
553 %attr(755,root,root) %{_libdir}/libpush.so*.tv
555 %files bin-profile_tv
557 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.tv
558 %{_unitdir}/multi-user.target.wants/pushd.service
560 %files tool-profile_tv
561 %{_bindir}/push_tool.tv
566 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
567 # if wearable || "undefined"
568 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
570 %files -n libpush-profile_wearable
571 %manifest libpush.manifest
572 %attr(755,root,root) %{_libdir}/libpush.so*.wearable
574 %files bin-profile_wearable
575 %{_bindir}/pushd.wearable
576 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.wearable
577 %{_unitdir}/multi-user.target.wants/pushd.service
579 %files tool-profile_wearable
580 %{_bindir}/push_tool.wearable
584 %endif //%ifarch %{ix86} || %{arm}
589 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
590 # if tv || "undefined"
591 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
593 %files -n libpush-profile_tv
594 %manifest libpush.manifest
595 %attr(755,root,root) %{_libdir}/libpush.so*.tv
597 %files bin-profile_tv
599 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.tv
600 %{_unitdir}/multi-user.target.wants/pushd.service
602 %files tool-profile_tv
603 %{_bindir}/push_tool.tv
611 * Sat Nov 3 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.26
612 - Prevent bug fixed(out-of bounds read, dead code,..)
613 * Mon Oct 22 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.25
614 - bundle null check added & protobuf null check added
615 * Wed Sep 19 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.24
616 - when pkg is uninstalled, db process is added
617 * Fri Sep 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.23
618 - emul check logic is changed(using capi-system-info)
619 * Tue Sep 4 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.22
620 - decoding of message with space character which is urlencoded to "+"
621 * Wed Aug 29 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.21
622 - package uninstalled event added
623 * Fri Aug 17 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.20
624 - debug msg added & some internal function name changed
625 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.19
626 - push noti default action is silent, and old key is deleted
627 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.18
628 - tapi imei api is changed for new tapi
629 * Tue Aug 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.17
630 - emulator check func is added
631 * Wed Jul 25 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.16
632 - OSP Push noti support(alertMessage,..)