Alert when ticker arrived.
[platform/core/appfw/sppc.git] / packaging / push.spec
1 Name:       push
2 Summary:    Push services and client library.
3 Version:    0.2.42
4 Release:    2
5 Group:      TO_BE_FILLED
6 License:    TO_BE_FILLED
7 Source0:    %{name}-%{version}.tar.gz
8
9
10 %description
11 Push services and client library.
12
13 %package -n libpush
14 Summary:    Push service client library
15 Group:      TO_BE_FILLED
16 Provides:   libpush.so.0
17
18 %description -n libpush
19 Push service client library
20
21
22 %package -n libpush-devel
23 Summary:    Push service client library (DEV)
24 Group:      devel
25 Requires:   libpush = %{version}-%{release}
26 Requires:   capi-appfw-application-devel
27
28 %description -n libpush-devel
29 Push service client library (DEV)
30
31
32 %package bin
33 Summary:    Push service daemon
34 Group:      TO_BE_FILLED
35 Requires:   badge
36
37 %description bin
38 Push service daemon
39
40
41 %package tool
42 Summary:    Push service tool
43 Group:      devel
44 Requires:   libpush = %{version}-%{release}
45 Requires:   %{name}-bin = %{version}-%{release}
46
47 %description tool
48 Push service tool
49
50
51
52 %prep
53 %setup -q
54
55 %build
56
57 %install
58 rm -rf %{buildroot}
59
60
61 mkdir -p %{buildroot}%{_bindir}
62 mkdir -p %{buildroot}%{_libdir}/pkgconfig
63 mkdir -p %{buildroot}%{_includedir}
64 mkdir -p %{buildroot}/usr/share/push
65 mkdir -p %{buildroot}%{_sysconfdir}/init.d
66 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/{rc3.d,rc5.d}
67 mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants
68
69
70 %ifarch %{arm}
71 #libpush
72 cp -a arm/lib/libpush.so.* %{buildroot}%{_libdir}
73 #libpush-devel
74 cp -a arm/include/push.h %{buildroot}%{_includedir}
75 cp -a arm/lib/pkgconfig/push.pc %{buildroot}%{_libdir}/pkgconfig/push.pc
76 cp -a arm/lib/libpush.so %{buildroot}%{_libdir}
77 #push-bin
78 cp -a arm/bin/pushd %{buildroot}%{_bindir}
79 cp -a arm/share/push/PushServerTrust.cer %{buildroot}/usr/share/push/PushServerTrust.cer
80 cp -a arm/etc/init.d/pushd %{buildroot}%{_sysconfdir}/init.d/pushd
81 cp -a arm/etc/rc.d/rc3.d/S90pushd %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S90pushd
82 cp -a arm/etc/rc.d/rc5.d/S90pushd %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S90pushd
83 cp -a arm/lib/systemd/user/pushd.service %{buildroot}%{_libdir}/systemd/user/pushd.service
84 cp -a arm/lib/systemd/user/tizen-middleware.target.wants/pushd.service %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants/pushd.service
85 #push-tool
86 cp -a arm/bin/push_tool %{buildroot}%{_bindir}
87 %else
88 #libpush
89 cp -a x86/lib/libpush.so.* %{buildroot}%{_libdir}
90 #libpush-devel
91 cp -a x86/include/push.h %{buildroot}%{_includedir}
92 cp -a x86/lib/pkgconfig/push.pc %{buildroot}%{_libdir}/pkgconfig/push.pc
93 cp -a x86/lib/libpush.so %{buildroot}%{_libdir}
94 #push-bin
95 cp -a x86/bin/pushd %{buildroot}%{_bindir}
96 cp -a x86/share/push/PushServerTrust.cer %{buildroot}/usr/share/push/PushServerTrust.cer
97 cp -a x86/etc/init.d/pushd %{buildroot}%{_sysconfdir}/init.d/pushd
98 cp -a x86/etc/rc.d/rc3.d/S90pushd %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S90pushd
99 cp -a x86/etc/rc.d/rc5.d/S90pushd %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S90pushd
100 cp -a x86/lib/systemd/user/pushd.service %{buildroot}%{_libdir}/systemd/user/pushd.service
101 cp -a x86/lib/systemd/user/tizen-middleware.target.wants/pushd.service %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants/pushd.service
102 #push-tool
103 cp -a x86/bin/push_tool %{buildroot}%{_bindir}
104 %endif
105
106 if [ -f /usr/lib/rpm-plugins/msm.so ]
107 then
108         chsmack -a "_" -e "_" %{buildroot}/etc/init.d/pushd
109         chsmack -a "_" -e "_" %{buildroot}/etc/rc.d/rc3.d/S90pushd
110         chsmack -a "_" -e "_" %{buildroot}/etc/rc.d/rc5.d/S90pushd
111 fi
112
113 %post bin
114 mkdir -p /opt/dbspace
115 sqlite3 /opt/dbspace/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
116 chown root:5000 /opt/dbspace/.push.db
117 chown root:5000 /opt/dbspace/.push.db-journal
118 chmod 660 /opt/dbspace/.push.db
119 chmod 660 /opt/dbspace/.push.db-journal
120
121 chsmack -a 'push-service::db' /opt/dbspace/.push.db
122 chsmack -a 'push-service::db' /opt/dbspace/.push.db-journal
123
124 _VER="1"
125 _DEV_TYPE="00000000"
126 _DEV_INFO="device.model=ssltest"
127 _IP_PV="gld.push.samsungosp.com"
128 _PORT_PV=5223
129 #ping interval {120,240,480,960,1920}
130 _PING_INT=480
131 _GRP="-g 5000"
132
133 vconftool set -t string file/private/push-bin/version ${_VER} ${_GRP} -f
134 vconftool set -t string file/private/push-bin/dev_type ${_DEV_TYPE} ${_GRP} -f
135 vconftool set -t string file/private/push-bin/dev_info ${_DEV_INFO} ${_GRP} -f
136 vconftool set -t string file/private/push-bin/ip_pv ${_IP_PV} ${_GRP} -f
137 vconftool set -t int    file/private/push-bin/port_pv ${_PORT_PV} ${_GRP} -f
138 vconftool set -t int    file/private/push-bin/ping_int ${_PING_INT} ${_GRP} -f
139 vconftool set -t string file/private/push-bin/devtk "" ${_GRP} -f
140 vconftool set -t string file/private/push-bin/ip_pri "" ${_GRP} -f
141 vconftool set -t int    file/private/push-bin/port_pri -1 ${_GRP} -f
142 vconftool set -t string file/private/push-bin/ip_sec "" ${_GRP} -f
143 vconftool set -t int    file/private/push-bin/port_sec -1 ${_GRP} -f
144
145 #vconftool unset file/private/push-bin/devtk
146
147 %post -n libpush
148 /sbin/ldconfig
149
150 %postun -p /sbin/ldconfig
151
152
153 %files -n libpush
154 %manifest libpush.manifest
155 %attr(644,-,-) %{_libdir}/libpush.so.*
156
157 %files -n libpush-devel
158 %{_includedir}/*.h
159 %{_libdir}/pkgconfig/*.pc
160 %{_libdir}/libpush.so
161
162 %files bin
163 %manifest push-bin.manifest
164 %{_bindir}/pushd
165 /usr/share/push/*.cer
166 /etc/init.d/pushd
167 /etc/rc.d/rc3.d/S90pushd
168 /etc/rc.d/rc5.d/S90pushd
169 /usr/lib/systemd/user/pushd.service
170 /usr/lib/systemd/user/tizen-middleware.target.wants/pushd.service
171
172 %files tool
173 %manifest push-tool.manifest
174 %{_bindir}/push_tool
175
176 %changelog
177 * Mon Oct 22 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.25
178 - bundle null check added & protobuf null check added
179 * Wed Sep 19 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.24
180 - when pkg is uninstlled, db process is added
181 * Fri Sep 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.23
182 - emul check logic is changed(using capi-system-info)
183 * Tue Sep 4 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.22
184 - decoding of message with space character which is urlencoded to "+"
185 * Wed Aug 29 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.21
186 - package uninstalled event added
187 * Fri Aug 17 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.20
188 - debug msg added & some internal function name changed
189 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.19
190 - push noti default action is silent, and old key is deleted
191 * Wed Aug 8 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.18
192 - tapi imei api is changed for new tapi
193 * Tue Aug 7 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.17
194 - emulator check func is added
195 * Wed Jul 25 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.16
196 - OSP Push noti support(alertMessage,..)
197