add symlinks in /usr/share/hunspell and provide qtwebengine dictionaries [release 2.4-4mamba;Sat Jan 08 2022]

This commit is contained in:
Silvan Calarco 2024-01-05 23:45:14 +01:00
parent f96828ae28
commit c973bf4884

View File

@ -1,7 +1,7 @@
%define pkgver %(echo %version|tr . _) %define pkgver %(echo %version|tr . _)
Name: hunspell-it Name: hunspell-it
Version: 2.4 Version: 2.4
Release: 3mamba Release: 4mamba
Summary: Italian hunspell dictionaries Summary: Italian hunspell dictionaries
Group: Applications/Text Group: Applications/Text
Vendor: openmamba Vendor: openmamba
@ -12,7 +12,11 @@ Source: http://downloads.sourceforge.net/sourceforge/linguistico/italiano
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
%ifnarch arm
BuildRequires: libQt5WebEngine
%endif
Requires: hunspell Requires: hunspell
Supplements: (hunspell and langpacks-it)
%description %description
Italian hunspell dictionaries. Italian hunspell dictionaries.
@ -34,6 +38,21 @@ for lang in $it_IT_aliases; do
ln -s it_IT.dic $lang.dic ln -s it_IT.dic $lang.dic
done 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 %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -43,8 +62,19 @@ done
%{_datadir}/myspell/it_IT.dic %{_datadir}/myspell/it_IT.dic
%{_datadir}/myspell/it_CH.aff %{_datadir}/myspell/it_CH.aff
%{_datadir}/myspell/it_CH.dic %{_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 %changelog
* Sat Jan 08 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4-4mamba
- add symlinks in /usr/share/hunspell and provide qtwebengine dictionaries
* Sat Jun 05 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4-3mamba * Sat Jun 05 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4-3mamba
- rebuilt - rebuilt