2012-07-27 10:46:48 +00:00
|
|
|
Name: ibus-typing-booster
|
2024-04-04 13:52:01 +00:00
|
|
|
Version: 2.25.4
|
2024-01-27 19:56:31 +00:00
|
|
|
Release: %autorelease
|
2016-12-09 15:49:49 +00:00
|
|
|
Summary: A completion input method
|
2022-11-24 14:46:02 +00:00
|
|
|
License: GPL-3.0-or-later AND Apache-2.0
|
2016-05-10 06:37:07 +00:00
|
|
|
URL: https://mike-fabian.github.io/ibus-typing-booster/
|
2017-11-06 08:17:44 +00:00
|
|
|
Source0: https://github.com/mike-fabian/ibus-typing-booster/releases/download/%{version}/ibus-typing-booster-%{version}.tar.gz
|
2013-10-01 09:32:37 +00:00
|
|
|
Requires: ibus >= 1.5.3
|
2016-05-10 06:37:07 +00:00
|
|
|
Requires: m17n-lib
|
2018-10-08 16:00:06 +00:00
|
|
|
%{?__python3:Requires: %{__python3}}
|
2014-02-27 14:32:58 +00:00
|
|
|
Requires: python3-dbus
|
2019-07-17 14:02:57 +00:00
|
|
|
Requires: python3-distro
|
2021-06-25 10:56:36 +00:00
|
|
|
# because of “from packing import version”:
|
|
|
|
Requires: python3-packaging
|
2014-02-27 14:32:58 +00:00
|
|
|
Requires: python3-enchant
|
2017-02-22 07:27:23 +00:00
|
|
|
Requires: python3-pyxdg
|
2018-01-02 19:50:29 +00:00
|
|
|
%if 0%{?fedora} >= 24 || 0%{?rhel} > 7
|
2017-03-19 00:20:33 +00:00
|
|
|
# Recommend reasonably good fonts which have most of the emoji:
|
2017-10-05 06:25:02 +00:00
|
|
|
Recommends: google-noto-emoji-color-fonts
|
2016-08-12 17:10:13 +00:00
|
|
|
Recommends: gdouros-symbola-fonts
|
2019-01-29 16:42:31 +00:00
|
|
|
# For better description of the dictionaries in the setup tool
|
|
|
|
# makes it possible to search for full language and territory names
|
|
|
|
# and not just locale codes:
|
2022-10-05 11:38:45 +00:00
|
|
|
Recommends: python3-langtable
|
2021-07-26 20:26:00 +00:00
|
|
|
# To play a sound on error:
|
|
|
|
Recommends: python3-simpleaudio
|
2021-11-03 16:14:19 +00:00
|
|
|
# Use better regexpressions if available:
|
|
|
|
Recommends: python3-regex
|
2022-07-19 09:19:43 +00:00
|
|
|
# To get the currently active window in a Gnome Wayland session:
|
|
|
|
Recommends: python3-pyatspi
|
2017-02-22 07:27:23 +00:00
|
|
|
%endif
|
2018-01-02 19:50:29 +00:00
|
|
|
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
|
2017-03-10 14:20:42 +00:00
|
|
|
# Save some space in the binary rpm by requiring the Fedora
|
|
|
|
# packages which contain the emoji data files:
|
|
|
|
Requires: cldr-emoji-annotation
|
|
|
|
Requires: unicode-ucd
|
|
|
|
%endif
|
2016-05-10 06:37:07 +00:00
|
|
|
BuildRequires: ibus-devel
|
2019-02-06 13:18:59 +00:00
|
|
|
BuildRequires: gcc
|
2018-01-02 19:50:29 +00:00
|
|
|
%if 0%{?fedora} >= 24 || 0%{?rhel} > 7
|
2022-06-09 11:27:15 +00:00
|
|
|
BuildRequires: python3-devel >= 3.6.0
|
2017-03-10 14:20:42 +00:00
|
|
|
BuildRequires: python3-pyxdg
|
2017-02-22 07:27:23 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: python34-devel
|
|
|
|
%endif
|
2016-10-24 07:40:20 +00:00
|
|
|
# for the unit tests
|
|
|
|
BuildRequires: m17n-lib
|
|
|
|
BuildRequires: m17n-db-extras
|
2023-07-07 16:03:43 +00:00
|
|
|
BuildRequires: m17n-db-devel
|
2016-10-24 07:40:20 +00:00
|
|
|
BuildRequires: python3-enchant
|
2021-11-23 18:08:25 +00:00
|
|
|
BuildRequires: enchant2
|
2023-07-06 18:25:27 +00:00
|
|
|
BuildRequires: hunspell-en
|
2021-06-25 10:56:36 +00:00
|
|
|
# because of “from packing import version”:
|
|
|
|
BuildRequires: python3-packaging
|
|
|
|
%if 0%{?fedora} >= 35
|
2021-06-21 16:04:10 +00:00
|
|
|
# to make the python3-enchant test work for hunspell dictionaries which are not yet UTF-8:
|
|
|
|
BuildRequires: glibc-gconv-extra
|
2021-06-25 10:56:36 +00:00
|
|
|
%endif
|
2021-02-19 14:33:52 +00:00
|
|
|
%if 0%{?fedora} && 0%{?fedora} >= 34
|
2019-12-18 15:42:19 +00:00
|
|
|
BuildRequires: python3-libvoikko
|
2021-02-17 14:19:43 +00:00
|
|
|
BuildRequires: voikko-fi
|
|
|
|
%endif
|
2023-04-27 08:18:46 +00:00
|
|
|
BuildRequires: appstream
|
2023-04-24 12:10:44 +00:00
|
|
|
BuildRequires: libappstream-glib
|
2018-11-06 12:17:56 +00:00
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: python3-gobject
|
|
|
|
BuildRequires: python3-gobject-base
|
2016-10-24 07:40:20 +00:00
|
|
|
BuildRequires: hunspell-cs
|
|
|
|
BuildRequires: hunspell-de
|
|
|
|
BuildRequires: hunspell-en
|
|
|
|
BuildRequires: hunspell-es
|
2017-02-04 14:58:48 +00:00
|
|
|
BuildRequires: hunspell-fr
|
2016-10-24 07:40:20 +00:00
|
|
|
BuildRequires: hunspell-it
|
|
|
|
BuildRequires: hunspell-ko
|
2018-08-23 01:27:05 +00:00
|
|
|
BuildRequires: glib2
|
2018-11-06 12:17:56 +00:00
|
|
|
BuildRequires: gtk3
|
|
|
|
BuildRequires: dconf
|
|
|
|
BuildRequires: dbus-x11
|
|
|
|
BuildRequires: ibus
|
2019-10-01 15:11:12 +00:00
|
|
|
BuildRequires: xorg-x11-server-Xvfb
|
2019-10-31 08:59:45 +00:00
|
|
|
BuildRequires: glibc-langpack-en
|
|
|
|
BuildRequires: glibc-langpack-cs
|
|
|
|
BuildRequires: glibc-langpack-km
|
|
|
|
BuildRequires: glibc-langpack-pt
|
|
|
|
BuildRequires: glibc-langpack-am
|
2020-05-06 08:47:45 +00:00
|
|
|
BuildRequires: glibc-langpack-de
|
|
|
|
BuildRequires: glibc-langpack-ar
|
2020-12-19 00:41:02 +00:00
|
|
|
BuildRequires: make
|
2020-05-06 08:47:45 +00:00
|
|
|
# A window manger is needed for the GUI test
|
2020-12-17 19:50:28 +00:00
|
|
|
# BuildRequires: i3
|
2012-07-27 10:46:48 +00:00
|
|
|
BuildArch: noarch
|
2021-08-12 13:23:46 +00:00
|
|
|
# Some test cases fail on ppc64 and s390x (because of some bugs on
|
|
|
|
# these platforms I think). This makes the build fail for no good
|
|
|
|
# reason if it accidentally is build on one of these platforms.
|
|
|
|
#
|
|
|
|
# So even though this is a noarch package, tell koji to never build it
|
|
|
|
# on ppc64 and s390x:
|
|
|
|
ExcludeArch: ppc64 s390x
|
2012-07-27 10:46:48 +00:00
|
|
|
|
|
|
|
%description
|
2016-12-09 15:49:49 +00:00
|
|
|
Ibus-typing-booster is a context sensitive completion
|
|
|
|
input method to speedup typing.
|
2012-07-27 10:46:48 +00:00
|
|
|
|
2020-05-06 08:47:45 +00:00
|
|
|
%package tests
|
|
|
|
Summary: Tests for the %{name} package
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description tests
|
|
|
|
The %{name}-tests package contains tests that can be used to verify
|
|
|
|
the functionality of the installed %{name} package.
|
|
|
|
|
2017-03-06 10:34:27 +00:00
|
|
|
%package -n emoji-picker
|
|
|
|
Summary: An emoji selection tool
|
|
|
|
Requires: ibus-typing-booster = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n emoji-picker
|
|
|
|
A simple application to find and insert emoji and other
|
|
|
|
Unicode symbols.
|
|
|
|
|
2012-07-27 10:46:48 +00:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
2014-02-27 14:32:58 +00:00
|
|
|
export PYTHON=%{__python3}
|
2023-06-26 18:32:27 +00:00
|
|
|
%configure --disable-static --enable-installed-tests
|
2020-07-13 20:13:21 +00:00
|
|
|
%make_build
|
2012-07-27 10:46:48 +00:00
|
|
|
|
|
|
|
%install
|
2014-02-27 14:32:58 +00:00
|
|
|
export PYTHON=%{__python3}
|
2020-07-13 20:13:21 +00:00
|
|
|
%make_install NO_INDEX=true pkgconfigdir=%{_datadir}/pkgconfig
|
2020-06-15 13:23:42 +00:00
|
|
|
%py_byte_compile %{python3} /usr/share/ibus-typing-booster/engine
|
|
|
|
%py_byte_compile %{python3} /usr/share/ibus-typing-booster/setup
|
2018-01-02 19:50:29 +00:00
|
|
|
%if 0%{?fedora} >= 26 || 0%{?rhel} > 7
|
2017-04-24 06:51:14 +00:00
|
|
|
# These files are in the required package “cldr-emoji-annotation”
|
|
|
|
rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/annotations/*.xml
|
|
|
|
rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/annotationsDerived/*.xml
|
2017-03-18 09:17:58 +00:00
|
|
|
# This file is in the required package “unicode-ucd”:
|
|
|
|
rm $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/UnicodeData.txt
|
|
|
|
# At least emoji-data.txt emoji-sequences.txt emoji-zwj-sequences.txt
|
|
|
|
# are still there even on Fedora >= 26 they are not available in any packages:
|
2017-11-06 08:17:44 +00:00
|
|
|
gzip -n --force --best $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/*.txt
|
2017-05-29 05:57:53 +00:00
|
|
|
# The json file from emojione is not deleted anymore because
|
|
|
|
# the package nodejs-emojione-json has been orphaned:
|
2017-11-06 08:17:44 +00:00
|
|
|
gzip -n --force --best $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/*.json
|
2017-03-10 14:20:42 +00:00
|
|
|
%else
|
2017-11-06 08:17:44 +00:00
|
|
|
gzip -n --force --best $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/*.{txt,json}
|
|
|
|
gzip -n --force --best $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/annotations/*.xml
|
|
|
|
gzip -n --force --best $RPM_BUILD_ROOT/%{_datadir}/%{name}/data/annotationsDerived/*.xml
|
2017-03-10 14:20:42 +00:00
|
|
|
%endif
|
2012-07-27 10:46:48 +00:00
|
|
|
|
2012-10-31 15:36:51 +00:00
|
|
|
%find_lang %{name}
|
|
|
|
|
2013-10-01 09:32:37 +00:00
|
|
|
%check
|
2018-11-06 12:17:56 +00:00
|
|
|
export LC_ALL=C.UTF-8
|
2023-04-27 08:18:46 +00:00
|
|
|
appstreamcli validate --pedantic --no-net %{buildroot}/%{_datadir}/metainfo/*.appdata.xml
|
|
|
|
# According to the appstream developers, appstream-util is unmaintained:
|
|
|
|
# https://github.com/ximion/appstream/issues/494#issuecomment-1521419742
|
|
|
|
# But I keep it here for the time being because the Fedora packaging guidelines ask for it:
|
|
|
|
# https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/#_app_data_validate_usage
|
2023-04-24 12:10:44 +00:00
|
|
|
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml
|
2013-10-01 09:32:37 +00:00
|
|
|
desktop-file-validate \
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-typing-booster.desktop
|
2017-09-11 10:48:47 +00:00
|
|
|
desktop-file-validate \
|
|
|
|
$RPM_BUILD_ROOT%{_datadir}/applications/emoji-picker.desktop
|
2019-10-11 08:53:24 +00:00
|
|
|
pushd engine
|
2016-10-24 07:40:20 +00:00
|
|
|
# run doctests
|
2023-07-03 17:58:37 +00:00
|
|
|
# commented out because of https://bugzilla.redhat.com/show_bug.cgi?id=2218460
|
|
|
|
#python3 hunspell_suggest.py
|
|
|
|
#python3 m17n_translit.py
|
|
|
|
#python3 itb_emoji.py
|
|
|
|
#python3 itb_util.py
|
2019-10-11 08:53:24 +00:00
|
|
|
popd
|
2018-08-23 01:27:05 +00:00
|
|
|
mkdir -p /tmp/glib-2.0/schemas/
|
|
|
|
cp org.freedesktop.ibus.engine.typing-booster.gschema.xml \
|
|
|
|
/tmp/glib-2.0/schemas/org.freedesktop.ibus.engine.typing-booster.gschema.xml
|
|
|
|
glib-compile-schemas /tmp/glib-2.0/schemas #&>/dev/null || :
|
2024-01-27 20:08:35 +00:00
|
|
|
export XDG_DATA_DIRS=/tmp:%{_datadir} # /usr/share is needed to make enchant2 work!
|
2016-10-24 07:40:20 +00:00
|
|
|
eval $(dbus-launch --sh-syntax)
|
|
|
|
dconf dump /
|
2018-08-23 01:27:05 +00:00
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/offtherecord false
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/usedigitsasselectkeys true
|
2018-09-24 08:43:46 +00:00
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/addspaceoncommit true
|
2018-08-23 01:27:05 +00:00
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/tabenable false
|
2019-02-12 12:17:04 +00:00
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/inputmethod "'NoIME'"
|
2018-08-23 01:27:05 +00:00
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/rememberlastusedpreeditime true
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/mincharcomplete 1
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/dictionary "'en_US'"
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/emojipredictions true
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/autocommitcharacters "''"
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/pagesize 6
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/shownumberofcandidates true
|
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/showstatusinfoinaux true
|
2018-12-08 16:32:47 +00:00
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/inlinecompletion false
|
2018-12-03 14:14:15 +00:00
|
|
|
dconf write /org/freedesktop/ibus/engine/typing-booster/keybindings "{'next_input_method': <['Control+Down', 'Control+KP_Down']>, 'previous_input_method': <['Control+Up', 'Control+KP_Up']>, 'lookup_related': <['Mod5+F12']>, 'enable_lookup': <['Tab', 'ISO_Left_Tab', 'KP_Divide']>, 'select_next_candidate': <['Tab', 'ISO_Left_Tab', 'Down', 'KP_Down']>, 'lookup_table_page_down': <['Page_Down', 'KP_Page_Down', 'KP_Next']>, 'toggle_emoji_prediction': <['Mod5+F6']>, 'lookup_table_page_up': <['Page_Up', 'KP_Page_Up', 'KP_Prior']>, 'toggle_off_the_record': <['Mod5+F9']>, 'cancel': <['Escape']>, 'setup': <['Mod5+F10']>, 'select_previous_candidate': <['Shift+Tab', 'Shift+ISO_Left_Tab', 'Up', 'KP_Up']>}"
|
2016-10-24 07:40:20 +00:00
|
|
|
dconf dump /
|
2019-10-01 15:11:12 +00:00
|
|
|
export DISPLAY=:1
|
|
|
|
Xvfb $DISPLAY -screen 0 1024x768x16 &
|
2020-05-15 20:24:08 +00:00
|
|
|
# A window manager and and ibus-daemon are needed to run the GUI
|
|
|
|
# test tests/test_gtk.py, for example i3 can be used.
|
|
|
|
#
|
|
|
|
# To debug what is going on if there is a problem with the GUI test
|
|
|
|
# add BuildRequires: x11vnc and start a vnc server:
|
|
|
|
#
|
|
|
|
# x11vnc -display $DISPLAY -unixsock /tmp/mysock -bg -nopw -listen localhost -xkb
|
|
|
|
#
|
|
|
|
# Then one can view what is going on outside of the chroot with vncviewer:
|
|
|
|
#
|
|
|
|
# vncviewer /var/lib/mock/fedora-32-x86_64/root/tmp/mysock
|
|
|
|
#
|
|
|
|
# The GUI test will be skipped if XDG_SESSION_TYPE is not x11 or wayland.
|
|
|
|
#
|
|
|
|
#ibus-daemon -drx
|
|
|
|
#touch /tmp/i3config
|
|
|
|
#i3 -c /tmp/i3config &
|
|
|
|
#export XDG_SESSION_TYPE=x11
|
|
|
|
|
|
|
|
make check && rc=0 || rc=1
|
|
|
|
cat tests/*.log
|
|
|
|
if [ $rc != 0 ] ; then
|
|
|
|
exit $rc
|
|
|
|
fi
|
2013-10-01 09:32:37 +00:00
|
|
|
|
2012-10-31 15:36:51 +00:00
|
|
|
%files -f %{name}.lang
|
2020-01-24 18:16:52 +00:00
|
|
|
%doc AUTHORS COPYING README README.html README.md
|
2012-07-27 10:46:48 +00:00
|
|
|
%{_datadir}/%{name}
|
2017-09-11 10:48:47 +00:00
|
|
|
%{_datadir}/metainfo/typing-booster.appdata.xml
|
2012-07-27 10:46:48 +00:00
|
|
|
%{_datadir}/ibus/component/typing-booster.xml
|
2018-05-25 11:50:47 +00:00
|
|
|
%{_datadir}/icons/hicolor/16x16/apps/ibus-typing-booster.png
|
|
|
|
%{_datadir}/icons/hicolor/22x22/apps/ibus-typing-booster.png
|
|
|
|
%{_datadir}/icons/hicolor/32x32/apps/ibus-typing-booster.png
|
|
|
|
%{_datadir}/icons/hicolor/48x48/apps/ibus-typing-booster.png
|
|
|
|
%{_datadir}/icons/hicolor/64x64/apps/ibus-typing-booster.png
|
|
|
|
%{_datadir}/icons/hicolor/128x128/apps/ibus-typing-booster.png
|
|
|
|
%{_datadir}/icons/hicolor/256x256/apps/ibus-typing-booster.png
|
|
|
|
%{_datadir}/icons/hicolor/scalable/apps/ibus-typing-booster.svg
|
2012-07-27 10:46:48 +00:00
|
|
|
%{_libexecdir}/ibus-engine-typing-booster
|
|
|
|
%{_libexecdir}/ibus-setup-typing-booster
|
2017-03-06 10:34:27 +00:00
|
|
|
%{_datadir}/applications/ibus-setup-typing-booster.desktop
|
2018-07-24 07:08:31 +00:00
|
|
|
%{_datadir}/glib-2.0/schemas/org.freedesktop.ibus.engine.typing-booster.gschema.xml
|
2017-03-06 10:34:27 +00:00
|
|
|
|
2020-05-06 08:47:45 +00:00
|
|
|
%files tests
|
|
|
|
%dir %{_libexecdir}/installed-tests
|
|
|
|
%{_libexecdir}/installed-tests/%{name}
|
|
|
|
%dir %{_datadir}/installed-tests
|
|
|
|
%{_datadir}/installed-tests/%{name}
|
|
|
|
|
2017-03-06 10:34:27 +00:00
|
|
|
%files -n emoji-picker
|
|
|
|
%{_bindir}/emoji-picker
|
2020-07-14 08:15:23 +00:00
|
|
|
%{_datadir}/metainfo/emoji-picker.appdata.xml
|
2017-03-06 10:34:27 +00:00
|
|
|
%{_datadir}/applications/emoji-picker.desktop
|
|
|
|
|
2012-07-27 10:46:48 +00:00
|
|
|
%changelog
|
2024-01-27 19:56:31 +00:00
|
|
|
%autochangelog
|