]>
Commit | Line | Data |
---|---|---|
21186c56 | 1 | # TODO |
36809d14 | 2 | # - clean .py in %{_datadir}/{setup,ui/gtk} if possible |
4fa02aee JR |
3 | # |
4 | # Conditional build: | |
36809d14 | 5 | %bcond_without static_libs # don't build static library |
7a4da488 | 6 | %bcond_without vala # Vala API |
36809d14 | 7 | # |
4fa02aee | 8 | Summary: Intelligent Input Bus for Linux OS |
36809d14 | 9 | Summary(pl.UTF-8): IBus - inteligentna szyna wejściowa dla Linuksa |
4fa02aee | 10 | Name: ibus |
83223d05 | 11 | Version: 1.4.99.20121109 |
cd6f418f | 12 | Release: 1 |
4fa02aee JR |
13 | License: LGPL v2+ |
14 | Group: Libraries | |
36809d14 | 15 | #Source0Download: http://code.google.com/p/ibus/downloads/list |
4fa02aee | 16 | Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz |
83223d05 | 17 | # Source0-md5: be482479357210283e91a47f43a0a0fe |
4fa02aee | 18 | Source1: %{name}.xinputd |
83223d05 JB |
19 | Patch0: %{name}-810211-no-switch-by-no-trigger.patch |
20 | Patch1: %{name}-541492-xkb.patch | |
21 | Patch2: %{name}-530711-preload-sys.patch | |
22 | Patch3: %{name}-xx-setup-frequent-lang.patch | |
23 | Patch4: %{name}-xx-no-use.diff | |
36809d14 JB |
24 | URL: http://code.google.com/p/ibus/ |
25 | BuildRequires: GConf2-devel >= 2.12 | |
7a4da488 | 26 | BuildRequires: atk-devel |
36809d14 JB |
27 | BuildRequires: autoconf >= 2.62 |
28 | BuildRequires: automake >= 1:1.10 | |
7a4da488 JB |
29 | BuildRequires: dconf-devel >= 0.7.5 |
30 | BuildRequires: dbus-devel | |
0636090c | 31 | BuildRequires: dbus-glib-devel |
4fa02aee JR |
32 | BuildRequires: desktop-file-utils |
33 | BuildRequires: gettext-devel | |
36809d14 JB |
34 | BuildRequires: glib2-devel >= 1:2.26.0 |
35 | BuildRequires: gobject-introspection-devel >= 0.6.8 | |
36 | BuildRequires: gtk+2-devel >= 2.0 | |
37 | BuildRequires: gtk+3-devel >= 3.0 | |
38 | BuildRequires: gtk-doc >= 1.9 | |
39 | BuildRequires: intltool >= 0.35.0 | |
4fa02aee JR |
40 | BuildRequires: iso-codes |
41 | BuildRequires: libtool | |
0636090c | 42 | BuildRequires: libgnomekbd-devel |
7a4da488 | 43 | BuildRequires: pkgconfig |
36809d14 | 44 | BuildRequires: python >= 1:2.5 |
4fa02aee JR |
45 | BuildRequires: python-dbus-devel >= 0.83.0 |
46 | BuildRequires: python-pygobject-devel | |
21186c56 ER |
47 | BuildRequires: rpm-pythonprov |
48 | BuildRequires: rpmbuild(macros) >= 1.596 | |
7a4da488 | 49 | %{?with_vala:BuildRequires: vala >= 2:0.14} |
36809d14 | 50 | BuildRequires: xorg-lib-libX11-devel |
4fa02aee | 51 | BuildRequires: xorg-lib-libxkbfile-devel |
4fa02aee | 52 | Requires: %{name}-libs = %{version}-%{release} |
36809d14 JB |
53 | Requires: GConf2 >= 2.12 |
54 | Requires: dbus >= 1.2.4 | |
21186c56 ER |
55 | Requires: gtk-update-icon-cache |
56 | Requires: hicolor-icon-theme | |
4fa02aee JR |
57 | Requires: im-chooser |
58 | Requires: iso-codes | |
36809d14 | 59 | Requires: python-ibus = %{version}-%{release} |
4fa02aee JR |
60 | Requires: python-pygtk-gtk |
61 | Requires: python-pynotify | |
2c8496b3 JR |
62 | # input-keyboard-symbolic icon |
63 | Suggests: gnome-icon-theme-symbolic | |
36809d14 | 64 | Requires(post,preun): GConf2 |
4fa02aee JR |
65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
66 | ||
43b3a3b6 JR |
67 | %define _libexecdir %{_libdir}/ibus |
68 | ||
4fa02aee JR |
69 | %description |
70 | IBus means Intelligent Input Bus. It is an input framework for Linux | |
71 | OS. | |
72 | ||
36809d14 JB |
73 | %description -l pl.UTF-8 |
74 | IBus (Intelligent Input Bus) to inteligentna szyna wejściowa. Jest to | |
75 | szkielet wprowadzania tekstu dla Linuksa. | |
76 | ||
4fa02aee | 77 | %package libs |
36809d14 JB |
78 | Summary: IBus library |
79 | Summary(pl.UTF-8): Biblioteka IBus | |
4fa02aee | 80 | Group: Libraries |
4fa02aee JR |
81 | Requires: glib2 >= 1:2.26.0 |
82 | ||
83 | %description libs | |
36809d14 JB |
84 | This package contains the IBus shared library. |
85 | ||
86 | %description libs -l pl.UTF-8 | |
87 | Ten pakiet zawiera bibliotekę współdzieloną IBus. | |
4fa02aee JR |
88 | |
89 | %package gtk2 | |
36809d14 JB |
90 | Summary: IBus im module for GTK+ 2.x |
91 | Summary(pl.UTF-8): Moduł im IBus dla GTK+ 2.x | |
4fa02aee JR |
92 | Group: Libraries |
93 | Requires: %{name} = %{version}-%{release} | |
4fa02aee JR |
94 | Requires: imsettings-gnome2 |
95 | Requires(post): glib2 >= 1:2.26.0 | |
96 | ||
97 | %description gtk2 | |
36809d14 JB |
98 | This package contains IBus im module for GTK+ 2.x. |
99 | ||
100 | %description gtk2 -l pl.UTF-8 | |
101 | Ten pakiet zawiera moduł im IBus dla GTK+ 2.x. | |
4fa02aee JR |
102 | |
103 | %package gtk3 | |
36809d14 JB |
104 | Summary: IBus im module for GTK+ 3.x |
105 | Summary(pl.UTF-8): Moduł im IBus dla GTK+ 3.x | |
4fa02aee JR |
106 | Group: Libraries |
107 | Requires: %{name} = %{version}-%{release} | |
4fa02aee JR |
108 | Requires: imsettings-gnome3 |
109 | Requires(post): glib2 >= 1:2.26.0 | |
110 | ||
111 | %description gtk3 | |
36809d14 JB |
112 | This package contains IBus im module for GTK+ 3.x. |
113 | ||
114 | %description gtk3 -l pl.UTF-8 | |
115 | Ten pakiet zawiera moduł im IBus dla GTK+ 3.x. | |
4fa02aee | 116 | |
4fa02aee | 117 | %package devel |
36809d14 JB |
118 | Summary: Development files for IBus |
119 | Summary(pl.UTF-8): Pliki programistyczne IBus | |
4fa02aee JR |
120 | Group: Development/Libraries |
121 | Requires: %{name}-libs = %{version}-%{release} | |
4fa02aee JR |
122 | Requires: glib2-devel |
123 | ||
124 | %description devel | |
36809d14 JB |
125 | The ibus-devel package contains the header files for IBus. |
126 | ||
127 | %description devel -l pl.UTF-8 | |
128 | Ten pakiet zawiera pliki nagłówkowe dla szkieletu IBus. | |
129 | ||
130 | %package static | |
131 | Summary: Static ibus library | |
132 | Summary(pl.UTF-8): Biblioteka statyczna ibus | |
133 | Group: Development/Libraries | |
134 | Requires: %{name}-devel = %{version}-%{release} | |
135 | ||
136 | %description static | |
137 | Static ibus library. | |
138 | ||
139 | %description static -l pl.UTF-8 | |
140 | Biblioteka statyczna ibus. | |
141 | ||
142 | %package apidocs | |
143 | Summary: Development documentation for IBus | |
144 | Summary(pl.UTF-8): Dokumentacja programisty dla szkieletu IBus | |
145 | Group: Development/Libraries | |
146 | Requires: gtk-doc-common | |
147 | Conflicts: ibus-devel < 1.4.2 | |
148 | ||
149 | %description apidocs | |
150 | Development documentation for IBus. | |
151 | ||
152 | %description apidocs -l pl.UTF-8 | |
153 | Dokumentacja programisty dla szkieletu IBus. | |
154 | ||
155 | %package -n python-ibus | |
156 | Summary: Python interface to IBus framework | |
157 | Summary(pl.UTF-8): Pythonowy interfejs do szkieletu IBus | |
158 | Group: Development/Languages/Python | |
159 | Requires: python-dbus >= 0.83.0 | |
160 | Requires: python-pygobject | |
161 | Requires: python-pygtk-pango | |
162 | Requires: python-pyxdg | |
163 | Conflicts: ibus < 1.4.2 | |
164 | ||
165 | %description -n python-ibus | |
166 | Python interface to IBus framework. | |
167 | ||
168 | %description -n python-ibus -l pl.UTF-8 | |
169 | Pythonowy interfejs do szkieletu IBus. | |
170 | ||
171 | %package -n vala-ibus | |
172 | Summary: Vala API for ibus library | |
173 | Summary(pl.UTF-8): API języka Vala do biblioteki ibus | |
174 | Group: Development/Libraries | |
175 | Requires: %{name}-devel = %{version}-%{release} | |
7a4da488 | 176 | Requires: vala >= 2:0.14 |
36809d14 JB |
177 | |
178 | %description -n vala-ibus | |
179 | Vala API for ibus library. | |
180 | ||
181 | %description -n vala-ibus -l pl.UTF-8 | |
182 | API języka Vala do biblioteki ibus. | |
4fa02aee | 183 | |
57a642a8 JB |
184 | %package -n bash-completion-ibus |
185 | Summary: Bash completion for ibus commands | |
186 | Summary(pl.UTF-8): Bashowe dopełnianie parametrów dla poleceń ibus | |
187 | Group: Applications/Shells | |
188 | Requires: bash-completion | |
189 | ||
190 | %description -n bash-completion-ibus | |
191 | Bash completion for ibus commands. | |
192 | ||
193 | %description -n bash-completion-ibus -l pl.UTF-8 | |
194 | Bashowe dopełnianie parametrów dla poleceń ibus. | |
195 | ||
4fa02aee JR |
196 | %prep |
197 | %setup -q | |
36809d14 | 198 | %patch0 -p1 |
0636090c | 199 | %{__rm} bindings/vala/ibus-1.0.vapi |
83223d05 | 200 | %patch1 -p1 |
36809d14 | 201 | %patch2 -p1 |
21186c56 | 202 | %patch3 -p1 |
0636090c | 203 | %patch4 -p1 |
4fa02aee | 204 | |
cd6f418f | 205 | %build |
36809d14 | 206 | %{__libtoolize} |
4fa02aee | 207 | %{__aclocal} -I m4 |
4fa02aee | 208 | %{__autoconf} |
36809d14 | 209 | %{__autoheader} |
4fa02aee JR |
210 | %{__automake} |
211 | %configure \ | |
36809d14 JB |
212 | --disable-gtk-doc \ |
213 | --disable-silent-rules \ | |
36809d14 | 214 | --enable-gconf \ |
0636090c | 215 | --enable-dconf \ |
4fa02aee JR |
216 | --enable-gtk2 \ |
217 | --enable-gtk3 \ | |
36809d14 | 218 | --enable-introspection \ |
0636090c | 219 | --enable-python-library \ |
36809d14 JB |
220 | %{?with_static_libs:--enable-static} \ |
221 | --enable-surrounding-text \ | |
7a4da488 | 222 | --enable-vala%{!?with_vala:=no} \ |
36809d14 | 223 | --enable-xim \ |
4fa02aee | 224 | --enable-xkb \ |
0636090c | 225 | --enable-libgnomekbd \ |
4fa02aee | 226 | --with-html-dir=%{_gtkdocdir} \ |
36809d14 | 227 | --with-no-snooper-apps='gnome-do,Do.*,firefox.*,.*chrome.*,.*chromium.*' |
4fa02aee | 228 | |
0636090c JR |
229 | %{__make} -C ui/gtk3 maintainer-clean-generic |
230 | ||
4fa02aee JR |
231 | %{__make} |
232 | ||
233 | %install | |
234 | rm -rf $RPM_BUILD_ROOT | |
235 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/{X11/xinit/xinput.d,xdg/autostart} | |
236 | ||
237 | %{__make} install \ | |
238 | DESTDIR=$RPM_BUILD_ROOT | |
239 | ||
240 | %{__sed} -e 's|@@LIB@@|%{_lib}|g' %{SOURCE1} >$RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d/ibus.conf | |
241 | ||
242 | # correct location in upstream. | |
243 | mv $RPM_BUILD_ROOT{%{_desktopdir},%{_sysconfdir}/xdg/autostart}/ibus.desktop | |
244 | ||
4fa02aee JR |
245 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
246 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk*/*/immodules/*.la | |
36809d14 JB |
247 | %if %{with static_libs} |
248 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/gtk*/*/immodules/*.a | |
249 | %endif | |
250 | ||
251 | %py_postclean | |
4fa02aee JR |
252 | |
253 | %find_lang %{name}10 | |
254 | ||
21186c56 ER |
255 | # imsettings will start this daemon for us |
256 | %{__rm} $RPM_BUILD_ROOT/etc/xdg/autostart/ibus.desktop | |
257 | ||
4fa02aee JR |
258 | %clean |
259 | rm -rf $RPM_BUILD_ROOT | |
260 | ||
261 | %post | |
262 | %update_icon_cache hicolor | |
860bd617 | 263 | %gconf_schema_install ibus.schemas |
cd6f418f | 264 | %glib_compile_schemas |
4fa02aee JR |
265 | |
266 | %preun | |
860bd617 | 267 | %gconf_schema_uninstall ibus.schemas |
cd6f418f | 268 | %glib_compile_schemas |
4fa02aee JR |
269 | |
270 | %postun | |
271 | %update_icon_cache hicolor | |
272 | ||
36809d14 JB |
273 | %post libs -p /sbin/ldconfig |
274 | %postun libs -p /sbin/ldconfig | |
4fa02aee JR |
275 | |
276 | %post gtk2 | |
277 | %if "%{_lib}" != "lib" | |
278 | %{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk64-2.0/gtk.immodules | |
279 | %else | |
280 | %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules | |
281 | %endif | |
282 | ||
283 | %postun gtk2 | |
284 | %if "%{_lib}" != "lib" | |
285 | %{_bindir}/gtk-query-immodules-2.0-64 > %{_sysconfdir}/gtk64-2.0/gtk.immodules | |
286 | %else | |
287 | %{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules | |
288 | %endif | |
289 | ||
290 | %post gtk3 | |
291 | %if "%{_lib}" != "lib" | |
292 | %{_bindir}/gtk-query-immodules-3.0-64 --update-cache | |
293 | %else | |
294 | %{_bindir}/gtk-query-immodules-3.0 --update-cache | |
295 | %endif | |
296 | ||
297 | %postun gtk3 | |
298 | %if "%{_lib}" != "lib" | |
299 | %{_bindir}/gtk-query-immodules-3.0-64 --update-cache | |
300 | %else | |
301 | %{_bindir}/gtk-query-immodules-3.0 --update-cache | |
302 | %endif | |
303 | ||
304 | %files -f %{name}10.lang | |
305 | %defattr(644,root,root,755) | |
306 | %doc AUTHORS README | |
21186c56 | 307 | %config(noreplace) %verify(not md5 mtime size) /etc/X11/xinit/xinput.d/ibus.conf |
0636090c JR |
308 | %dir %{_sysconfdir}/dconf/db/ibus.d |
309 | %{_sysconfdir}/dconf/db/ibus.d/00-upstream-settings | |
310 | %{_sysconfdir}/dconf/profile/ibus | |
4fa02aee | 311 | %{_sysconfdir}/gconf/schemas/ibus.schemas |
0636090c | 312 | %attr(755,root,root) %{_bindir}/ibus |
4fa02aee JR |
313 | %attr(755,root,root) %{_bindir}/ibus-daemon |
314 | %attr(755,root,root) %{_bindir}/ibus-setup | |
f873ba5d | 315 | %dir %{_libexecdir} |
0636090c JR |
316 | %attr(755,root,root) %{_libexecdir}/ibus-dconf |
317 | %attr(755,root,root) %{_libexecdir}/ibus-engine-simple | |
43b3a3b6 | 318 | %attr(755,root,root) %{_libexecdir}/ibus-gconf |
0636090c | 319 | %attr(755,root,root) %{_libexecdir}/ibus-ui-gtk3 |
43b3a3b6 | 320 | %attr(755,root,root) %{_libexecdir}/ibus-x11 |
43b3a3b6 | 321 | %attr(755,root,root) %{_libexecdir}/ibus-xkb |
4fa02aee | 322 | %{_datadir}/ibus |
0636090c JR |
323 | %{_datadir}/GConf/gsettings/ibus.convert |
324 | %{_datadir}/glib-2.0/schemas/org.freedesktop.ibus.gschema.xml | |
36809d14 JB |
325 | %{_desktopdir}/ibus-setup.desktop |
326 | %{_iconsdir}/hicolor/*/apps/ibus-*.png | |
327 | %{_iconsdir}/hicolor/scalable/apps/ibus*.svg | |
4fa02aee JR |
328 | |
329 | %files libs | |
330 | %defattr(644,root,root,755) | |
331 | %attr(755,root,root) %{_libdir}/libibus-1.0.so.*.*.* | |
0636090c | 332 | %attr(755,root,root) %ghost %{_libdir}/libibus-1.0.so.5 |
4fa02aee JR |
333 | %{_libdir}/girepository-1.0/IBus-1.0.typelib |
334 | ||
335 | %files gtk2 | |
336 | %defattr(644,root,root,755) | |
337 | %attr(755,root,root) %{_libdir}/gtk-2.0/*/immodules/im-ibus.so | |
338 | ||
339 | %files gtk3 | |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_libdir}/gtk-3.0/*/immodules/im-ibus.so | |
342 | ||
4fa02aee JR |
343 | %files devel |
344 | %defattr(644,root,root,755) | |
36809d14 | 345 | %attr(755,root,root) %{_libdir}/libibus-1.0.so |
4fa02aee JR |
346 | %{_pkgconfigdir}/ibus-1.0.pc |
347 | %{_includedir}/ibus-1.0 | |
348 | %{_datadir}/gir-1.0/IBus-1.0.gir | |
36809d14 JB |
349 | |
350 | %if %{with static_libs} | |
351 | %files static | |
352 | %defattr(644,root,root,755) | |
353 | %{_libdir}/libibus-1.0.a | |
354 | %endif | |
355 | ||
356 | %files apidocs | |
357 | %defattr(644,root,root,755) | |
358 | %{_gtkdocdir}/ibus | |
359 | ||
360 | %files -n python-ibus | |
361 | %defattr(644,root,root,755) | |
362 | %dir %{py_sitescriptdir}/ibus | |
363 | %{py_sitescriptdir}/ibus/*.py[co] | |
364 | %dir %{py_sitescriptdir}/ibus/interface | |
365 | %{py_sitescriptdir}/ibus/interface/*.py[co] | |
366 | ||
7a4da488 | 367 | %if %{with vala} |
36809d14 JB |
368 | %files -n vala-ibus |
369 | %defattr(644,root,root,755) | |
4fa02aee JR |
370 | %{_datadir}/vala/vapi/ibus-1.0.vapi |
371 | %{_datadir}/vala/vapi/ibus-1.0.deps | |
7a4da488 | 372 | %endif |
57a642a8 JB |
373 | |
374 | %files -n bash-completion-ibus | |
375 | %defattr(644,root,root,755) | |
376 | /etc/bash_completion.d/ibus.bash |