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