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