a706ab38e2d86366b0d8c6f0e9db4cf7539debc9
[platform/core/uifw/inputmethod-setting.git] / packaging / org.tizen.inputmethod-setting.spec
1 Name:       org.tizen.inputmethod-setting
2 Summary:    Input Method Setting Application
3 Version:    0.7.2
4 Release:    1
5 Group:      Graphics & UI Framework/Input
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8
9 BuildRequires:  gettext-tools
10 BuildRequires:  edje-bin
11 BuildRequires:  cmake
12 BuildRequires:  pkgconfig(capi-appfw-application)
13 BuildRequires:  pkgconfig(isf)
14 BuildRequires:  pkgconfig(elementary)
15 BuildRequires:  pkgconfig(dlog)
16 BuildRequires:  pkgconfig(efl-extension)
17 BuildRequires:  pkgconfig(libtzplatform-config)
18 BuildRequires:  pkgconfig(capi-ui-inputmethod-manager)
19 BuildRequires:  pkgconfig(capi-appfw-package-manager)
20 BuildRequires:  pkgconfig(vconf)
21 Requires:       %{name}-compat = %{version}-%{release}
22 # This if/endif is for GBM build optimization. This usage does not affect
23 # The unified build (profile is undefined) as it will return TRUE always.
24 %if "%{?profile}"!="mobile" && "%{?profile}"!="wearable"
25 Recommends:     %{name}-profile_common = %{version}-%{release}
26 %endif
27
28 %description
29 Setting Application for ISF.
30 This requires profile specific extensions. (e.g., %{name}-profile_common)
31
32 # This if/endif is for GBM build optimization. This usage does not affect
33 # The unified build (profile is undefined) as it will return TRUE always.
34 %if "%{?profile}"!="mobile" && "%{?profile}"!="wearable"
35 %package profile_common
36 Summary:    Input Method Setting Application Vannila Binaries (common/ivi/tv)
37 Provides:   %{name}-compat = %{version}-%{release}
38 Conflicts:  %{name}-profile_wearable
39 Conflicts:  %{name}-profile_mobile
40 %description profile_common
41 Setting Application for ISF, Vanilla Edition for common/ivi/tv profiles.
42 %endif
43
44 # This if/endif is for GBM build optimization. This usage does not affect
45 # The unified build (profile is undefined) as it will return TRUE always.
46 %if "%{?profile}"!="tv" && "%{?profile}"!="wearable"
47 %package profile_mobile
48 Summary:    Input Method Setting Application Binaries for Mobile Profile
49 Provides:   %{name}-compat = %{version}-%{release}
50 Conflicts:  %{name}-profile_wearable
51 Conflicts:  %{name}-profile_common
52 %description profile_mobile
53 Setting Application for ISF, Mobile Profile Edition.
54 Binaries in this package is compiled with "mobile" options.
55 %endif
56
57 # This if/endif is for GBM build optimization. This usage does not affect
58 # The unified build (profile is undefined) as it will return TRUE always.
59 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile"
60 %package profile_wearable
61 Summary:    Input Method Setting Application Metapackage for Wearable
62 Provides:   %{name}-compat = %{version}-%{release}
63 Requires:   %{name}-profile_wearable-extension = %{version}-%{release}
64 Recommends: %{name}-profile_wearable-extension-circle = %{version}-%{release}
65 Conflicts:  %{name}-profile_common
66 Conflicts:  %{name}-profile_mobile
67 %description profile_wearable
68 Meta package to anchor circle display version and rectangle display version of
69 Setting APplication for ISF, Wearable Profile Edition.
70
71 # Because circle breaks CAPI compatibility, it should be built for
72 # wearable and "unified (undefined)"
73 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile" && "%{?profile}"!="ivi" && "%{?profile}"!="common"
74 %package profile_wearable-extension-circle
75 Summary:    Input Method Setting Application for Wearable (Circle)
76 Provides:   %{name}-profile_wearable-extension = %{version}-%{release}
77 Conflicts:  %{name}-profile_wearable-extension-rectangle
78 %description profile_wearable-extension-circle
79 Setting Application for ISF, Wearable Profile Edition with Circle Display
80 Binaries in this package is compiled with "wearable" and "circle" options.
81 %endif
82
83 %package profile_wearable-extension-rectangle
84 Summary:    Input Method Setting Application for Wearable (Rectangle)
85 Provides:   %{name}-profile_wearable-extension = %{version}-%{release}
86 Conflicts:  %{name}-profile_wearable-extension-circle
87 %description profile_wearable-extension-rectangle
88 Setting Application for ISF, Wearable Profile Edition with Rectangle Display
89 Binaries in this package is compiled with "wearable" and "rectangle" options.
90 %endif
91
92 %prep
93 %setup -q -n %{name}-%{version}
94
95 %build
96 export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE -DTIZEN_DEBUG_ENABLE -fvisibility=hidden -Werror"
97 export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE -DTIZEN_DEBUG_ENABLE -fvisibility=hidden -fvisibility-inlines-hidden -Werror"
98 export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE -DTIZEN_DEBUG_ENABLE"
99
100 export CFLAGSBASE="$CFLAGS"
101 export CXXFLAGSBASE="$CXXFLAGS"
102
103 rm -rf CMakeFiles
104 rm -rf CMakeCache.txt
105
106 # This if/endif is for GBM build optimization. This usage does not affect
107 # The unified build (profile is undefined) as it will return TRUE always.
108 %if "%{?profile}"!="tv" && "%{?profile}"!="wearable"
109 mkdir -p build_mobile
110 CFLAGS="$CFLAGSBASE -D_MOBILE"
111 CXXFLAGS="$CXXFLAGSBASE -D_MOBILE"
112
113 pushd build_mobile
114 %cmake .. -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
115          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
116          -DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
117 make %{?jobs:-j%jobs}
118 popd
119 %endif
120
121 # This if/endif is for GBM build optimization. This usage does not affect
122 # The unified build (profile is undefined) as it will return TRUE always.
123 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile"
124 mkdir -p build_wearable_rectangle
125
126 CFLAGS="$CFLAGSBASE -D_WEARABLE"
127 CXXFLAGS="$CXXFLAGSBASE -D_WEARABLE"
128 pushd build_wearable_rectangle
129 %cmake .. -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
130          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
131          -DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
132 make %{?jobs:-j%jobs}
133 popd
134
135 # Because circle breaks CAPI compatibility, it should be built for
136 # wearable and "unified (undefined)"
137 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile" && "%{?profile}"!="ivi" && "%{?profile}"!="common"
138 mkdir -p build_wearable_circle
139 CFLAGS="$CFLAGSBASE -D_WEARABLE -D_CIRCLE"
140 CXXFLAGS="$CXXFLAGSBASE -D_WEARABLE -D_CIRCLE"
141 pushd build_wearable_circle
142 %cmake .. -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
143          -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
144          -DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
145 make %{?jobs:-j%jobs}
146 popd
147 %endif
148 %endif
149
150 # This if/endif is for GBM build optimization. This usage does not affect
151 # The unified build (profile is undefined) as it will return TRUE always.
152 %if "%{?profile}"!="mobile" && "%{?profile}"!="wearable"
153 CFLAGS="$CFLAGSBASE"
154 CXXFLAGS="$CXXFLAGSBASE"
155 %cmake . -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
156         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
157         -DTZ_SYS_RO_ICONS=%TZ_SYS_RO_ICONS
158 make %{?jobs:-j%jobs}
159 %endif
160
161 %install
162 rm -rf %{buildroot}
163
164 # This if/endif is for GBM build optimization. This usage does not affect
165 # The unified build (profile is undefined) as it will return TRUE always.
166 %if "%{?profile}"!="tv" && "%{?profile}"!="wearable"
167 pushd build_mobile
168 %make_install
169 popd
170 mv %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-list \
171    %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-list.mobile
172 mv %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector \
173    %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector.mobile
174 %endif
175
176 # This if/endif is for GBM build optimization. This usage does not affect
177 # The unified build (profile is undefined) as it will return TRUE always.
178 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile"
179 pushd build_wearable_rectangle
180 %make_install
181 popd
182 mv %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-list \
183    %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-list.wearable.rectangle
184 mv %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector \
185    %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector.wearable.rectangle
186 # Because circle breaks CAPI compatibility, it should be built for
187 # wearable and "unified (undefined)"
188 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile" && "%{?profile}"!="ivi" && "%{?profile}"!="common"
189 pushd build_wearable_circle
190 %make_install
191 popd
192 mv %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-list \
193    %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-list.wearable.circle
194 mv %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector \
195    %{buildroot}%{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector.wearable.circle
196 %endif
197 %endif
198
199 # This if/endif is for GBM build optimization. This usage does not affect
200 # The unified build (profile is undefined) as it will return TRUE always.
201 %if "%{?profile}"!="mobile" && "%{?profile}"!="wearable"
202 %make_install
203 %endif
204 %find_lang inputmethod-setting
205
206 %files -f inputmethod-setting.lang
207 %manifest %{name}.manifest
208 %defattr(-,root,root,-)
209 %{TZ_SYS_RO_ICONS}/default/small/*
210 %{TZ_SYS_RO_APP}/%{name}/res/*
211 %{TZ_SYS_RO_PACKAGES}/%{name}.xml
212 %license LICENSE
213
214 # This if/endif is for GBM build optimization. This usage does not affect
215 # The unified build (profile is undefined) as it will return TRUE always.
216 %if "%{?profile}"!="mobile" && "%{?profile}"!="wearable"
217 %files profile_common
218 %manifest %{name}.manifest
219 %exclude %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-*.mobile
220 %exclude %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-*.wearable.*
221 %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-*
222 %endif
223
224 # This if/endif is for GBM build optimization. This usage does not affect
225 # The unified build (profile is undefined) as it will return TRUE always.
226 %if "%{?profile}"!="tv" && "%{?profile}"!="wearable"
227 %post profile_mobile
228 pushd %{TZ_SYS_RO_APP}/%{name}/bin/
229 for file in inputmethod-setting-*.mobile; do ln -sf "${file}" "${file%.mobile}"; done
230 popd
231 %preun profile_mobile
232 rm %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-settings-list
233 rm %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector
234 %files profile_mobile
235 %manifest %{name}.manifest
236 %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-*.mobile
237 %endif
238
239 # This if/endif is for GBM build optimization. This usage does not affect
240 # The unified build (profile is undefined) as it will return TRUE always.
241 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile"
242 %files profile_wearable
243
244 # Because circle breaks CAPI compatibility, it should be built for
245 # wearable and "unified (undefined)"
246 %if "%{?profile}"!="tv" && "%{?profile}"!="mobile" && "%{?profile}"!="ivi" && "%{?profile}"!="common"
247 %post profile_wearable-extension-circle
248 pushd %{TZ_SYS_RO_APP}/%{name}/bin/
249 for file in inputmethod-setting-*.wearable.circle; do ln -sf "${file}" "${file%.wearable.circle}"; done
250 popd
251 %preun profile_wearable-extension-circle
252 rm %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-settings-list
253 rm %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector
254 %files profile_wearable-extension-circle
255 %manifest %{name}.manifest
256 %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-*.wearable.circle
257 %endif
258
259 %post profile_wearable-extension-rectangle
260 pushd %{TZ_SYS_RO_APP}/%{name}/bin/
261 for file in inputmethod-setting-*.wearable.rectangle; do ln -sf "${file}" "${file%.wearable.rectangle}"; done
262 popd
263 %preun profile_wearable-extension-rectangle
264 rm %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-settings-list
265 rm %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-selector
266 %files profile_wearable-extension-rectangle
267 %manifest %{name}.manifest
268 %{TZ_SYS_RO_APP}/%{name}/bin/inputmethod-setting-*.wearable.rectangle
269 %endif