merge tizen branch
[platform/core/system/system-popup.git] / packaging / system-servant.spec
1 %bcond_with wayland
2 %bcond_with emulator
3
4 %define PROFILE common
5 %define FORMFACTOR none
6
7 #Main applications
8 %define powerkey_popup off
9 %define overheat_popup off
10 %define crash_popup off
11 %define system_popup off
12 %define notification_service off
13 %define signal_sender off
14 #sub-popups of system-popup
15 %define battery_popup off
16 %define cooldown_popup off
17 %define mmc_popup off
18 %define power_popup off
19 %define usb_popup off
20 %define watchdog_popup off
21 %define storage_popup off
22 %define system_cooperator off
23
24 %if "%{?profile}" == "mobile"
25 %define PROFILE mobile
26 #Main applicaitons
27 %define powerkey_popup on
28 %define overheat_popup on
29 %define crash_popup on
30 %define system_popup on
31 %define notification_service on
32 %define signal_sender on
33 %define system_cooperator on
34 #sub-popups of system-popup
35 %define battery_popup on
36 %define cooldown_popup on
37 %define mmc_popup on
38 %define power_popup on
39 %define usb_popup on
40 %define watchdog_popup on
41 %define storage_popup on
42 %endif
43
44 %if "%{?profile}" == "wearable"
45 %define PROFILE wearable
46 #Main applicaitons
47 %define powerkey_popup on
48 %define overheat_popup off
49 %define crash_popup on
50 %define system_popup on
51 %define system_cooperator on
52 #sub-popups of system-popup
53 %define storage_popup on
54 %define watchdog_popup on
55 %define battery_popup on
56 %define cooldown_popup on
57 %define power_popup on
58 %endif
59
60 %if "%{?profile}" == "tv"
61 %define PROFILE tv
62 #Main applications
63 %define powerkey_popup on
64 %define crash_popup on
65 #sub-popups of system-popup
66 %endif
67
68 Name:       system-servant
69 Summary:    Servant application for System FW
70 Version:    0.2.0
71 Release:    1
72 Group:      System/Utilities
73 License:    Apache-2.0
74 Source0:    %{name}-%{version}.tar.gz
75 Source1:    %{name}.manifest
76 Source1001:    org.tizen.powerkey-syspopup.manifest
77 Source1002:    org.tizen.overheat-syspopup.manifest
78 Source1015:    org.tizen.crash-syspopup.manifest
79 Source2001:    org.tizen.system-syspopup.manifest
80 Source2003:    org.tizen.system-signal-sender.manifest
81 BuildRequires:  pkgconfig(appsvc)
82 BuildRequires:  pkgconfig(pkgmgr-info)
83 BuildRequires:  pkgconfig(elementary)
84 BuildRequires:  pkgconfig(appcore-efl)
85 BuildRequires:  pkgconfig(syspopup)
86 BuildRequires:  pkgconfig(syspopup-caller)
87 BuildRequires:  pkgconfig(notification)
88 BuildRequires:  pkgconfig(vconf)
89 BuildRequires:  pkgconfig(glib-2.0)
90 BuildRequires:  pkgconfig(dlog)
91 BuildRequires:  pkgconfig(dbus-1)
92 BuildRequires:  pkgconfig(edbus)
93 BuildRequires:  pkgconfig(deviced)
94 BuildRequires:  pkgconfig(feedback)
95 BuildRequires:  pkgconfig(efl-extension)
96 BuildRequires:  pkgconfig(libtzplatform-config)
97 BuildRequires:  edje-bin
98 BuildRequires:  pkgconfig(capi-media-sound-manager)
99 BuildRequires:  pkgconfig(capi-media-wav-player)
100 BuildRequires:  pkgconfig(capi-appfw-application)
101 BuildRequires:  pkgconfig(capi-appfw-app-manager)
102 BuildRequires:  pkgconfig(capi-media-recorder)
103 BuildRequires:  pkgconfig(capi-system-info)
104 BuildRequires:  model-build-features
105
106 %if "%{?model_build_feature_formfactor}" == "circle"
107         %define FORMFACTOR circle
108 %else
109         %define FORMFACTOR rectangle
110 %endif
111
112 BuildRequires:  cmake
113 BuildRequires:  gettext-devel
114
115 %description
116 System applications such as app-launcher
117 and service file for dbus activation
118
119 %if %{?crash_popup} == on
120 %package -n org.tizen.crash-syspopup
121 Summary:    System popup application (crash system popup)
122 Group:      System/Utilities
123 Requires:   %{name} = %{version}-%{release}
124
125 %description -n org.tizen.crash-syspopup
126 to inform user crash information. It is activated
127 when crash event is happend
128 %endif
129
130 %if %{?powerkey_popup} == on
131 %package -n org.tizen.powerkey-syspopup
132 Summary:    Powerkey-popup application
133 Group:      System/Utilities
134 Requires:   %{name} = %{version}-%{release}
135
136 %description -n org.tizen.powerkey-syspopup
137 to inform user powerkey information. It is activated
138 when user power key event is happened
139 %endif
140
141 %if %{?overheat_popup} == on
142 %package -n org.tizen.overheat-syspopup
143 Summary:    Overheat-popup application
144 Group:      System/Utilities
145 Requires:   %{name} = %{version}-%{release}
146
147 %description -n org.tizen.overheat-syspopup
148 to inform user overheat information. It is activated
149 when overheat event is happened
150 %endif
151
152 %if %{?signal_sender} == on
153 %package -n org.tizen.system-signal-sender
154 Summary:    System FW signal sender
155 Group:      System/Utilities
156 Requires:   %{name} = %{version}-%{release}
157
158 %description -n org.tizen.system-signal-sender
159 to inform user system FW signal sender. It is activated
160 when system event is happend
161 %endif
162
163 %if %{?system_popup} == on
164 %package -n org.tizen.system-syspopup
165 Summary:    System popup application
166 Group:      System/Utilities
167 Requires:   %{name} = %{version}-%{release}
168
169 %description -n org.tizen.system-syspopup
170 to inform user system information. It is activated
171 when system event is happend
172
173 %endif # system_popup
174
175 %prep
176 %setup -q
177
178 %build
179 chmod 0644 %{SOURCE1}
180 cp %{SOURCE1} .
181
182 %if %{powerkey_popup} == on
183 chmod 0644 %{SOURCE1001}
184 cp %{SOURCE1001} .
185 %endif
186
187 %if %{overheat_popup} == on
188 chmod 0644 %{SOURCE1002}
189 cp %{SOURCE1002} .
190 %endif
191
192 %if %{crash_popup} == on
193 chmod 0644 %{SOURCE1015}
194 cp %{SOURCE1015} .
195 %endif
196
197 %if %{system_popup} == on
198 chmod 0644 %{SOURCE2001}
199 cp %{SOURCE2001} .
200 %endif
201
202 %if %{signal_sender} == on
203 chmod 0644 %{SOURCE2003}
204 cp %{SOURCE2003} .
205 %endif
206
207 %define DPMS none
208 %if %{with wayland}
209 %define DPMS wayland
210 %endif
211
212 %cmake . \
213                 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
214                 -DPKGNAME=%{name} \
215                 -DPROFILE=%{PROFILE} \
216                 -DFORMFACTOR=%{FORMFACTOR} \
217                 -DDPMS=%{DPMS} \
218                 -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
219                 -DTZ_SYS_RO_PACKAGES=%{TZ_SYS_RO_PACKAGES} \
220                 -DTZ_SYS_SMACK=%{TZ_SYS_SMACK} \
221                 -DTZ_SYS_SHARE=%{TZ_SYS_SHARE} \
222                 -DTZ_SYS_RO_SHARE=%{TZ_SYS_RO_SHARE} \
223                 -DTZ_SYS_RO_APP=%{TZ_SYS_RO_APP} \
224                 -DPOWERKEY_POPUP=%{powerkey_popup} \
225                 -DCRASH_POPUP=%{crash_popup} \
226                 -DNOTIFICATION_SERVICE=%{notification_service} \
227                 -DBATTERY_POPUP=%{battery_popup} \
228                 -DCOOLDOWN_POPUP=%{cooldown_popup} \
229                 -DSYSTEM_POPUP=%{system_popup} \
230                 -DSIGNAL_SENDER=%{signal_sender} \
231                 -DSYSTEM_COOPERATOR=%{system_cooperator} \
232                 -DMMC_POPUP=%{mmc_popup} \
233                 -DSTORAGE_POPUP=%{storage_popup} \
234                 -DUSB_POPUP=%{usb_popup} \
235                 -DWATCHDOG_POPUP=%{watchdog_popup} \
236                 -DOVERHEAT_POPUP=%{overheat_popup} \
237                 -DPOWER_POPUP=%{power_popup} \
238
239 make %{?jobs:-j%jobs}
240
241 %install
242 rm -rf %{buildroot}
243 %make_install
244
245
246 %files
247 %manifest %{name}.manifest
248 %{_bindir}/sysapp-launcher
249 %{_datadir}/license/sysapp-launcher
250 %{_datadir}/dbus-1/system-services/org.tizen.system.popup.service
251 %config %{_sysconfdir}/dbus-1/system.d/launcher.conf
252
253 #po files to support multi-languages
254 %lang(ar) %{_datadir}/locale/ar/LC_MESSAGES/system-servant.mo
255 %lang(az) %{_datadir}/locale/az/LC_MESSAGES/system-servant.mo
256 %lang(bg) %{_datadir}/locale/bg/LC_MESSAGES/system-servant.mo
257 %lang(bn) %{_datadir}/locale/bn/LC_MESSAGES/system-servant.mo
258 %lang(ca) %{_datadir}/locale/ca/LC_MESSAGES/system-servant.mo
259 %lang(cs) %{_datadir}/locale/cs/LC_MESSAGES/system-servant.mo
260 %lang(da) %{_datadir}/locale/da/LC_MESSAGES/system-servant.mo
261 %lang(de) %{_datadir}/locale/de/LC_MESSAGES/system-servant.mo
262 %lang(el_GR) %{_datadir}/locale/el_GR/LC_MESSAGES/system-servant.mo
263 %lang(en_PH) %{_datadir}/locale/en_PH/LC_MESSAGES/system-servant.mo
264 %lang(en) %{_datadir}/locale/en/LC_MESSAGES/system-servant.mo
265 %lang(en_US) %{_datadir}/locale/en_US/LC_MESSAGES/system-servant.mo
266 %lang(es_ES) %{_datadir}/locale/es_ES/LC_MESSAGES/system-servant.mo
267 %lang(es_US) %{_datadir}/locale/es_US/LC_MESSAGES/system-servant.mo
268 %lang(et) %{_datadir}/locale/et/LC_MESSAGES/system-servant.mo
269 %lang(eu) %{_datadir}/locale/eu/LC_MESSAGES/system-servant.mo
270 %lang(fa) %{_datadir}/locale/fa/LC_MESSAGES/system-servant.mo
271 %lang(fi) %{_datadir}/locale/fi/LC_MESSAGES/system-servant.mo
272 %lang(fr_CA) %{_datadir}/locale/fr_CA/LC_MESSAGES/system-servant.mo
273 %lang(fr) %{_datadir}/locale/fr/LC_MESSAGES/system-servant.mo
274 %lang(ga) %{_datadir}/locale/ga/LC_MESSAGES/system-servant.mo
275 %lang(gl) %{_datadir}/locale/gl/LC_MESSAGES/system-servant.mo
276 %lang(gu) %{_datadir}/locale/gu/LC_MESSAGES/system-servant.mo
277 %lang(he) %{_datadir}/locale/he/LC_MESSAGES/system-servant.mo
278 %lang(hi) %{_datadir}/locale/hi/LC_MESSAGES/system-servant.mo
279 %lang(hr) %{_datadir}/locale/hr/LC_MESSAGES/system-servant.mo
280 %lang(hu) %{_datadir}/locale/hu/LC_MESSAGES/system-servant.mo
281 %lang(hy) %{_datadir}/locale/hy/LC_MESSAGES/system-servant.mo
282 %lang(is) %{_datadir}/locale/is/LC_MESSAGES/system-servant.mo
283 %lang(it_IT) %{_datadir}/locale/it_IT/LC_MESSAGES/system-servant.mo
284 %lang(ja_JP) %{_datadir}/locale/ja_JP/LC_MESSAGES/system-servant.mo
285 %lang(ka) %{_datadir}/locale/ka/LC_MESSAGES/system-servant.mo
286 %lang(kk) %{_datadir}/locale/kk/LC_MESSAGES/system-servant.mo
287 %lang(kn) %{_datadir}/locale/kn/LC_MESSAGES/system-servant.mo
288 %lang(ko_KR) %{_datadir}/locale/ko_KR/LC_MESSAGES/system-servant.mo
289 %lang(lt) %{_datadir}/locale/lt/LC_MESSAGES/system-servant.mo
290 %lang(lv) %{_datadir}/locale/lv/LC_MESSAGES/system-servant.mo
291 %lang(mk) %{_datadir}/locale/mk/LC_MESSAGES/system-servant.mo
292 %lang(ml) %{_datadir}/locale/ml/LC_MESSAGES/system-servant.mo
293 %lang(nb) %{_datadir}/locale/nb/LC_MESSAGES/system-servant.mo
294 %lang(nl) %{_datadir}/locale/nl/LC_MESSAGES/system-servant.mo
295 %lang(pl) %{_datadir}/locale/pl/LC_MESSAGES/system-servant.mo
296 %lang(pt_BR) %{_datadir}/locale/pt_BR/LC_MESSAGES/system-servant.mo
297 %lang(pt_PT) %{_datadir}/locale/pt_PT/LC_MESSAGES/system-servant.mo
298 %lang(ro) %{_datadir}/locale/ro/LC_MESSAGES/system-servant.mo
299 %lang(ru_RU) %{_datadir}/locale/ru_RU/LC_MESSAGES/system-servant.mo
300 %lang(si) %{_datadir}/locale/si/LC_MESSAGES/system-servant.mo
301 %lang(sk) %{_datadir}/locale/sk/LC_MESSAGES/system-servant.mo
302 %lang(sl) %{_datadir}/locale/sl/LC_MESSAGES/system-servant.mo
303 %lang(sr) %{_datadir}/locale/sr/LC_MESSAGES/system-servant.mo
304 %lang(sv) %{_datadir}/locale/sv/LC_MESSAGES/system-servant.mo
305 %lang(ta) %{_datadir}/locale/ta/LC_MESSAGES/system-servant.mo
306 %lang(te) %{_datadir}/locale/te/LC_MESSAGES/system-servant.mo
307 %lang(th) %{_datadir}/locale/th/LC_MESSAGES/system-servant.mo
308 %lang(tr_TR) %{_datadir}/locale/tr_TR/LC_MESSAGES/system-servant.mo
309 %lang(uk) %{_datadir}/locale/uk/LC_MESSAGES/system-servant.mo
310 %lang(ur) %{_datadir}/locale/ur/LC_MESSAGES/system-servant.mo
311 %lang(uz) %{_datadir}/locale/uz/LC_MESSAGES/system-servant.mo
312 %lang(zh_CN) %{_datadir}/locale/zh_CN/LC_MESSAGES/system-servant.mo
313 %lang(zh_HK) %{_datadir}/locale/zh_HK/LC_MESSAGES/system-servant.mo
314 %lang(zh_TW) %{_datadir}/locale/zh_TW/LC_MESSAGES/system-servant.mo
315
316 %if %{notification_service} == on
317 %{_datadir}/system-apps/res/icons/batt_full_icon.png
318 %{_datadir}/system-apps/res/icons/batt_full_indicator.png
319 %{_datadir}/system-apps/res/icons/noti_charging_battery_low.png
320 %{_datadir}/system-apps/res/icons/noti_cooling_down.png
321 %{TZ_SYS_RO_SHARE}/system-apps/res/icons/datausage_warning.png
322 %{TZ_SYS_RO_SHARE}/system-apps/res/icons/led_torch.png
323 %{TZ_SYS_RO_SHARE}/system-apps/res/icons/usb_icon.png
324 %endif
325
326 %if %{system_cooperator} == on
327 %{_bindir}/system-cooperator
328 %endif
329
330 %if %{crash_popup} == on
331 %files -n org.tizen.crash-syspopup
332 %manifest org.tizen.crash-syspopup.manifest
333 %license LICENSE
334 %defattr(-,root,root,-)
335 %{TZ_SYS_RO_APP}/org.tizen.crash-syspopup/bin/crash-popup
336 %{TZ_SYS_RO_SHARE}/packages/org.tizen.crash-syspopup.xml
337 %endif
338
339 %if %{system_popup} == on
340 %files -n org.tizen.system-syspopup
341 %manifest org.tizen.system-syspopup.manifest
342 %defattr(-,root,root,-)
343 %{TZ_SYS_RO_APP}/org.tizen.system-syspopup/bin/system-syspopup
344 %if "%{?profile}" == "mobile"
345 %{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/usb-popup.edj
346 %endif
347 %if "%{?profile}" == "wearable"
348 %{TZ_SYS_RO_APP}/org.tizen.system-syspopup/shared/res/cooldown-popup.edj
349 %{TZ_SYS_RO_APP}/org.tizen.system-syspopup/res/overheat.png
350 %endif
351 %{TZ_SYS_RO_SHARE}/packages/org.tizen.system-syspopup.xml
352 %endif
353
354 %if %{powerkey_popup} == on
355 %files -n org.tizen.powerkey-syspopup
356 %manifest org.tizen.powerkey-syspopup.manifest
357 %license LICENSE
358 %defattr(-,root,root,-)
359 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/bin/powerkey-popup
360 %{TZ_SYS_RO_SHARE}/packages/org.tizen.powerkey-syspopup.xml
361 %if "%{?profile}" == "mobile"
362 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_power_off.png
363 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/core_restart.png
364 %endif
365 %if "%{?profile}" == "wearable"
366 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_check.png
367 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/circle_btn_delete.png
368 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_bg.png
369 %{TZ_SYS_RO_APP}/org.tizen.powerkey-syspopup/res/gear_device_options_power_off.png
370 %endif
371 %endif
372
373 %if %{overheat_popup} == on
374 %files -n org.tizen.overheat-syspopup
375 %manifest org.tizen.overheat-syspopup.manifest
376 %license LICENSE
377 %defattr(-,root,root,-)
378 %{TZ_SYS_RO_APP}/org.tizen.overheat-syspopup/bin/overheat-popup
379 %{TZ_SYS_RO_APP}/org.tizen.overheat-syspopup/shared/res/overheat-popup.edj
380 %{TZ_SYS_RO_SHARE}/packages/org.tizen.overheat-syspopup.xml
381 %endif
382
383 %if %{signal_sender} == on
384 %files -n org.tizen.system-signal-sender
385 %manifest org.tizen.system-signal-sender.manifest
386 %defattr(-,root,root,-)
387 %{TZ_SYS_RO_APP}/org.tizen.system-signal-sender/bin/system-signal-sender
388 %{TZ_SYS_RO_SHARE}/packages/org.tizen.system-signal-sender.xml
389 %endif