Enable to build wayland text input module
[platform/core/uifw/isf.git] / packaging / isf.spec
1 %bcond_with wayland
2 Name:       isf
3 Summary:    Input Service Framework
4 Version:    3.0.63
5 Release:    1
6 Group:      Graphics & UI Framework/Input
7 License:    LGPL-2.1+
8 Source0:    %{name}-%{version}.tar.gz
9 BuildRequires:  edje-bin
10 BuildRequires:  gettext-tools
11 BuildRequires:  pkgconfig(appcore-efl)
12 BuildRequires:  pkgconfig(elementary)
13 BuildRequires:  pkgconfig(vconf)
14 %if %{with wayland}
15 BuildRequires:  pkgconfig(ecore-wayland)
16 BuildRequires:  pkgconfig(xkbcommon) >= 0.3.0
17 BuildRequires:  pkgconfig(text-client)
18 BuildRequires:  pkgconfig(input-method-client)
19 %else
20 BuildRequires:  pkgconfig(ecore-x)
21 BuildRequires:  pkgconfig(x11)
22 BuildRequires:  pkgconfig(tts)
23 %endif
24 BuildRequires:  pkgconfig(ecore)
25 BuildRequires:  pkgconfig(evas)
26 BuildRequires:  pkgconfig(edje)
27 %if "%{?profile}" == "mobile"
28 BuildRequires:  pkgconfig(notification)
29 %endif
30 BuildRequires:  pkgconfig(dlog)
31 BuildRequires:  pkgconfig(edbus)
32 BuildRequires:  pkgconfig(capi-network-bluetooth)
33 BuildRequires:  pkgconfig(feedback)
34 BuildRequires:  efl-extension-devel
35 BuildRequires:  pkgconfig(libtzplatform-config)
36 BuildRequires:  pkgconfig(pkgmgr-info)
37 BuildRequires:  pkgconfig(db-util)
38 BuildRequires:  pkgconfig(capi-appfw-app-control)
39 BuildRequires:  pkgconfig(capi-appfw-application)
40 BuildRequires:  pkgconfig(cynara-client)
41 BuildRequires:  pkgconfig(cynara-creds-socket)
42 BuildRequires:  pkgconfig(cynara-session)
43 BuildRequires:  capi-appfw-package-manager-devel
44 Requires(postun): /sbin/ldconfig
45 %if %{without wayland}
46 Requires: org.tizen.isf-kbd-mode-changer
47 %endif
48
49 %define _optexecdir /opt/usr/devel/usr/bin/
50 %define APP_PREFIX %{TZ_SYS_RO_APP}/org.tizen.isf-kbd-mode-changer/bin/
51
52 %description
53 Input Service Framewok (ISF) is an input method (IM) platform, and it has been derived from SCIM.
54
55
56 %package devel
57 Summary:    ISF header files
58 Requires:   %{name} = %{version}-%{release}
59
60 %description devel
61 This package contains ISF header files for ISE development.
62
63 %package -n org.tizen.isf-kbd-mode-changer
64 Summary: isf-kbd-mode-changer
65 Group: Application
66 Requires: %{name} = %{version}-%{release}
67
68 %description -n org.tizen.isf-kbd-mode-changer
69 isf-kbd-mode-changer
70
71 %prep
72 %setup -q
73
74 %build
75 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
76 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
77 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
78
79 %if "%{profile}" == "wearable"
80 CFLAGS+=" -D_WEARABLE";
81 CXXFLAGS+=" -D_WEARABLE";
82 %endif
83
84 %if "%{profile}" == "mobile"
85 CFLAGS+=" -D_MOBILE";
86 CXXFLAGS+=" -D_MOBILE";
87 %endif
88
89 %if "%{profile}" == "tv"
90 CFLAGS+=" -D_TV";
91 CXXFLAGS+=" -D_TV";
92 %endif
93
94 %if %{with wayland}
95 CFLAGS+=" -DWAYLAND"
96 CXXFLAGS+=" -DWAYLAND"
97 %endif
98
99 export GC_SECTIONS_FLAGS="-fdata-sections -ffunction-sections -Wl,--gc-sections"
100
101 CFLAGS+=" -fvisibility=hidden ${GC_SECTIONS_FLAGS} -flto "; export CFLAGS
102
103 CXXFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden ${GC_SECTIONS_FLAGS} -flto ";export CXXFLAGS
104
105 %autogen
106 %configure --disable-static \
107                 --disable-tray-icon \
108                 --disable-filter-sctc \
109 %if %{with wayland}
110         --disable-efl-immodule \
111 %endif
112                 --disable-frontend-x11 \
113                 --disable-multiwindow-support \
114                 --disable-ime-embed-app \
115                 --with-ro-app-dir=%{TZ_SYS_RO_APP} \
116                 --with-ro-packages-dir=%{TZ_SYS_RO_PACKAGES}
117 make %{?_smp_mflags}
118
119 %install
120 rm -rf %{buildroot}
121
122 %make_install
123 mkdir -p %{buildroot}/%{TZ_SYS_ETC}/dump.d/module.d
124 cp -af ism/dump/isf_log_dump.sh %{buildroot}/%{TZ_SYS_ETC}/dump.d/module.d
125 mkdir -p %{buildroot}/etc/scim/conf
126 %find_lang scim
127
128 cat scim.lang > isf.lang
129 %post
130 %if "%{?tizen_profile_name}" == "mobile"
131 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
132 ln -sf %{_prefix}/lib/systemd/user/scim.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
133 %endif
134 ln -sf %{_libdir}/ecore_imf/modules/wayland/v-1.16/module.so %{_libdir}/ecore_imf/modules/wayland/v-1.16/libwltextinputmodule.so
135 /sbin/ldconfig
136
137
138 %postun -p /sbin/ldconfig
139
140
141 %files -f isf.lang
142 %manifest %{name}.manifest
143 %defattr(-,root,root,-)
144 %dir /etc/scim/conf
145 %{_prefix}/lib/systemd/user/default.target.wants/scim.path
146 %{_prefix}/lib/systemd/user/scim.service
147 %{_prefix}/lib/systemd/user/scim.path
148 %attr(755,root,root) %{_sysconfdir}/profile.d/isf.sh
149 %{_sysconfdir}/scim/global
150 %{_sysconfdir}/scim/config
151 %{_datadir}/scim/isf_candidate_theme1.edj
152 %{_datadir}/scim/icons/*
153 %{_optexecdir}/isf-demo-efl
154 %{_bindir}/isf-panel-efl
155 %{_libdir}/ecore_imf/modules/*/*/*.so
156 %{_bindir}/scim
157 %{_bindir}/isf-log
158 %{_libdir}/scim-1.0/1.4.0/IMEngine/socket.so
159 %{_libdir}/scim-1.0/1.4.0/PanelAgent/*.so
160 %{_libdir}/scim-1.0/1.4.0/Config/simple.so
161 %{_libdir}/scim-1.0/1.4.0/Config/socket.so
162 %{_libdir}/scim-1.0/1.4.0/FrontEnd/*.so
163 %{_libdir}/scim-1.0/scim-launcher
164 %{_libdir}/scim-1.0/scim-helper-launcher
165 %{_libdir}/libscim-*.so*
166 %license COPYING
167 %{TZ_SYS_ETC}/dump.d/module.d/*
168
169 %files devel
170 %defattr(-,root,root,-)
171 %{_includedir}/scim-1.0/*
172 %{_libdir}/libscim-*.so
173 %{_libdir}/pkgconfig/isf.pc
174 %{_libdir}/pkgconfig/scim.pc
175
176 %post -n org.tizen.isf-kbd-mode-changer
177 mkdir -p %{TZ_SYS_RO_APP}/org.tizen.isf-kbd-mode-changer
178
179 %files -n org.tizen.isf-kbd-mode-changer
180 %manifest org.tizen.isf-kbd-mode-changer.manifest
181 %{TZ_SYS_RO_PACKAGES}/org.tizen.isf-kbd-mode-changer.xml
182 %{APP_PREFIX}/*