Пакет ibus: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
%def_disable snapshot
%define api_ver 1.0
%define _libexecdir %_prefix/libexec
%define _localstatedir %_var

%def_enable python
%def_disable python2
%def_enable dconf
%def_disable gconf
%def_enable wayland
%def_enable appindicator
%def_enable emoji_dict
%def_enable unicode_dict
# ibus-engine-switch timed out in hasher
%def_disable check
#src/tests/ibus-desktop-testing-runner.in:
#172     if test $HAVE_GRAPHICS -eq 1 ; then
#173         /usr/libexec/Xorg.wrap -noreset ...
%def_disable installed_tests

Name: ibus
Version: 1.5.21
Release: alt0.M80C.1

Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System/Libraries
Url: https://github.com/ibus/ibus/wiki

%if_disabled snapshot
Source: https://github.com/%name/%name/releases/download/%version/%name-%version.tar.gz
%else
Source: %name-%version.tar
%endif
Source1: ibus-xinput

%define gtk2_binary_version %(pkg-config --variable=gtk_binary_version gtk+-2.0)
%define gtk3_binary_version %(pkg-config --variable=gtk_binary_version gtk+-3.0)

Requires: iso-codes setxkbmap xmodmap
Requires: lib%name = %version-%release
Requires: lib%name-gir = %version-%release

%{?_enable_gconf:Requires(post,preun):GConf}
%{?_enable_dconf:Requires(pre): dconf}

%if_enabled python
BuildRequires(pre): rpm-build-python3
%add_python3_path %_datadir/%name/setup
%endif

%{?_enable_python2:BuildRequires(pre): rpm-build-python}
BuildRequires: vala-tools >= 0.18
BuildRequires: libgtk+2-devel
BuildRequires: libgtk+3-devel
BuildRequires: libdbus-devel
BuildRequires: desktop-file-utils
BuildRequires: gtk-doc
BuildRequires: iso-codes-devel
BuildRequires: gobject-introspection-devel
BuildRequires: gnome-icon-theme-symbolic
BuildRequires: libXi-devel libXtst-devel
BuildRequires: libnotify-devel
%{?_enable_unicode_dict:BuildRequires: unicode-ucd}
%{?_enable_python:BuildRequires: python3-devel python3-module-dbus-devel python3-module-pygobject3-devel}
%{?_enable_python2:BuildRequires: python-devel python-modules-compiler python-module-dbus-devel python-module-pygobject3-devel}
%{?_enable_gconf:BuildRequires: libGConf-devel}
# required if autoreconf used
BuildRequires: libGConf-devel
%{?_enable_dconf:BuildRequires: libdconf-devel /proc dbus-tools-gui dconf}
%{?_enable_wayland:BuildRequires: libwayland-client-devel libxkbcommon-devel}
# gsettings-schema-convert
BuildRequires: GConf
# since 1.5.14
%{?_enable_emoji_dict:BuildRequires: cldr-emoji-annotation-devel unicode-emoji unicode-ucd gir(Gtk) = 3.0}
%{?_enable_appindicator:BuildRequires: qt5-base-devel}
%{?_enable_check:BuildRequires: xvfb-run gnome-desktop-testing}

%define _xinputconf %_sysconfdir/X11/xinit/xinput.d/ibus.conf

%description
IBus means Intelligent Input Bus. It is an input framework for Linux OS.

%package -n lib%name
Summary: IBus libraries
Group: System/Libraries
Requires: dbus

%description -n lib%name
This package contains the libraries for IBus

%package -n lib%name-gir
Summary: GObject introspection data for the IBus library
Group: System/Libraries
Requires: lib%name = %version-%release

%description -n lib%name-gir
This package contains typelib file for the IBus library.

%package gtk2
Summary: IBus im module for gtk2
Group: System/Libraries
Requires(pre): libgtk+2
Requires: lib%name = %version-%release

%description gtk2
This package contains IBus im module for gtk2.

%package gtk3
Summary: IBus im module for gtk3
Group: System/Libraries
Requires(pre): libgtk+3
Requires: lib%name = %version-%release

%description gtk3
This package contains IBus im module for gtk3.

%package -n lib%name-devel
Summary: Development tools for ibus
Group: Development/C
Requires: lib%name = %version-%release

%description -n lib%name-devel
This package contains the header files for IBus library.

%package -n lib%name-gir-devel
Summary: GObject introspection devel data for IBus
Group: Development/Other
BuildArch: noarch
Requires: lib%name-gir = %version-%release
Requires: lib%name-devel = %version-%release

%description -n lib%name-gir-devel
This package contains gir files for IBus library.

%package -n lib%name-devel-docs
Summary: Developer documents for IBus
Group: Development/Other
BuildArch: noarch
Requires: %name = %version-%release

%description -n lib%name-devel-docs
This package contains developer documentation for IBus.

%package -n python3-module-ibus-overrides
Summary: IBus Python override library
Group: Development/Python3

