From c973bf4884943ef9ca9fee735d05fdaf730d7a4b Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:45:14 +0100 Subject: [PATCH] add symlinks in /usr/share/hunspell and provide qtwebengine dictionaries [release 2.4-4mamba;Sat Jan 08 2022] --- hunspell-it.spec | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/hunspell-it.spec b/hunspell-it.spec index 1bc7e5b..d2d37d9 100644 --- a/hunspell-it.spec +++ b/hunspell-it.spec @@ -1,7 +1,7 @@ %define pkgver %(echo %version|tr . _) Name: hunspell-it Version: 2.4 -Release: 3mamba +Release: 4mamba Summary: Italian hunspell dictionaries Group: Applications/Text Vendor: openmamba @@ -12,7 +12,11 @@ Source: http://downloads.sourceforge.net/sourceforge/linguistico/italiano License: GPL ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END +%ifnarch arm +BuildRequires: libQt5WebEngine +%endif Requires: hunspell +Supplements: (hunspell and langpacks-it) %description Italian hunspell dictionaries. @@ -34,6 +38,21 @@ for lang in $it_IT_aliases; do ln -s it_IT.dic $lang.dic done +# Hunspell symlinks +install -d %{buildroot}%{_datadir}/hunspell/ +for file in %{buildroot}%{_datadir}/myspell/*; do + ln -sv ../myspell/$(basename $file) %{buildroot}%{_datadir}/hunspell/ +done + +%ifnarch arm +# Install webengine dictionaries +install -d %{buildroot}%{_datadir}/qt/qtwebengine_dictionaries/ + for _file in %{buildroot}%{_datadir}/myspell/*.dic; do + _filename=$(basename $_file) + QT_WEBENGINE_ICU_DATA_DIR=%{_datadir}/qt5/resources %{_libdir}/qt5/bin/qwebengine_convert_dict $_file %{buildroot}%{_datadir}/qt/qtwebengine_dictionaries/${_filename/\.dic/\.bdic} +done +%endif + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -43,8 +62,19 @@ done %{_datadir}/myspell/it_IT.dic %{_datadir}/myspell/it_CH.aff %{_datadir}/myspell/it_CH.dic +%{_datadir}/hunspell/it_CH.aff +%{_datadir}/hunspell/it_CH.dic +%{_datadir}/hunspell/it_IT.aff +%{_datadir}/hunspell/it_IT.dic +%ifnarch arm +%{_datadir}/qt/qtwebengine_dictionaries/it_CH.bdic +%{_datadir}/qt/qtwebengine_dictionaries/it_IT.bdic +%endif %changelog +* Sat Jan 08 2022 Silvan Calarco 2.4-4mamba +- add symlinks in /usr/share/hunspell and provide qtwebengine dictionaries + * Sat Jun 05 2021 Silvan Calarco 2.4-3mamba - rebuilt