%global upstream_release 1 Name: ibus-ngosen Version: 1.5.1 Release: %autorelease Summary: Vietnamese input method for IBus # Ngó Sen: GPL-3.0-or-later # Typing core (bamboo-rs/): LGPL-2.1-or-later # Vietnamese word list: GPL-3.0-or-later # English word lists: LicenseRef-SCOWL # Emoji keywords: Unicode-3.0 # Statically linked crates: see LICENSE.dependencies SourceLicense: GPL-3.0-or-later AND LGPL-2.1-or-later AND LicenseRef-SCOWL AND Unicode-3.0 License: %{shrink: GPL-3.0-or-later AND LGPL-2.1-or-later AND LicenseRef-SCOWL AND Unicode-3.0 AND MIT AND (MIT OR Apache-2.0) } URL: https://github.com/ngosen/ibus-ngosen # The release tarball, unlike GitHub's tag archive, carries the ngosen submodule. Source0: %{url}/releases/download/%{name}-%{version}-%{upstream_release}/%{name}-%{version}.tar.gz BuildRequires: cargo-rpm-macros >= 26 BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: libappstream-glib BuildRequires: python3-devel BuildRequires: pkgconfig(ibus-1.0) >= 1.5.27 Requires: ibus >= 1.5.27 Requires: hicolor-icon-theme Requires: python3-gobject Requires: gtk4 Requires: libadwaita >= 1.5 # Loaded with dlopen on X11 to watch clicks and press keys. Requires: libxcb%{?_isa} # The two editions of Ngó Sen both install /usr/bin/ngosen-toggle. Conflicts: fcitx5-ngosen %description Ngó Sen types Vietnamese through IBus, the input method GNOME comes with. It types straight into apps that report the text around the cursor and underlines the word being typed elsewhere; the typing mode can be picked for each app. A tap of Ctrl+Shift switches between English and Vietnamese. %prep %autosetup rm -rf ngosen/bamboo-rs/vendor cd ngosen/bamboo-rs %cargo_prep %generate_buildrequires cd ngosen/bamboo-rs %cargo_generate_buildrequires %build # The daemon tests need a session bus and a running ibus-daemon. %cmake \ -DNGOSEN_VENDORED_CRATES:BOOL=OFF \ -DNGOSEN_IBUS_DAEMON_TESTS:BOOL=OFF %cmake_build cd ngosen/bamboo-rs %{cargo_license_summary} %{cargo_license} > ../../LICENSE.dependencies %install %cmake_install %find_lang %{name} %py_byte_compile %{python3} %{buildroot}%{_datadir}/%{name}/settings # Only GNOME 50.0-50.3 needs it, and Fedora ships newer GNOME releases. rm -rf %{buildroot}%{_datadir}/gnome-shell/extensions/forward-keys@ngosen.github.io # These only matter to kitty in X11 sessions, which Fedora's GNOME no longer has. rm %{buildroot}%{_prefix}/lib/environment.d/60-ibus-ngosen.conf rm %{buildroot}%{_sysconfdir}/profile.d/ibus-ngosen.sh # Shipped with %%license instead. rm %{buildroot}%{_datadir}/%{name}/*.license %{buildroot}%{_datadir}/%{name}/LICENSE.vietnamese.cm.dict %check %ctest --no-tests=error desktop-file-validate %{buildroot}%{_datadir}/applications/ibus-setup-ngosen.desktop appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/io.github.ngosen.IBusNgoSen.metainfo.xml %files -f %{name}.lang %license LICENSE ngosen/LICENSES/LGPL-2.1-or-later.txt ngosen/LICENSES/Unicode-3.0.txt %license ngosen/data/dictionaries/LICENSE.vietnamese.cm.dict ngosen/data/english-common.txt.license %license LICENSE.dependencies %doc README.md %{_libexecdir}/ibus-engine-ngosen %{_libexecdir}/ibus-setup-ngosen %{_bindir}/ngosen-toggle %{_datadir}/ibus/component/ngosen.xml %{_datadir}/%{name}/ %{_datadir}/applications/ibus-setup-ngosen.desktop %{_metainfodir}/io.github.ngosen.IBusNgoSen.metainfo.xml %{_datadir}/icons/hicolor/scalable/apps/*.svg %changelog %autochangelog