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