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