Send module name of keyboard Engine
[platform/core/uifw/ise-default.git] / packaging / ise-default.spec
1 Name:       ise-default
2 Summary:    Tizen keyboard
3 Version:    1.6.14
4 Release:    1
5 Group:      Graphics & UI Framework/Input
6 License:    Apache-2.0
7 Source0:    ise-default-%{version}.tar.gz
8 BuildRequires:  gettext-tools
9 BuildRequires:  edje-bin
10 BuildRequires:  cmake
11 BuildRequires:  pkgconfig(elementary)
12 BuildRequires:  pkgconfig(vconf)
13 BuildRequires:  pkgconfig(dlog)
14 BuildRequires:  pkgconfig(libscl-ui)
15 BuildRequires:  pkgconfig(ecore-imf)
16 BuildRequires:  pkgconfig(libxml-2.0)
17 BuildRequires:  pkgconfig(efl-extension)
18 BuildRequires:  pkgconfig(libtzplatform-config)
19 BuildRequires:  pkgconfig(stt)
20 BuildRequires:  pkgconfig(capi-appfw-application)
21 BuildRequires:  pkgconfig(capi-appfw-preference)
22 BuildRequires:  pkgconfig(capi-media-audio-io)
23 BuildRequires:  pkgconfig(capi-ui-inputmethod)
24 BuildRequires:  pkgconfig(smartreply)
25 BuildRequires:  pkgconfig(key-manager)
26 BuildRequires:  pkgconfig(ode)
27 BuildRequires:  pkgconfig(capi-system-system-settings)
28 BuildRequires:  pkgconfig(glib-2.0)
29 BuildRequires:  pkgconfig(gio-2.0)
30 BuildRequires:  pkgconfig(pkgmgr-info)
31
32 # This is for old profile-based OBS project optimizations.
33 # In 4.0 unified build env, this if statement is always true.
34 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
35 BuildRequires:  pkgconfig(cbhm)
36 %endif
37 Requires:       %{name}-compat = %{version}-%{release}
38 # This is for old profile-based OBS project optimizations.
39 # In 4.0 unified build env, this if statement is always true.
40 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
41 Recommends:     %{name}-profile_common = %{version}-%{release}
42 %endif
43
44 %description
45 Description: Tizen keyboard
46
47
48 # This is for old profile-based OBS project optimizations.
49 # In 4.0 unified build env, this if statement is always true.
50 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
51 %package profile_common
52 Summary:    ise-default binaries and resources without flavors
53 Provides:   %{name}-compat = %{version}-%{release}
54 Conflicts:  %{name}-profile_mobile
55 Conflicts:  %{name}-profile_tv
56 Conflicts:  %{name}-profile_wearable
57 Conflicts:  %{name}-profile_ivi
58 %description profile_common
59 Tizen keyboard (ise-default) binaries and resources without flavors, intended
60 to support common profiles, which does not supply any additional options
61 for the build.
62 %endif
63
64 # This is for old profile-based OBS project optimizations.
65 # In 4.0 unified build env, this if statement is always true.
66 %if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
67 %package profile_mobile
68 Summary:    ise-default binaries and resources with mobile profile
69 Provides:   %{name}-compat = %{version}-%{release}
70 Conflicts:  %{name}-profile_common
71 Conflicts:  %{name}-profile_tv
72 Conflicts:  %{name}-profile_wearable
73 Conflicts:  %{name}-profile_ivi
74 %description profile_mobile
75 Tizen keyboard (ise-default) binaries and resources with mobile options.
76 This is intended to support mobile profiles.
77 %endif
78
79 # This is for old profile-based OBS project optimizations.
80 # In 4.0 unified build env, this if statement is always true.
81 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
82 %package profile_tv
83 Summary:    ise-default binaries and resources with tv profile
84 Provides:   %{name}-compat = %{version}-%{release}
85 Conflicts:  %{name}-profile_common
86 Conflicts:  %{name}-profile_mobile
87 Conflicts:  %{name}-profile_wearable
88 Conflicts:  %{name}-profile_ivi
89 %description profile_tv
90 Tizen keyboard (ise-default) binaries and resources with tv options.
91 This is intended to support tv profiles.
92 %endif
93
94 # This is for old profile-based OBS project optimizations.
95 # In 4.0 unified build env, this if statement is always true.
96 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv"
97 %package profile_ivi
98 Summary:    ise-default binaries and resources with ivi profile
99 Provides:   %{name}-compat = %{version}-%{release}
100 Conflicts:  %{name}-profile_common
101 Conflicts:  %{name}-profile_mobile
102 Conflicts:  %{name}-profile_wearable
103 Conflicts:  %{name}-profile_tv
104 %description profile_ivi
105 Tizen keyboard (ise-default) binaries and resources with ivi options.
106 This is intended to support ivi profiles.
107 %endif
108
109 # This is for old profile-based OBS project optimizations.
110 # In 4.0 unified build env, this if statement is always true.
111 # Common is blocked because wearable has extra efl-ext entries, which will be
112 # removed for unified build env later.
113 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
114 %package profile_wearable
115 Summary:    Meta package of ise-default for wearable profiles. (circle/rectangle)
116 Provides:   %{name}-compat = %{version}-%{release}
117 Conflicts:  %{name}-profile_common
118 Conflicts:  %{name}-profile_mobile
119 Conflicts:  %{name}-profile_tv
120 Conflicts:  %{name}-profile_ivi
121 Requires:   %{name}-profile_wearable-extension = %{version}-%{release}
122 Recommends: %{name}-profile_wearable-extension-circle = %{version}-%{release}
123 %description profile_wearable
124 Meta package of Tizen keyboard (ise-default) binaries and resources with
125 wearable options.
126
127 %package profile_wearable-extension-circle
128 Summary:    ise-default binaries and resources with wearable profile (circle)
129 Provides:   %{name}-profile_wearable-extension = %{version}-%{release}
130 Conflicts:  %{name}-profile_wearable-extension-rectangle
131 %description profile_wearable-extension-circle
132 Tizen keyboard (ise-default) binaries and resources with wearable options.
133 This is intended to support wearable profiles with circle display.
134
135 %package profile_wearable-extension-rectangle
136 Summary:    ise-default binaries and resources with wearable profile (rectangle)
137 Provides:   %{name}-profile_wearable-extension = %{version}-%{release}
138 Conflicts:  %{name}-profile_wearable-extension-circle
139 %description profile_wearable-extension-rectangle
140 Tizen keyboard (ise-default) binaries and resources with wearable options.
141 This is intended to support wearable profiles with rectangle display.
142 %endif
143
144 %prep
145 %setup -q
146
147
148 %build
149 export CFLAGS_BASE="${CFLAGS} -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
150 export CXXFLAGS_BASE="${CXXFLAGS} -DTIZEN_DEBUG_ENABLE -std=c++11 -fvisibility-inlines-hidden -fvisibility=hidden"
151 export FFLAGS+=" -DTIZEN_DEBUG_ENABLE"
152
153 rm -rf CMakeFiles
154 rm -rf CMakeCache.txt
155
156 # This is for old profile-based OBS project optimizations.
157 # In 4.0 unified build env, this if statement is always true.
158 # Common is blocked because wearable has extra efl-ext entries, which will be
159 # removed for unified build env later.
160 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
161 mkdir -p build_wearable_rec
162 pushd build_wearable_rec
163 export CFLAGS="${CFLAGS_BASE} -D_WEARABLE";
164 export CXXFLAGS="${CXXFLAGS_BASE} -D_WEARABLE";
165 %cmake .. -DTARGET=wearable \
166          -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
167          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
168
169 make %{?jobs:-j%jobs}
170 popd
171
172 mkdir -p build_wearable_cir
173 pushd build_wearable_cir
174 export CFLAGS="${CFLAGS_BASE} -D_WEARABLE -D_CIRCLE";
175 export CXXFLAGS="${CXXFLAGS_BASE} -D_WEARABLE -D_CIRCLE";
176 %cmake .. -DTARGET=wearable \
177          -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
178          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
179
180 make %{?jobs:-j%jobs}
181 popd
182 %endif
183
184
185 # This is for old profile-based OBS project optimizations.
186 # In 4.0 unified build env, this if statement is always true.
187 %if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
188 mkdir -p build_mobile
189 pushd build_mobile
190 export CFLAGS="${CFLAGS_BASE} -D_MOBILE";
191 export CXXFLAGS="${CXXFLAGS_BASE} -D_MOBILE";
192 %cmake .. -DTARGET=mobile \
193          -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
194          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
195          -Dwith_cbhm=TRUE
196
197 make %{?jobs:-j%jobs}
198 popd
199 %endif
200
201 # This is for old profile-based OBS project optimizations.
202 # In 4.0 unified build env, this if statement is always true.
203 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
204 mkdir -p build_tv
205 pushd build_tv
206 export CFLAGS="${CFLAGS_BASE} -D_TV";
207 export CXXFLAGS="${CXXFLAGS_BASE} -D_TV";
208 %cmake .. -DTARGET=tv \
209          -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
210          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
211
212 make %{?jobs:-j%jobs}
213 popd
214 %endif
215
216 # This is for old profile-based OBS project optimizations.
217 # In 4.0 unified build env, this if statement is always true.
218 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common"
219 mkdir -p build_ivi
220 pushd build_ivi
221 export CFLAGS="${CFLAGS_BASE} -D_IVI";
222 export CXXFLAGS="${CXXFLAGS_BASE} -D_IVI";
223 %cmake .. -DTARGET=ivi \
224          -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
225          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
226
227 make %{?jobs:-j%jobs}
228 popd
229 %endif
230
231 # This is for old profile-based OBS project optimizations.
232 # In 4.0 unified build env, this if statement is always true.
233 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
234 export CFLAGS="${CFLAGS_BASE}";
235 export CXXFLAGS="${CXXFLAGS_BASE}";
236 %cmake . -DTARGET=common \
237         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
238         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
239
240 make %{?jobs:-j%jobs}
241 %endif
242
243 %install
244 rm -rf %{buildroot}
245
246 # This is for old profile-based OBS project optimizations.
247 # In 4.0 unified build env, this if statement is always true.
248 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
249 %make_install
250 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/common
251 pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
252 mv bin common/
253 mkdir -p common/res
254 pushd res
255 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../common/res/; fi; done
256 popd
257 popd
258 %endif
259
260 # This is for old profile-based OBS project optimizations.
261 # In 4.0 unified build env, this if statement is always true.
262 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
263 pushd build_mobile
264 %make_install
265 popd
266 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/mobile
267 pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
268 mv bin mobile/
269 mkdir -p mobile/res
270 pushd res
271 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../mobile/res/; fi; done
272 popd
273 popd
274 %endif
275
276 # This is for old profile-based OBS project optimizations.
277 # In 4.0 unified build env, this if statement is always true.
278 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
279 pushd build_tv
280 %make_install
281 popd
282 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/tv
283 pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
284 mv bin tv/
285 mkdir -p tv/res
286 pushd res
287 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../tv/res/; fi; done
288 popd
289 popd
290 %endif
291
292 # This is for old profile-based OBS project optimizations.
293 # In 4.0 unified build env, this if statement is always true.
294 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common"
295 pushd build_ivi
296 %make_install
297 popd
298 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/ivi
299 pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
300 mv bin ivi/
301 mkdir -p ivi/res
302 pushd res
303 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../ivi/res/; fi; done
304 popd
305 popd
306 %endif
307
308 # This is for old profile-based OBS project optimizations.
309 # In 4.0 unified build env, this if statement is always true.
310 # Common is blocked because wearable has extra efl-ext entries, which will be
311 # removed for unified build env later.
312 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
313 pushd build_wearable_cir
314 %make_install
315 popd
316 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/wearable-circle
317 pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
318 mv bin wearable-circle/
319 mkdir -p wearable-circle/res
320 pushd res
321 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../wearable-circle/res/; fi; done
322 popd
323 popd
324
325 pushd build_wearable_rec
326 %make_install
327 popd
328 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/ise-default/wearable-rectangle
329 pushd %{buildroot}%{TZ_SYS_RO_APP}/ise-default/
330 mv bin wearable-rectangle/
331 mkdir -p wearable-rectangle/res
332 pushd res
333 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../wearable-rectangle/res/; fi; done
334 popd
335 popd
336 %endif
337
338 %find_lang %{name}
339
340 %files -f %{name}.lang
341 %manifest %{name}.manifest
342 %defattr(-,root,root,-)
343 %{TZ_SYS_RO_PACKAGES}/%{name}.xml
344 %license LICENSE
345
346 # This is for old profile-based OBS project optimizations.
347 # In 4.0 unified build env, this if statement is always true.
348 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
349 %post profile_common
350 pushd %{TZ_SYS_RO_APP}/ise-default/common/
351 mkdir -p ../res
352 mkdir -p ../bin
353 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
354 if [ "$1" = "2" ]; then
355     rm -Rf ../bin/*
356     pushd ../res
357     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
358     popd
359 fi
360 for FILE in bin/*; do ln -sf "../common/${FILE}" ../bin; done
361 for FILE in res/*; do ln -sf "../common/${FILE}" ../res; done
362 popd
363 %preun profile_common
364 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
365 if [ "$1" = "0" ]; then
366     pushd %{TZ_SYS_RO_APP}/ise-default
367     rm -Rf bin
368     pushd res
369     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
370     popd
371     popd
372 fi
373 %files profile_common
374 %manifest %{name}.manifest
375 %defattr(-,root,root,-)
376 %{TZ_SYS_RO_APP}/ise-default/common/*
377 %endif
378
379
380 # This is for old profile-based OBS project optimizations.
381 # In 4.0 unified build env, this if statement is always true.
382 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
383 %post profile_mobile
384 pushd %{TZ_SYS_RO_APP}/ise-default/mobile/
385 mkdir -p ../res
386 mkdir -p ../bin
387 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
388 if [ "$1" = "2" ]; then
389     rm -Rf ../bin/*
390     pushd ../res
391     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
392     popd
393 fi
394 for FILE in bin/*; do ln -sf "../mobile/${FILE}" ../bin; done
395 for FILE in res/*; do ln -sf "../mobile/${FILE}" ../res; done
396 popd
397 %preun profile_mobile
398 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
399 if [ "$1" = "0" ]; then
400     pushd %{TZ_SYS_RO_APP}/ise-default
401     rm -Rf bin
402     pushd res
403     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
404     popd
405     popd
406 fi
407 %files profile_mobile
408 %manifest %{name}.manifest
409 %defattr(-,root,root,-)
410 %{TZ_SYS_RO_APP}/ise-default/mobile/*
411 %endif
412
413
414 # This is for old profile-based OBS project optimizations.
415 # In 4.0 unified build env, this if statement is always true.
416 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
417 %post profile_tv
418 pushd %{TZ_SYS_RO_APP}/ise-default/tv/
419 mkdir -p ../res
420 mkdir -p ../bin
421 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
422 if [ "$1" = "2" ]; then
423     rm -Rf ../bin/*
424     pushd ../res
425     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
426     popd
427 fi
428 for FILE in bin/*; do ln -sf "../tv/${FILE}" ../bin; done
429 for FILE in res/*; do ln -sf "../tv/${FILE}" ../res; done
430 popd
431 %preun profile_tv
432 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
433 if [ "$1" = "0" ]; then
434     pushd %{TZ_SYS_RO_APP}/ise-default
435     rm -Rf bin
436     pushd res
437     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
438     popd
439     popd
440 fi
441 %files profile_tv
442 %manifest %{name}.manifest
443 %defattr(-,root,root,-)
444 %{TZ_SYS_RO_APP}/ise-default/tv/*
445 %endif
446
447
448 # This is for old profile-based OBS project optimizations.
449 # In 4.0 unified build env, this if statement is always true.
450 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common"
451 %post profile_ivi
452 pushd %{TZ_SYS_RO_APP}/ise-default/ivi/
453 mkdir -p ../res
454 mkdir -p ../bin
455 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
456 if [ "$1" = "2" ]; then
457     rm -Rf ../bin/*
458     pushd ../res
459     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
460     popd
461 fi
462 for FILE in bin/*; do ln -sf "../ivi/${FILE}" ../bin; done
463 for FILE in res/*; do ln -sf "../ivi/${FILE}" ../res; done
464 popd
465 %preun profile_ivi
466 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
467 if [ "$1" = "0" ]; then
468     pushd %{TZ_SYS_RO_APP}/ise-default
469     rm -Rf bin
470     pushd res
471     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
472     popd
473     popd
474 fi
475 %files profile_ivi
476 %manifest %{name}.manifest
477 %defattr(-,root,root,-)
478 %{TZ_SYS_RO_APP}/ise-default/ivi/*
479 %endif
480
481
482 # This is for old profile-based OBS project optimizations.
483 # In 4.0 unified build env, this if statement is always true.
484 # Common is blocked because wearable has extra efl-ext entries, which will be
485 # removed for unified build env later.
486 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
487 %files profile_wearable
488
489 %post profile_wearable-extension-circle
490 pushd %{TZ_SYS_RO_APP}/ise-default/wearable-circle/
491 mkdir -p ../res
492 mkdir -p ../bin
493 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
494 if [ "$1" = "2" ]; then
495     rm -Rf ../bin/*
496     pushd ../res
497     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
498     popd
499 fi
500 for FILE in bin/*; do ln -sf "../wearable-circle/${FILE}" ../bin; done
501 for FILE in res/*; do ln -sf "../wearable-circle/${FILE}" ../res; done
502 popd
503 %preun profile_wearable-extension-circle
504 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
505 if [ "$1" = "0" ]; then
506     pushd %{TZ_SYS_RO_APP}/ise-default
507     rm -Rf bin
508     pushd res
509     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
510     popd
511     popd
512 fi
513 %files profile_wearable-extension-circle
514 %manifest %{name}.manifest
515 %defattr(-,root,root,-)
516 %{TZ_SYS_RO_APP}/ise-default/wearable-circle/*
517
518
519 %post profile_wearable-extension-rectangle
520 pushd %{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/
521 mkdir -p ../res
522 mkdir -p ../bin
523 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
524 if [ "$1" = "2" ]; then
525     rm -Rf ../bin/*
526     pushd ../res
527     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
528     popd
529 fi
530 for FILE in bin/*; do ln -sf "../wearable-rectangle/${FILE}" ../bin; done
531 for FILE in res/*; do ln -sf "../wearable-rectangle/${FILE}" ../res; done
532 popd
533 %preun profile_wearable-extension-rectangle
534 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
535 if [ "$1" = "0" ]; then
536     pushd %{TZ_SYS_RO_APP}/ise-default
537     rm -Rf bin
538     pushd res
539     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
540     popd
541     popd
542 fi
543 %files profile_wearable-extension-rectangle
544 %manifest %{name}.manifest
545 %defattr(-,root,root,-)
546 %{TZ_SYS_RO_APP}/ise-default/wearable-rectangle/*
547 %endif