%description -n python3-module-ibus-overrides
This package provides Python override library for IBus. The Python files
override some functions in GObject-Introspection.

%if_enabled python2
%package -n python-module-ibus
Summary: IBus im module for python
Group: Development/Python
BuildArch: noarch

%description -n python-module-ibus
This package contains IBus im module for python.

%package -n python-module-ibus-overrides
Summary: IBus Python override library
Group: Development/Python

%description -n python-module-ibus-overrides
This package provides Python override library for IBus. The Python files
override some functions in GObject-Introspection.
%endif

%package tests
Summary: Tests for IBus
Group: Development/Other
Requires: %name = %version-%release

%description tests
This package provides tests programs that can be used to verify
the functionality of the installed Intelligent Input Bus.

%prep
%setup
%{?_enable_snapshot:touch ChangeLog}

%build
%autoreconf
%configure \
    --disable-static \
    --enable-gtk2 \
    --enable-gtk3 \
    --enable-xim \
    %{?_enable_snapshot:--enable-gtk-doc} \
    %if_enabled python
    %{?_disable_python2:--disable-python2} \
    --with-python=%__python3 \
    %{?_enable_python2:--enable-python-library} \
    %endif
    %{subst_enable dconf} \
    %{?_enable_dconf:--disable-schemas-compile} \
    %{subst_enable gconf} \
    %{?_enable_gconf:--disable-schemas-install} \
    %{subst_enable wayland} \
    --enable-surrounding-text \
    --enable-introspection \
    %{?_disable_emoji_dict:--disable-emoji-dict} \
    %{?_disable_unicode_dict:--disable-unicode-dict} \
    %{subst_enable appindicator} \
    %{?_enable_installed_tests:--enable-install-tests}
    %nil
%make_build

%install
%makeinstall_std
mkdir -p %buildroot%_localstatedir/cache/%name

# install xinput config file
install -pm 644 -D %SOURCE1 %buildroot%_xinputconf

%find_lang %{name}10

%check
xvfb-run %make check

%if_enabled gconf
%post
%gconf2_install %name

%preun
if [ $1 = 0 ]; then
%gconf2_uninstall %name
fi
%endif

