hunspell-it/hunspell-it.spec

86 lines
2.5 KiB
RPMSpec
Raw Normal View History

%define pkgver %(echo %version|tr . _)
Name: hunspell-it
Version: 2.4
Release: 4mamba
Summary: Italian hunspell dictionaries
Group: Applications/Text
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://linguistico.sourceforge.net
Source: http://downloads.sourceforge.net/sourceforge/linguistico/italiano_%{pkgver}_2007_09_01.zip
License: GPL
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
%ifnarch arm
BuildRequires: libQt5WebEngine
%endif
Requires: hunspell
Supplements: (hunspell and langpacks-it)
%description
Italian hunspell dictionaries.
%prep
%setup -q -c -n hunspell-it
%build
chmod -x *
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -d %{buildroot}%{_datadir}/myspell
cp -p *.dic *.aff %{buildroot}%{_datadir}/myspell
pushd %{buildroot}%{_datadir}/myspell
it_IT_aliases="it_CH"
for lang in $it_IT_aliases; do
ln -s it_IT.aff $lang.aff
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}"
%files
%defattr(-,root,root)
%{_datadir}/myspell/it_IT.aff
%{_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 <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
- rebuilt
* Tue Jul 16 2013 Automatic Build System <autodist@mambasoft.it> 2.4-2mamba
- automatic rebuild by autodist
* Thu Jul 02 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4-1mamba
- package created by autospec