be73113c559e481834ffe46c9fff153acdb8e10a
[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.171031
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 BuildRequires: pkgconfig(smartreply)
45 BuildRequires: pkgconfig(capi-media-recorder)
46 BuildRequires: pkgconfig(capi-content-media-content)
47 BuildRequires: pkgconfig(storage)
48
49 %if %{enable_log_manager}
50 BuildRequires:  pkgconfig(bundle)
51 %endif
52
53 Requires:       %{name}-compat = %{version}-%{release}
54 # This is for old profile-based OBS project optimizations.
55 # In 4.0 unified build env, this if statement is always true.
56 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
57 Recommends:     %{name}-profile_common = %{version}-%{release}
58 %endif
59
60 %description
61 Input Delegator Application for Wearable environment
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}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
66 %package profile_common
67 Summary:    Inputdelegator binaries and resources without flavors
68 Provides:   %{name}-compat = %{version}-%{release}
69 Conflicts:  %{name}-profile_mobile
70 Conflicts:  %{name}-profile_tv
71 Conflicts:  %{name}-profile_wearable
72 Conflicts:  %{name}-profile_ivi
73 %description profile_common
74 Inputdelegator binaries and resources without flavors, intended
75 to support common profiles, which does not supply any additional options
76 for the build.
77 %endif
78
79 # This is for old profile-based OBS project optimizations.
80 # In 4.0 unified build env, this if statement is always true.
81 %if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
82 %package profile_mobile
83 Summary:    Inputdelegator binaries and resources with mobile profile
84 Provides:   %{name}-compat = %{version}-%{release}
85 Conflicts:  %{name}-profile_common
86 Conflicts:  %{name}-profile_tv
87 Conflicts:  %{name}-profile_wearable
88 Conflicts:  %{name}-profile_ivi
89 %description profile_mobile
90 Inputdelegator binaries and resources with mobile options.
91 This is intended to support mobile profiles.
92 %endif
93
94 # This is for old profile-based OBS project optimizations.
95 # In 4.0 unified build env, this if statement is always true.
96 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi"
97 %package profile_tv
98 Summary:    Inputdelegator binaries and resources with tv profile
99 Provides:   %{name}-compat = %{version}-%{release}
100 Conflicts:  %{name}-profile_common
101 Conflicts:  %{name}-profile_mobile
102 Conflicts:  %{name}-profile_wearable
103 Conflicts:  %{name}-profile_ivi
104 %description profile_tv
105 Inputdelegator binaries and resources with tv options.
106 This is intended to support tv profiles.
107 %endif
108
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 Inputdelegator for wearable profiles.
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 %description profile_wearable
123 Meta package of Inputdelegator binaries and resources with
124 wearable options.
125 %endif
126
127 %prep
128 %setup -q
129
130 %build
131 export CFLAGS_BASE="${CFLGAS} -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
132 export CXXFLAGS_BASE="${CXXFLAGS} -DTIZEN_DEBUG_ENABLE -std=c++11 -fvisibility-inlines-hidden"
133 export FFLAGS+=" -DTIZEN_DEBUG_ENABLE"
134
135 rm -rf CMakeFiles
136 rm -rf CMakeCache.txt
137
138 # This is for old profile-based OBS project optimizations.
139 # In 4.0 unified build env, this if statement is always true.
140 # Common is blocked because wearable has extra efl-ext entries, which will be
141 # removed for unified build env later.
142 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
143 mkdir -p build_wearable
144 pushd build_wearable
145 export CFLAGS="${CFLAGS_BASE} -D_WEARABLE -D_CIRCLE";
146 export CXXFLAGS="${CXXFLAGS_BASE} -D_WEARABLE -D_CIRCLE";
147 %cmake .. -DTARGET=wearable \
148          -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
149          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
150
151 make %{?jobs:-j%jobs}
152 popd
153 %endif
154
155
156 # This is for old profile-based OBS project optimizations.
157 # In 4.0 unified build env, this if statement is always true.
158 %if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
159 mkdir -p build_mobile
160 pushd build_mobile
161 export CFLAGS="${CFLAGS_BASE} -D_MOBILE";
162 export CXXFLAGS="${CXXFLAGS_BASE} -D_MOBILE";
163 %cmake .. -DTARGET=mobile \
164          -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
165          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
166          -Dwith_cbhm=TRUE
167
168 make %{?jobs:-j%jobs}
169 popd
170 %endif
171
172 # This is for old profile-based OBS project optimizations.
173 # In 4.0 unified build env, this if statement is always true.
174 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
175 mkdir -p build_tv
176 pushd build_tv
177 export CFLAGS="${CFLAGS_BASE} -D_TV";
178 export CXXFLAGS="${CXXFLAGS_BASE} -D_TV";
179 %cmake .. -DTARGET=tv \
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}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
191 export CFLAGS="${CFLAGS_BASE}";
192 export CXXFLAGS="${CXXFLAGS_BASE}";
193 %cmake . -DTARGET=common \
194         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
195         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
196
197 make %{?jobs:-j%jobs}
198 %endif
199
200 %install
201 rm -rf %{buildroot}
202
203
204
205
206 # This is for old profile-based OBS project optimizations.
207 # In 4.0 unified build env, this if statement is always true.
208 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
209 %make_install
210 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/common
211 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/
212 mv bin common/
213 mkdir -p common/res
214 pushd res
215 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../common/res/; fi; done
216 popd
217 popd
218 %endif
219
220 # This is for old profile-based OBS project optimizations.
221 # In 4.0 unified build env, this if statement is always true.
222 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
223 pushd build_mobile
224 %make_install
225 popd
226 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/mobile
227 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/
228 mv bin mobile/
229 mkdir -p mobile/res
230 pushd res
231 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../mobile/res/; fi; done
232 popd
233 popd
234 %endif
235
236 # This is for old profile-based OBS project optimizations.
237 # In 4.0 unified build env, this if statement is always true.
238 %if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
239 pushd build_tv
240 %make_install
241 popd
242 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/tv
243 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/
244 mv bin tv/
245 mkdir -p tv/res
246 pushd res
247 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../tv/res/; fi; done
248 popd
249 popd
250 %endif
251
252
253 # This is for old profile-based OBS project optimizations.
254 # In 4.0 unified build env, this if statement is always true.
255 # Common is blocked because wearable has extra efl-ext entries, which will be
256 # removed for unified build env later.
257 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
258 pushd build_wearable
259 %make_install
260 popd
261 mkdir -p %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/wearable
262 pushd %{buildroot}%{TZ_SYS_RO_APP}/org.tizen.inputdelegator/
263 mv bin wearable/
264 mkdir -p wearable/res
265 pushd res
266 for FILE in *; do if [[ $FILE =~ ^locale$ ]]; then echo skip commonly used "${FILE}"; else mv "${FILE}" ../wearable/res/; fi; done
267 popd
268 popd
269 %endif
270
271 %find_lang inputdelegator
272
273 %files -f inputdelegator.lang
274 %manifest %{name}.manifest
275 %defattr(-,root,root,-)
276 %{TZ_SYS_RO_PACKAGES}/%{name}.xml
277 %license LICENSE
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}" != "tv" && "%{?profile}" != "ivi"
282 %post profile_common
283 pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/common/
284 mkdir -p ../res
285 mkdir -p ../bin
286 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
287 if [ "$1" = "2" ]; then
288     rm -Rf ../bin/*
289     pushd ../res
290     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
291     popd
292 fi
293 for FILE in bin/*; do ln -sf "../common/${FILE}" ../bin; done
294 for FILE in res/*; do ln -sf "../common/${FILE}" ../res; done
295 popd
296 %preun profile_common
297 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
298 if [ "$1" = "0" ]; then
299     pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator
300     rm -Rf bin
301     pushd res
302     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
303     popd
304     popd
305 fi
306 %files profile_common
307 %manifest %{name}.manifest
308 %defattr(-,root,root,-)
309 %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/common/*
310 %endif
311
312
313 # This is for old profile-based OBS project optimizations.
314 # In 4.0 unified build env, this if statement is always true.
315 %if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
316 %post profile_mobile
317 pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/mobile/
318 mkdir -p ../res
319 mkdir -p ../bin
320 # If we are upgrading this package, remove existing files before copying (1:install / 2:upgrade)
321 if [ "$1" = "2" ]; then
322     rm -Rf ../bin/*
323     pushd ../res
324     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
325     popd
326 fi
327 for FILE in bin/*; do ln -sf "../mobile/${FILE}" ../bin; done
328 for FILE in res/*; do ln -sf "../mobile/${FILE}" ../res; done
329 popd
330 %preun profile_mobile
331 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
332 if [ "$1" = "0" ]; then
333     pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator
334     rm -Rf bin
335     pushd res
336     for FILE in *; do if [[ $FILE =~ locale$ ]]; then echo skip "${FILE}"; else rm -Rf "${FILE}"; fi; done
337     popd
338     popd
339 fi
340 %files profile_mobile
341 %manifest %{name}.manifest
342 %defattr(-,root,root,-)
343 %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/mobile/*
344 %endif
345
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}" != "ivi" && "%{?profile}" != "common"
350 %post profile_tv
351 pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/tv/
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 "../tv/${FILE}" ../bin; done
362 for FILE in res/*; do ln -sf "../tv/${FILE}" ../res; done
363 popd
364 %preun profile_tv
365 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
366 if [ "$1" = "0" ]; then
367     pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator
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_tv
375 %manifest %{name}.manifest
376 %defattr(-,root,root,-)
377 %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/tv/*
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 # Common is blocked because wearable has extra efl-ext entries, which will be
384 # removed for unified build env later.
385 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "ivi"
386 %post profile_wearable
387 pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/wearable/
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 "../wearable/${FILE}" ../bin; done
398 for FILE in res/*; do ln -sf "../wearable/${FILE}" ../res; done
399 popd
400 %preun profile_wearable
401 # Perform file removal only when uninstalling (0:uninstall / 1:upgrade)
402 if [ "$1" = "0" ]; then
403     pushd %{TZ_SYS_RO_APP}/org.tizen.inputdelegator
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_wearable
411 %manifest %{name}.manifest
412 %defattr(-,root,root,-)
413 %{TZ_SYS_RO_APP}/org.tizen.inputdelegator/wearable/*
414 %endif