Use cmake macro in spec file
[platform/core/uifw/ise-default.git] / packaging / ise-default.spec
1 %if "%{profile}" == "mobile"
2 %define WITH_CBHM TRUE
3 %else
4 %define WITH_CBHM FALSE
5 %endif
6
7 Name:       ise-default
8 Summary:    Tizen keyboard
9 Version:    1.3.32
10 Release:    1
11 Group:      Graphics & UI Framework/Input
12 License:    Apache-2.0
13 Source0:    ise-default-%{version}.tar.gz
14 BuildRequires:  gettext-tools
15 BuildRequires:  edje-bin
16 BuildRequires:  cmake
17 BuildRequires:  pkgconfig(elementary)
18 BuildRequires:  pkgconfig(vconf)
19 BuildRequires:  pkgconfig(dlog)
20 BuildRequires:  pkgconfig(libscl-ui)
21 BuildRequires:  pkgconfig(ecore-imf)
22 BuildRequires:  pkgconfig(libxml-2.0)
23 BuildRequires:  pkgconfig(efl-extension)
24 BuildRequires:  pkgconfig(libtzplatform-config)
25 BuildRequires:  pkgconfig(stt)
26 BuildRequires:  pkgconfig(capi-appfw-application)
27 BuildRequires:  pkgconfig(capi-media-audio-io)
28 BuildRequires:  pkgconfig(capi-ui-inputmethod)
29 %if "%{WITH_CBHM}" == "TRUE"
30 BuildRequires:  pkgconfig(cbhm)
31 %endif
32 BuildRequires:  model-build-features
33
34
35 %description
36 Description: Tizen keyboard
37
38
39
40 %prep
41 %setup -q
42
43
44 %build
45 export CFLAGS+=" -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
46 export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE -std=c++11 -fvisibility=hidden -fvisibility-inlines-hidden"
47 export FFLAGS+=" -DTIZEN_DEBUG_ENABLE"
48
49 %if "%{profile}" == "wearable"
50 CFLAGS+=" -D_WEARABLE";
51 CXXFLAGS+=" -D_WEARABLE";
52 %if "%{model_build_feature_formfactor}" == "circle"
53 CFLAGS+=" -D_CIRCLE";
54 CXXFLAGS+=" -D_CIRCLE";
55 %endif
56 %endif
57
58 %if "%{profile}" == "mobile"
59 CFLAGS+=" -D_MOBILE";
60 CXXFLAGS+=" -D_MOBILE";
61 %endif
62
63 %if "%{profile}" == "tv"
64 CFLAGS+=" -D_TV";
65 CXXFLAGS+=" -D_TV";
66 %endif
67
68 %if "%{profile}" == "ivi"
69 CFLAGS+=" -D_IVI";
70 CXXFLAGS+=" -D_IVI";
71 %endif
72
73 rm -rf CMakeFiles
74 rm -rf CMakeCache.txt
75 %cmake . -DTARGET=%{?profile} \
76         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
77         -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
78         -Dwith_cbhm=%{WITH_CBHM}
79
80 make %{?jobs:-j%jobs}
81
82 %install
83 rm -rf %{buildroot}
84
85 %make_install
86 %find_lang %{name}
87
88 %files -f %{name}.lang
89 %manifest %{name}.manifest
90 %defattr(-,root,root,-)
91 %{TZ_SYS_RO_APP}/*
92 %{TZ_SYS_RO_PACKAGES}/%{name}.xml
93 %license LICENSE
94