%global commit eea66aff18ac14cc43fa1273afd68729be5b5e67 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate %(date +%Y%m%d) Name: openbangla-keyboard Version: 3.0.0 Release: 0.1.%{snapdate}git%{shortcommit}%{?dist} Summary: An OpenSource, Unicode compliant Bengali Input Method License: GPL-3.0-or-later URL: https://github.com/OpenBangla/OpenBangla-Keyboard Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: git BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: cargo BuildRequires: rust BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtdeclarative-devel BuildRequires: qt5-qtsvg-devel BuildRequires: ibus-devel BuildRequires: fcitx5-devel BuildRequires: fcitx5-qt-devel BuildRequires: libzstd-devel BuildRequires: hicolor-icon-theme %description OpenBangla Keyboard is an open source, Unicode compliant, Bangla input method for GNU/Linux systems. It’s a full-fledged Bangla input method with typing automation tools, includes many famous typing methods such as Avro Phonetic, Probhat, Munir Optima, National (Jatiya) etc. %package -n ibus-openbangla Summary: IBus engine for OpenBangla Keyboard Requires: %{name}%{?_isa} = %{version}-%{release} Requires: ibus %description -n ibus-openbangla IBus input method engine backend for OpenBangla Keyboard. %package -n fcitx5-openbangla Summary: Fcitx5 engine for OpenBangla Keyboard Requires: %{name}%{?_isa} = %{version}-%{release} Requires: fcitx5 %description -n fcitx5-openbangla Fcitx5 input method engine backend for OpenBangla Keyboard. %prep git clone %{url}.git %{name}-%{commit} cd %{name}-%{commit} git checkout %{commit} git submodule update --init --recursive # Move everything from the cloned subdirectory to the "root" mv * .. mv .* .. cd .. %build %cmake .. \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_BOTH=ON %cmake_build %install %cmake_install # On the host it builds as a static library, but inside mock it builds as a shared library for some reason... and cmake install doesn't handle it find . -name "liblibShared.so" -exec install -D -p -m 0755 {} %{buildroot}%{_libdir}/liblibShared.so \; %post echo "==========================================================" echo " OpenBangla Keyboard installed successfully!" echo " To use it, make sure you also install your preferred input" echo " method engine backend:" echo " - IBus: sudo dnf install ibus-openbangla" echo " - Fcitx5: sudo dnf install fcitx5-openbangla" echo "==========================================================" %files %{_bindir}/openbangla-gui %{_datadir}/openbangla-keyboard/ %{_datadir}/pixmaps/openbangla-keyboard.png %{_datadir}/applications/openbangla-keyboard.desktop %{_datadir}/metainfo/io.github.openbangla.keyboard.metainfo.xml %{_datadir}/icons/hicolor/*/apps/openbangla-keyboard.png %{_libdir}/liblibShared.so %files -n ibus-openbangla %{_libexecdir}/ibus-engine-openbangla %{_datadir}/ibus/component/openbangla.xml %files -n fcitx5-openbangla %{_libdir}/fcitx5/openbangla.so %{_datadir}/fcitx5/addon/openbangla.conf %{_datadir}/fcitx5/inputmethod/openbangla.conf %changelog * Wed Oct 21 2026 Your Name - 3.0.0-0.1.git - Initial package release