%files -f %{name}10.lang
%dir %_datadir/ibus/
%_bindir/%name
%_bindir/%name-daemon
%_bindir/%name-setup
%_datadir/%name/*
%_desktopdir/*
%_iconsdir/hicolor/*/apps/*
%_libexecdir/%name-portal
%_libexecdir/%name-ui-gtk3
%_libexecdir/%name-x11
%_libexecdir/%name-engine-simple
%{?_enable_wayland:%_libexecdir/%name-wayland}

%if_enabled emoji_dict
%_libexecdir/%name-extension-gtk3
%_libexecdir/%name-ui-emojier
%_man7dir/%name-emoji.7*
%endif

%if_enabled gconf
%_libexecdir/%name-gconf
%_sysconfdir/gconf/schemas/ibus.schemas
%endif

%if_enabled dconf
%dir %_sysconfdir/dconf/db/%name.d
%_sysconfdir/dconf/db/%name.d/00-upstream-settings
%_sysconfdir/dconf/profile/%name
%_libexecdir/%name-dconf
%_datadir/GConf/gsettings/%name.convert
%_datadir/glib-2.0/schemas/org.freedesktop.%name.gschema.xml
%endif
%_datadir/dbus-1/services/org.freedesktop.IBus.service
%_datadir/dbus-1/services/org.freedesktop.portal.IBus.service
%config %_xinputconf
%_localstatedir/cache/%name
%_man1dir/%name-daemon.1.*
%_man1dir/%name-setup.1.*
%_man1dir/%name.1.*
%_man5dir/*
%doc AUTHORS README

%exclude %_datadir/bash-completion/completions/ibus.bash

%files -n lib%name
%_libdir/lib%name-1.0.so.*

%files -n lib%name-gir
%_typelibdir/IBus-%api_ver.typelib

%files gtk2
%_libdir/gtk-2.0/%gtk2_binary_version/immodules/im-ibus.so

%files gtk3
%_libdir/gtk-3.0/%gtk3_binary_version/immodules/im-ibus.so

%exclude %_libdir/gtk-*.0/*/immodules/*.la

%files -n lib%name-devel
%_libdir/lib*.so
%_pkgconfigdir/*
%_includedir/*
%_datadir/gettext/its/ibus.*
%_vapidir/%name-%api_ver.vapi
%_vapidir/%name-%api_ver.deps

%files -n lib%name-gir-devel
%_girdir/IBus-%api_ver.gir

%files -n lib%name-devel-docs
%_datadir/gtk-doc/html/*

%if_enabled python
%files -n python3-module-ibus-overrides
%python3_sitelibdir/gi/overrides/IBus*
%python3_sitelibdir/gi/overrides/__pycache__/IBus*
%endif

%if_enabled python2
%files -n python-module-ibus
%dir %python_sitelibdir_noarch/ibus
%python_sitelibdir_noarch/ibus/*

%files -n python-module-ibus-overrides
%python_sitelibdir/gi/overrides/IBus.py*
%endif

%if_enabled installed_tests
%files tests
%_bindir/ibus-desktop-testing-runner
%_libexecdir/installed-tests/%name/
%_datadir/installed-tests/%name/
%endif

%changelog
* Wed Mar 25 2020 Andrey Cherepanov <cas@altlinux.org> 1.5.21-alt0.M80C.1
- Backport new version to c8 branch.

* Fri Aug 23 2019 Yuri N. Sedunov <aris@altlinux.org> 1.5.21-alt1
- 1.5.21
- new -tests subpackage

* Thu Aug 22 2019 Yuri N. Sedunov <aris@altlinux.org> 1.5.20-alt3
- rebuilt with Emoji dict
- disabled python2 support

* Sat Apr 06 2019 Yuri N. Sedunov <aris@altlinux.org> 1.5.20-alt2
- rebuilt with python3 as default python

* Fri Mar 01 2019 Yuri N. Sedunov <aris@altlinux.org> 1.5.20-alt1
- 1.5.20

* Thu Aug 09 2018 Yuri N. Sedunov <aris@altlinux.org> 1.5.19-alt1
- 1.5.19

* Fri Mar 02 2018 Yuri N. Sedunov <aris@altlinux.org> 1.5.18-alt1
- 1.5.18

* Thu Oct 26 2017 Yuri N. Sedunov <aris@altlinux.org> 1.5.17-alt2
- rebuild with _localstatedir=%%_var

* Mon Oct 23 2017 Yuri N. Sedunov <aris@altlinux.org> 1.5.17-alt1
- 1.5.17

* Wed May 17 2017 Yuri N. Sedunov <aris@altlinux.org> 1.5.16-alt1
- 1.5.16

* Wed Mar 08 2017 Yuri N. Sedunov <aris@altlinux.org> 1.5.15-alt1
- 1.5.15

* Fri Aug 19 2016 Yuri N. Sedunov <aris@altlinux.org> 1.5.14-alt1
- 1.5.14

* Wed Apr 13 2016 Yuri N. Sedunov <aris@altlinux.org> 1.5.13-alt1
- 1.5.13

* Thu Feb 11 2016 Yuri N. Sedunov <aris@altlinux.org> 1.5.12-alt1
- 1.5.12

* Thu Aug 06 2015 Yuri N. Sedunov <aris@altlinux.org> 1.5.11-alt1
- 1.5.11

* Fri Apr 10 2015 Yuri N. Sedunov <aris@altlinux.org> 1.5.10-alt1
- 1.5.10

* Thu Oct 09 2014 Yuri N. Sedunov <aris@altlinux.org> 1.5.9-alt1
- 1.5.9
- remove upstreamed patches

* Tue Jul 08 2014 Yuri N. Sedunov <aris@altlinux.org> 1.5.7-alt1
- 1.5.7
- updated fc patchset

* Fri Feb 07 2014 Yuri N. Sedunov <aris@altlinux.org> 1.5.5-alt1
- 1.5.5
- updated fc patchset

* Wed Oct 23 2013 Yuri N. Sedunov <aris@altlinux.org> 1.5.4-alt1
- 1.5.4
- updated fc patchset

* Mon Sep 02 2013 Yuri N. Sedunov <aris@altlinux.org> 1.5.3-alt1
- 1.5.3
- updated fc patchset

* Sun May 12 2013 Yuri N. Sedunov <aris@altlinux.org> 1.5.2-alt1
- 1.5.2
- updated fc patchset

* Wed Mar 13 2013 Yuri N. Sedunov <aris@altlinux.org> 1.5.1-alt2
- rebuilt for people/gnome

* Wed Mar 13 2013 Yuri N. Sedunov <aris@altlinux.org> 1.5.1-alt1
- 1.5.1
- updated fc patchset

* Tue Oct 09 2012 Yuri N. Sedunov <aris@altlinux.org> 1.4.99.20121006-alt1
- updated to 1.4.99.20121006

* Tue Oct 02 2012 Yuri N. Sedunov <aris@altlinux.org> 1.4.99.20120917-alt1
- 1.4.99.20120917

* Thu Jul 19 2012 Yuri N. Sedunov <aris@altlinux.org> 1.4.1-alt1
- 1.4.1

* Thu Jan 19 2012 Yuri N. Sedunov <aris@altlinux.org> 1.4.0-alt4
- fixed GConf support, made it optional
- really built with dconf support

* Fri Dec 16 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 1.4.0-alt3
- gir subpackages separated

* Wed Nov 30 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 1.4.0-alt2
- lib%name-devel dependences fixed

* Tue Nov 29 2011 Anton V. Boyarshinov <boyarsh@altlinux.ru> 1.4.0-alt1
- build for Sisyphus, based on upstream spec