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