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