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