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