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