Blame ibus-typing-booster.spec.suse

Packit Service 6a275b
# spec file for package ibus-typing-booster
Packit Service 6a275b
#
Packit Service 6a275b
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
Packit Service 6a275b
#
Packit Service 6a275b
# All modifications and additions to the file contributed by third parties
Packit Service 6a275b
# remain the property of their copyright owners, unless otherwise agreed
Packit Service 6a275b
# upon. The license for this file, and modifications and additions to the
Packit Service 6a275b
# file, is the same license as for the pristine package itself (unless the
Packit Service 6a275b
# license for the pristine package is not an Open Source License, in which
Packit Service 6a275b
# case the license is the MIT License). An "Open Source License" is a
Packit Service 6a275b
# license that conforms to the Open Source Definition (Version 1.9)
Packit Service 6a275b
# published by the Open Source Initiative.
Packit Service 6a275b
Packit Service 6a275b
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Packit Service 6a275b
#
Packit Service 6a275b
Packit Service 6a275b
Name:           ibus-typing-booster
Packit Service 6a275b
Version:        1.5.34
Packit Service 6a275b
Release:        0 
Packit Service 6a275b
Summary:        An input completion utility
Packit Service 6a275b
License:        GPL-3.0+
Packit Service 6a275b
Group:          System/X11/Utilities
Packit Service 6a275b
URL:            https://mike-fabian.github.io/ibus-typing-booster/
Packit Service 6a275b
Source0:        https://github.com/mike-fabian/ibus-typing-booster/releases/download/%{version}/%{name}-%{version}.tar.gz
Packit Service 6a275b
Source1:        https://releases.pagure.org/inscript2/inscript2-20160423.tar.gz
Packit Service 6a275b
BuildRequires:  ibus-devel
Packit Service 6a275b
BuildRequires:  python3
Packit Service 6a275b
BuildRequires:  python3-devel
Packit Service 6a275b
BuildRequires:  desktop-file-utils
Packit Service 6a275b
BuildRequires:  python3-gobject
Packit Service 6a275b
BuildRequires:  dbus-1-x11
Packit Service 6a275b
BuildRequires:  fdupes
Packit Service 6a275b
BuildRequires:  update-desktop-files
Packit Service 6a275b
# for the unit tests
Packit Service 6a275b
BuildRequires:  m17n-lib
Packit Service 6a275b
BuildRequires:  m17n-db
Packit Service 6a275b
BuildRequires:  python3-pyenchant
Packit Service 6a275b
%if 0%{?sle_version} >= 120200
Packit Service 6a275b
BuildRequires:  python3-pyxdg
Packit Service 6a275b
%endif
Packit Service 6a275b
%if 0%{?suse_version} == 1320
Packit Service 6a275b
BuildRequires:  myspell-cs_CZ
Packit Service 6a275b
BuildRequires:  myspell-de
Packit Service 6a275b
BuildRequires:  myspell-en
Packit Service 6a275b
BuildRequires:  myspell-es
Packit Service 6a275b
BuildRequires:  myspell-it_IT
Packit Service 6a275b
%else
Packit Service 6a275b
BuildRequires:  myspell-cs_CZ
Packit Service 6a275b
BuildRequires:  myspell-de
Packit Service 6a275b
BuildRequires:  myspell-de_DE
Packit Service 6a275b
BuildRequires:  myspell-en
Packit Service 6a275b
BuildRequires:  myspell-en_US
Packit Service 6a275b
BuildRequires:  myspell-es
Packit Service 6a275b
BuildRequires:  myspell-es_ES
Packit Service 6a275b
BuildRequires:  myspell-fr_FR
Packit Service 6a275b
BuildRequires:  myspell-it_IT
Packit Service 6a275b
%endif
Packit Service 6a275b
#
Packit Service 6a275b
Requires:       ibus >= 1.5.3
Packit Service 6a275b
Requires:       m17n-lib
Packit Service 6a275b
Requires:       python3 >= 3.3
Packit Service 6a275b
Requires:       dbus-1-python3
Packit Service 6a275b
Requires:       python3-pyenchant
Packit Service 6a275b
Requires:       python3-pyxdg
Packit Service 6a275b
# Recommend reasonably good fonts which have most of the emoji:
Packit Service 6a275b
Recommends:     noto-coloremoji-fonts
Packit Service 6a275b
Recommends:     gdouros-symbola-fonts
Packit Service 6a275b
#
Packit Service 6a275b
Packit Service 6a275b
%description
Packit Service 6a275b
Ibus-typing-booster is a context sensitive completion
Packit Service 6a275b
input method to speedup typing.
Packit Service 6a275b
Packit Service 6a275b
%prep
Packit Service 6a275b
%setup -q
Packit Service 6a275b
##extract inscript2 maps
Packit Service 6a275b
tar xzf %{SOURCE1}
Packit Service 6a275b
Packit Service 6a275b
%build
Packit Service 6a275b
export PYTHON=%{_bindir}/python3
Packit Service 6a275b
%configure --disable-static --disable-additional --libexecdir=%{_libdir}/ibus
Packit Service 6a275b
make %{?_smp_mflags}
Packit Service 6a275b
Packit Service 6a275b
%install
Packit Service 6a275b
export PYTHON=%{_bindir}/python3
Packit Service 6a275b
make install DESTDIR=%{buildroot} NO_INDEX=true
Packit Service 6a275b
gzip -n --force --best %{buildroot}/%{_datadir}/%{name}/data/*.{txt,json} \
Packit Service 6a275b
    %{buildroot}/%{_datadir}/%{name}/data/annotations/*.xml \
Packit Service 6a275b
    %{buildroot}/%{_datadir}/%{name}/data/annotationsDerived/*.xml
Packit Service 6a275b
Packit Service 6a275b
#install inscript2 keymaps
Packit Service 6a275b
test -d %{buildroot}%{_datadir}/m17n/icons || mkdir -p %{buildroot}%{_datadir}/m17n/icons
Packit Service 6a275b
cp -p inscript2/IM/* %{buildroot}%{_datadir}/m17n/
Packit Service 6a275b
cp -p inscript2/icons/* %{buildroot}%{_datadir}/m17n/icons
Packit Service 6a275b
Packit Service 6a275b
%suse_update_desktop_file -i -u emoji-picker GTK Utility
Packit Service 6a275b
Packit Service 6a275b
%fdupes %{buildroot}/%{_prefix}
Packit Service 6a275b
Packit Service 6a275b
%find_lang %{name}
Packit Service 6a275b
Packit Service 6a275b
%check
Packit Service 6a275b
export LC_ALL=en_US.UTF-8
Packit Service 6a275b
export M17NDIR=%{buildroot}%{_datadir}/m17n/
Packit Service 6a275b
desktop-file-validate \
Packit Service 6a275b
    %{buildroot}%{_datadir}/applications/ibus-setup-typing-booster.desktop
Packit Service 6a275b
pushd engine
Packit Service 6a275b
    # run doctests
Packit Service 6a275b
    python3 hunspell_suggest.py
Packit Service 6a275b
    python3 m17n_translit.py
Packit Service 6a275b
    python3 itb_emoji.py
Packit Service 6a275b
    python3 itb_util.py
Packit Service 6a275b
popd
Packit Service 6a275b
eval $(dbus-launch --sh-syntax)
Packit Service 6a275b
dconf dump /
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/offtherecord false
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/usedigitsasselectkeys true
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/tabenable false
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/inputmethod "'NoIme'"
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/adddirectinput false
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/rememberlastusedpreeditime true
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/mincharcomplete 1
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/dictionary "'en_US'"
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/emojipredictions true
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/autocommitcharacters "''"
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/pagesize 6
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/shownumberofcandidates true
Packit Service 6a275b
dconf write /desktop/ibus/engine/typing-booster/typing-booster-de-de/showstatusinfoinaux true
Packit Service 6a275b
dconf dump /
Packit Service 6a275b
ibus-daemon -drx
Packit Service 6a275b
make check || cat ./tests/test-suite.log
Packit Service 6a275b
Packit Service 6a275b
%post
Packit Service 6a275b
[ -x %{_bindir}/ibus ] && \
Packit Service 6a275b
  %{_bindir}/ibus write-cache --system &>/dev/null || :
Packit Service 6a275b
Packit Service 6a275b
%postun
Packit Service 6a275b
[ -x %{_bindir}/ibus ] && \
Packit Service 6a275b
  %{_bindir}/ibus write-cache --system &>/dev/null || :
Packit Service 6a275b
Packit Service 6a275b
%files -f %{name}.lang
Packit Service 6a275b
%doc AUTHORS COPYING README
Packit Service 6a275b
%{_bindir}/emoji-picker
Packit Service 6a275b
%{_datadir}/%{name}
Packit Service 6a275b
%dir %{_datadir}/metainfo
Packit Service 6a275b
%{_datadir}/metainfo/*.appdata.xml
Packit Service 6a275b
%{_datadir}/ibus/component/typing-booster.xml
Packit Service 6a275b
%{_libdir}/ibus/ibus-engine-typing-booster
Packit Service 6a275b
%{_libdir}/ibus/ibus-setup-typing-booster
Packit Service 6a275b
%{_datadir}/applications/*.desktop
Packit Service 6a275b
%dir %{_datadir}/m17n
Packit Service 6a275b
%{_datadir}/m17n/*.mim
Packit Service 6a275b
%dir %{_datadir}/m17n/icons
Packit Service 6a275b
%{_datadir}/m17n/icons/*.png
Packit Service 6a275b
Packit Service 6a275b
%changelog