minor version up as 0.4.42: updated so files
[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.42
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}/multi-user.target.wants
66 install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/pushd.service
67 %install_service multi-user.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 %ifarch %{arm}
91
92 #libpush
93 cp -a arm/lib/libpush.so.* %{buildroot}%{_libdir}
94 #libpus-devel
95 cp -a arm/lib/libpush.so %{buildroot}%{_libdir}
96 #push-bin
97 cp -a arm/bin/pushd %{buildroot}%{_bindir}
98 cp -a arm/bin/push_tool %{buildroot}%{_bindir}
99 cp -a arm/share/push/*.cer %{buildroot}/usr/share/push/
100 %if %{_support_weblog}
101         arm/bin/pushlog_tool
102 %endif
103
104 %if "%{profile}" == "tv"
105 #libpush
106 cp -a arm_tv/lib/libpush.so.* %{buildroot}%{_libdir}
107 #libpus-devel
108 cp -a arm_tv/lib/libpush.so %{buildroot}%{_libdir}
109 #push-bin
110 cp -a arm_tv/bin/pushd %{buildroot}%{_bindir}
111 cp -a arm_tv/bin/push_tool %{buildroot}%{_bindir}
112 cp -a arm_tv/share/push/*.cer %{buildroot}/usr/share/push/
113 %if %{_support_weblog}
114         arm_tv/bin/pushlog_tool
115 %endif
116 %endif
117
118 %if "%{profile}" == "wearable"
119 #libpush
120 cp -a arm_wearable/lib/libpush.so.* %{buildroot}%{_libdir}
121 #libpus-devel
122 cp -a arm_wearable/lib/libpush.so %{buildroot}%{_libdir}
123 #push-bin
124 cp -a arm_wearable/bin/pushd %{buildroot}%{_bindir}
125 cp -a arm_wearable/bin/push_tool %{buildroot}%{_bindir}
126 cp -a arm_wearable/share/push/*.cer %{buildroot}/usr/share/push/
127 %if %{_support_weblog}
128         arm_wearable/bin/pushlog_tool
129 %endif
130 %endif
131 %endif
132
133
134 %ifarch aarch64
135 #libpush
136 cp -a aarch64/lib64/libpush.so.* %{buildroot}%{_libdir}
137 #libpush-devel
138 cp -a aarch64/lib64/libpush.so %{buildroot}%{_libdir}
139 #push-bin
140 cp -a aarch64/bin/pushd %{buildroot}%{_bindir}
141 cp -a aarch64/bin/push_tool %{buildroot}%{_bindir}
142 cp -a aarch64/share/push/*.cer %{buildroot}/usr/share/push/
143 %if %{_support_weblog}
144         aarch64/bin/pushlog_tool
145 %endif
146 %endif
147
148
149 %ifarch %{ix86}
150
151 #libpush
152 cp -a x86/lib/libpush.so.* %{buildroot}%{_libdir}
153 #libpus-devel
154 cp -a x86/lib/libpush.so %{buildroot}%{_libdir}
155 #push-bin
156 cp -a x86/bin/pushd %{buildroot}%{_bindir}
157 cp -a x86/bin/push_tool %{buildroot}%{_bindir}
158 cp -a x86/share/push/*.cer %{buildroot}/usr/share/push/
159 %if %{_support_weblog}
160         x86/bin/pushlog_tool
161 %endif
162
163 %if "%{profile}" == "tv"
164 #libpush
165 cp -a x86_tv/lib/libpush.so.* %{buildroot}%{_libdir}
166 #libpus-devel
167 cp -a x86_tv/lib/libpush.so %{buildroot}%{_libdir}
168 #push-bin
169 cp -a x86_tv/bin/pushd %{buildroot}%{_bindir}
170 cp -a x86_tv/bin/push_tool %{buildroot}%{_bindir}
171 cp -a x86_tv/share/push/*.cer %{buildroot}/usr/share/push/
172 %if %{_support_weblog}
173         x86_tv/bin/pushlog_tool
174 %endif
175 %endif
176
177 %if "%{profile}" == "wearable"
178 #libpush
179 cp -a x86_wearable/lib/libpush.so.* %{buildroot}%{_libdir}
180 #libpus-devel
181 cp -a x86_wearable/lib/libpush.so %{buildroot}%{_libdir}
182 #push-bin
183 cp -a x86_wearable/bin/pushd %{buildroot}%{_bindir}
184 cp -a x86_wearable/bin/push_tool %{buildroot}%{_bindir}
185 cp -a x86_wearable/share/push/*.cer %{buildroot}/usr/share/push/
186 %if %{_support_weblog}
187         x86_wearable/bin/pushlog_tool
188 %endif
189 %endif
190
191 %endif
192
193
194 %ifarch x86_64
195 #libpush
196 cp -a x86_64/lib64/libpush.so.* %{buildroot}%{_libdir}
197 #libpus-devel
198 cp -a x86_64/lib64/libpush.so %{buildroot}%{_libdir}
199 #push-bin
200 cp -a x86_64/bin/pushd %{buildroot}%{_bindir}
201 cp -a x86_64/bin/push_tool %{buildroot}%{_bindir}
202 cp -a x86_64/share/push/*.cer %{buildroot}/usr/share/push/
203 %if %{_support_weblog}
204         x86_64/bin/pushlog_tool
205 %endif
206 %endif
207
208
209 %post bin
210
211 %post -n libpush
212 /sbin/ldconfig
213
214 %postun -n libpush -p /sbin/ldconfig
215
216 %files -n libpush
217 %manifest libpush.manifest
218 %attr(644,service_fw,service_fw)%{_libdir}/libpush.so.*
219
220 %files -n libpush-devel
221 %{_includedir}/*.h
222 %{_libdir}/pkgconfig/*.pc
223 %{_libdir}/libpush.so
224
225 %files bin
226 %manifest push-bin.manifest
227 %{_bindir}/pushd
228 %attr(644,service_fw,service_fw)/usr/share/push/*.cer
229 %attr(644,service_fw,service_fw)/usr/share/license/%{name}
230
231 # This is a certificate file to access to logging server by HTTPS.
232 %if %{_support_weblog}
233 %attr(644,service_fw,service_fw)/usr/share/push/push_sslkey.pem
234 %attr(644,service_fw,service_fw)/usr/share/push/prd-dl-key.pem
235 %endif
236
237 %{_unitdir}/pushd.service
238 %{_unitdir}/multi-user.target.wants/pushd.service
239
240 %files tool
241 %manifest push-tool.manifest
242 %{_bindir}/push_tool
243
244 %if %{_support_weblog}
245         %{_bindir}/pushlog_tool
246 %endif
247
248 %changelog
249 * Sat Nov 3 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.26
250 - Prevent bug fixed(out-of bounds read, dead code,..)
251 * Mon Oct 22 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.25
252 - bundle null check added & protobuf null check added
253 * Wed Sep 19 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.24
254 - when pkg is uninstlled, db process is added
255 * Fri Sep 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.23
256 - emul check logic is changed(using capi-system-info)
257 * Tue Sep 4 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.22
258 - decoding of message with space character which is urlencoded to "+"
259 * Wed Aug 29 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.21
260 - package uninstalled event added
261 * Fri Aug 17 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.20
262 - debug msg added & some internal function name changed
263 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.19
264 - push noti default action is silent, and old key is deleted
265 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.18
266 - tapi imei api is changed for new tapi
267 * Tue Aug 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.17
268 - emulator check func is added
269 * Wed Jul 25 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.16
270 - OSP Push noti support(alertMessage,..)
271