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)
23 # There are not ready for .so files of tv/wearable aarch64 and x86_64
24 %if "%{?profile}" == "wearable"
25 ExcludeArch: aarch64 x86_64
28 %if "%{?profile}" == "tv"
32 %if %{_support_weblog}
33 BuildRequires: pkgconfig(zlib)
34 BuildRequires: pkgconfig(json-glib-1.0)
38 Push services and client library.
41 Summary: Push service client library
42 Group: Application Framework/Libraries
43 Requires: %{name}-bin = %{version}-%{release}
44 Requires: libpush-compat = %{version}-%{release}
45 Recommends: libpush-profile_common = %{version}-%{release}
46 %description -n libpush
47 Push service client library
49 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
50 # if mobile || ivi || common || "undefined"
51 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
52 %package -n libpush-profile_common
53 Summary: Push service client library for common/mobile/ivi
54 Group: Application Framework/Libraries
55 Provides: libpush-compat = %{version}-%{release}
56 Provides: libpush-profile_mobile = %{version}-%{release}
57 Provides: libpush-profile_ivi = %{version}-%{release}
58 Conflicts: libpush-profile_wearable
59 Conflicts: libpush-profile_tv
60 %description -n libpush-profile_common
61 Push service client library for common/mobile/ivi
64 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
65 # if tv || "undefined"
66 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
67 %package -n libpush-profile_tv
68 Summary: Push service client library for tv
69 Group: Application Framework/Libraries
70 Provides: libpush-compat = %{version}-%{release}
71 Conflicts: libpush-profile_common
72 Conflicts: libpush-profile_wearable
73 %description -n libpush-profile_tv
74 Push service client library for tv
77 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
78 # if wearable || "undefined"
79 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
80 %package -n libpush-profile_wearable
81 Summary: Push service client library for wearable
82 Group: Application Framework/Libraries
83 Provides: libpush-compat = %{version}-%{release}
84 Conflicts: libpush-profile_common
85 Conflicts: libpush-profile_tv
86 %description -n libpush-profile_wearable
87 Push service client library for wearable
90 %package -n libpush-devel
91 Summary: Push service client library (DEV)
92 Group: Development/Libraries
93 Requires: libpush = %{version}-%{release}
94 Requires: capi-appfw-application-devel
95 %description -n libpush-devel
96 Push service client library (DEV)
99 Summary: Push service daemon
100 Group: Application Framework/Service
101 Requires: %{name}-bin-compat = %{version}-%{release}
102 Recommends: %{name}-bin-profile_common = %{version}-%{release}
106 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
107 # if mobile || ivi || common || "undefined"
108 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
109 %package bin-profile_common
110 Summary: Push service daemon for mobile/common/ivi
111 Group: Application Framework/Service
112 Provides: %{name}-bin-compat = %{version}-%{release}
113 Provides: %{name}-bin-profile_mobile = %{version}-%{release}
114 Provides: %{name}-bin-profile_ivi = %{version}-%{release}
115 Conflicts: %{name}-bin-profile_wearable
116 Conflicts: %{name}-bin-profile_tv
117 %description bin-profile_common
118 Push service daemon for mobile/common/ivi
121 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
122 # if tv || "undefined"
123 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
124 %package bin-profile_tv
125 Summary: Push service daemon for tv
126 Group: Application Framework/Service
127 Provides: %{name}-bin-compat = %{version}-%{release}
128 Conflicts: %{name}-bin-profile_wearable
129 Conflicts: %{name}-bin-profile_common
130 %description bin-profile_tv
131 Push service daemon for tv
134 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
135 # if wearable || "undefined"
136 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
137 %package bin-profile_wearable
138 Summary: Push service daemon for wearable
139 Group: Application Framework/Service
140 Provides: %{name}-bin-compat = %{version}-%{release}
141 Conflicts: %{name}-bin-profile_tv
142 Conflicts: %{name}-bin-profile_common
143 %description bin-profile_wearable
144 Push service daemon for wearable
148 Summary: Push service tool
149 Group: Development/Tools
150 Requires: libpush = %{version}-%{release}
151 Requires: %{name}-bin = %{version}-%{release}
152 Requires: %{name}-tool-compat = %{version}-%{release}
153 Recommends: %{name}-tool-profile_common = %{version}-%{release}
157 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
158 # if mobile || ivi || common || "undefined"
159 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
160 %package tool-profile_common
161 Summary: Push service tool for mobile/common/ivi
162 Group: Development/Tools
163 Provides: %{name}-tool-compat = %{version}-%{release}
164 Provides: %{name}-tool-profile_mobile = %{version}-%{release}
165 Provides: %{name}-tool-profile_ivi = %{version}-%{release}
166 Conflicts: %{name}-tool-profile_wearable
167 Conflicts: %{name}-tool-profile_tv
168 %description tool-profile_common
169 Push service tool for mobile/common/ivi
172 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
173 # if tv || "undefined"
174 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
175 %package tool-profile_tv
176 Summary: Push service tool for tv
177 Group: Development/Tools
178 Provides: %{name}-tool-compat = %{version}-%{release}
179 Conflicts: %{name}-tool-profile_wearable
180 Conflicts: %{name}-tool-profile_common
181 %description tool-profile_tv
182 Push service tool for tv
185 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
186 # if wearable || "undefined"
187 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
188 %package tool-profile_wearable
189 Summary: Push service tool for wearable
190 Group: Development/Tools
191 Provides: %{name}-tool-compat = %{version}-%{release}
192 Conflicts: %{name}-tool-profile_tv
193 Conflicts: %{name}-tool-profile_common
194 %description tool-profile_wearable
195 Push service tool for wearable
198 %define _upgrade_script_path /usr/share/upgrade/scripts/
199 %define _upgrade_script 500.sppc.sh
208 mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
209 install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/pushd.service
211 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
212 # if mobile || ivi || common || "undefined"
213 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
214 install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/pushd.path
217 %ifarch %{ix86} || %{arm}
218 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
219 # if wearable || tv || "undefined"
220 %if "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
221 %install_service multi-user.target.wants pushd.service
224 %endif //%ifarch %{ix86} || %{arm}
226 mkdir -p %{buildroot}/usr/share/licenses/%{name}
227 cp -f LICENSE %{buildroot}/usr/share/licenses/%{name}
229 mkdir -p %{buildroot}%{_includedir}
230 cp -a include/push-service.h %{buildroot}%{_includedir}
231 cp -a include/push.h %{buildroot}%{_includedir}
232 %if %{_support_weblog}
233 include/pushlog.h %{buildroot}%{_includedir}
236 mkdir -p %{buildroot}%{_libdir}/pkgconfig
237 cp -a push.pc %{buildroot}%{_libdir}/pkgconfig/
238 mkdir -p %{buildroot}%{_bindir}
240 mkdir -p %{buildroot}%{_upgrade_script_path}
241 cp -f scripts/%{_upgrade_script} %{buildroot}%{_upgrade_script_path}
243 mkdir -p %{buildroot}/usr/share/push
247 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
248 # if mobile || ivi || common || "undefined"
249 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
251 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
254 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
256 pushd arm/share/push/
257 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
259 %if %{_support_weblog}
264 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
265 # if tv || "undefined"
266 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
268 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
271 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
273 pushd arm_tv/share/push/
274 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
276 %if %{_support_weblog}
277 arm_tv/bin/pushlog_tool
281 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
282 # if wearable || "undefined"
283 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
284 pushd arm_wearable/lib/
285 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.wearable"; done
287 pushd arm_wearable/bin/
288 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.wearable"; done
290 pushd arm_wearable/share/push/
291 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.wearable"; done
293 %if %{_support_weblog}
294 arm_wearable/bin/pushlog_tool
298 %endif //%ifarch %{arm}
303 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
306 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
308 pushd aarch64/share/push/
309 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
312 %if %{_support_weblog}
313 aarch64/bin/pushlog_tool
319 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
320 # if mobile || ivi || common || "undefined"
321 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
323 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
326 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
328 pushd x86/share/push/
329 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
331 %if %{_support_weblog}
336 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
337 # if tv || "undefined"
338 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
340 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
343 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
345 pushd x86_tv/share/push/
346 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
348 %if %{_support_weblog}
349 x86_tv/bin/pushlog_tool
353 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
354 # if wearable || "undefined"
355 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
356 pushd x86_wearable/lib/
357 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.wearable"; done
359 pushd x86_wearable/bin/
360 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.wearable"; done
362 pushd x86_wearable/share/push/
363 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.wearable"; done
365 %if %{_support_weblog}
366 x86_wearable/bin/pushlog_tool
370 %endif //%ifarch %{ix86}
375 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
376 # if mobile || ivi || common || "undefined"
377 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
378 for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
381 for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE"; done
383 pushd x86_64/share/push/
384 for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
386 %if %{_support_weblog}
387 x86_64/bin/pushlog_tool
392 %endif //%ifarch %{x86_64}
399 mkdir -p %{TZ_SYS_GLOBALUSER_DB}
400 sqlite3 %{TZ_SYS_GLOBALUSER_DB}/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
401 chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db
402 chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
403 chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db
404 chmod 644 %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
406 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db
407 chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
409 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
410 # if mobile || ivi || common || "undefined"
411 %if "%{?profile}" != "wearable" || "%{?profile}" != "tv"
412 ln -sf ../pushd.path %{_unitdir}/multi-user.target.wants/
416 %ifarch %{ix86} || %{arm}
417 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
418 # if tv || "undefined"
419 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
422 for FILE in push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
424 pushd /usr/share/push/
425 for FILE in Push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
428 %post tool-profile_tv
429 ln -sf push_tool.tv %{_bindir}/push_tool
431 %post -n libpush-profile_tv
433 for FILE in libpush.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
439 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
440 # if wearable || "undefined"
441 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
442 %post bin-profile_wearable
444 for FILE in push*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
446 pushd /usr/share/push/
447 for FILE in Push*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
450 %post tool-profile_wearable
451 ln -sf push_tool.wearable %{_bindir}/push_tool
453 %post -n libpush-profile_wearable
455 for FILE in libpush.so*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
461 %endif //%ifarch %{ix86} || %{arm}
465 %manifest libpush.manifest
466 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
467 # if mobile || ivi || common || "undefined"
468 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
469 %attr(755,root,root) %{_libdir}/libpush.so*
470 %exclude %{_libdir}/libpush.so*.tv
471 %exclude %{_libdir}/libpush.so*.wearable
474 %files -n libpush-devel
476 %{_libdir}/pkgconfig/*.pc
479 %manifest push-bin.manifest
480 %{_unitdir}/pushd.service
481 %attr(644,root,root) /usr/share/licenses/%{name}/LICENSE
482 %{_upgrade_script_path}%{_upgrade_script}
483 %attr(755,root,root) %{_upgrade_script_path}%{_upgrade_script}
486 %manifest push-tool.manifest
487 %if %{_support_weblog}
488 %{_bindir}/pushlog_tool
491 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
492 # if mobile || ivi || common || "undefined"
493 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
495 %files -n libpush-profile_common
496 # default .so files are housed in the main pkg.
498 %files bin-profile_common
500 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer
501 %{_unitdir}/pushd.path
503 %files tool-profile_common
508 %ifarch %{ix86} || %{arm}
509 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
510 # if tv || "undefined"
511 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
513 %files -n libpush-profile_tv
514 %manifest libpush.manifest
515 %attr(755,root,root) %{_libdir}/libpush.so*.tv
517 %files bin-profile_tv
519 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.tv
520 %{_unitdir}/multi-user.target.wants/pushd.service
522 %files tool-profile_tv
523 %{_bindir}/push_tool.tv
527 # This is for backward-compatibility. This does not deteriorate 4.0 Configurability
528 # if wearable || "undefined"
529 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
531 %files -n libpush-profile_wearable
532 %manifest libpush.manifest
533 %attr(755,root,root) %{_libdir}/libpush.so*.wearable
535 %files bin-profile_wearable
536 %{_bindir}/pushd.wearable
537 %attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.wearable
538 %{_unitdir}/multi-user.target.wants/pushd.service
540 %files tool-profile_wearable
541 %{_bindir}/push_tool.wearable
545 %endif //%ifarch %{ix86} || %{arm}
548 * Sat Nov 3 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.26
549 - Prevent bug fixed(out-of bounds read, dead code,..)
550 * Mon Oct 22 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.25
551 - bundle null check added & protobuf null check added
552 * Wed Sep 19 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.24
553 - when pkg is uninstalled, db process is added
554 * Fri Sep 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.23
555 - emul check logic is changed(using capi-system-info)
556 * Tue Sep 4 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.22
557 - decoding of message with space character which is urlencoded to "+"
558 * Wed Aug 29 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.21
559 - package uninstalled event added
560 * Fri Aug 17 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.20
561 - debug msg added & some internal function name changed
562 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.19
563 - push noti default action is silent, and old key is deleted
564 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.18
565 - tapi imei api is changed for new tapi
566 * Tue Aug 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.17
567 - emulator check func is added
568 * Wed Jul 25 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.16
569 - OSP Push noti support(alertMessage,..)