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