Add conditional for new hunspell dir path and update to Requires: hunspell-filesystem

This commit is contained in:
Parag Nemade 2022-03-22 10:06:53 +05:30
parent 1c32bad217
commit 651095e902
No known key found for this signature in database
GPG Key ID: 71932951EB71E972

View File

@ -1,15 +1,21 @@
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
%global dict_dirname hunspell
%else
%global dict_dirname myspell
%endif
Name: hunspell-af
Summary: Afrikaans hunspell dictionary
%global upstreamid 20080825
Version: 0.%{upstreamid}
Release: 24%{?dist}
Release: 25%{?dist}
# Following URL is dead now
Source: http://downloads.translate.org.za/spellchecker/afrikaans/myspell-af_ZA-0.%{upstreamid}.zip
URL: http://www.translate.org.za/
License: LGPLv2+
BuildArch: noarch
Requires: hunspell
Requires: hunspell-filesystem
Supplements: (hunspell and langpacks-af)
%description
@ -21,10 +27,10 @@ Afrikaans hunspell dictionary
%build
%install
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell
cp -p *.dic *.aff $RPM_BUILD_ROOT/%{_datadir}/myspell
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}
cp -p *.dic *.aff $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}
pushd $RPM_BUILD_ROOT/%{_datadir}/myspell/
pushd $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}/
af_ZA_aliases="af_NA"
for lang in $af_ZA_aliases; do
ln -s af_ZA.aff $lang.aff
@ -35,9 +41,13 @@ popd
%files
%doc README_af_ZA.txt
%{_datadir}/myspell/*
%{_datadir}/%{dict_dirname}/*
%changelog
* Tue Mar 22 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.20080825-25
- Add conditional for new hunspell dir path and update to Requires:
hunspell-filesystem
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.20080825-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild