From a2189c94c0ce4573d324c3f9c3b16186ce3f6288 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 23:45:05 +0100 Subject: [PATCH] install hunspell symlinks and qtwebengine dictionaries [release 2.6-2mamba;Sat Jan 08 2022] --- hunspell-es.spec | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/hunspell-es.spec b/hunspell-es.spec index cb982dc..c6c823e 100644 --- a/hunspell-es.spec +++ b/hunspell-es.spec @@ -1,7 +1,7 @@ Name: hunspell-es Epoch: 1 Version: 2.6 -Release: 1mamba +Release: 2mamba Summary: Spanish hunspell dictionaries Group: System/Internationalization Vendor: openmamba @@ -10,9 +10,13 @@ Packager: Silvan Calarco URL: https://github.com/sbosio/rla-es Source: https://github.com/sbosio/rla-es.git/v%{version}/rla-es-%{version}.tar.bz2 License: GPL, LGPL, MPL 1.1 -Requires: hunspell ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END +%ifnarch arm +BuildRequires: libQt5WebEngine +%endif +Requires: hunspell +Supplements: (hunspell and langpacks-es) %description %{summary}. @@ -70,6 +74,21 @@ for lang in ${LANGS}; do ln -s th_es_v2.dat %{buildroot}%{_datadir}/mythes/th_es_${lang}_v2.dat 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}" @@ -77,6 +96,11 @@ done %defattr(-,root,root) %{_datadir}/myspell/es_*.dic %{_datadir}/myspell/es_*.aff +%{_datadir}/hunspell/es_*.dic +%{_datadir}/hunspell/es_*.aff +%ifnarch arm +%{_datadir}/qt/qtwebengine_dictionaries/es_*.bdic +%endif %doc LICENSE.md %files -n hyphen-es @@ -91,6 +115,9 @@ done %doc LICENSE.md %changelog +* Sat Jan 08 2022 Silvan Calarco 2.6-2mamba +- install hunspell symlinks and qtwebengine dictionaries + * Tue Jan 04 2022 Silvan Calarco 2.6-1mamba - update to 2.6