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

This commit is contained in:
Parag Nemade 2022-03-22 13:38:13 +05:30
parent ca6fe6df3a
commit 27b216be70
No known key found for this signature in database
GPG Key ID: 71932951EB71E972

View File

@ -1,17 +1,23 @@
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
%global dict_dirname hunspell
%else
%global dict_dirname myspell
%endif
Name: hunspell-sw
Summary: Swahili hunspell dictionaries
%global upstreamid 20050819
Version: 0.%{upstreamid}
Release: 25%{?dist}
Release: 26%{?dist}
# Following link is not working and is dead
# do not report any bugs for this
Source: http://www.it46.se/downloads/openoffice/dictionary/dictionary_myspell_sw_TZ_1.1.tar.gz
URL: http://www.it46.se
License: LGPLv2+
BuildArch: noarch
BuildRequires: hunspell-devel
BuildRequires: hunspell-filesystem-devel
Requires: hunspell
Requires: hunspell-filesystem
Supplements: (hunspell and langpacks-sw)
%description
@ -33,9 +39,9 @@ for i in README_sw_TZ.txt; do
done
%install
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell
cp -p *.dic *.aff $RPM_BUILD_ROOT/%{_datadir}/myspell
pushd $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}/%{dict_dirname}/
sw_TZ_aliases="sw_KE"
for lang in $sw_TZ_aliases; do
ln -s sw_TZ.aff $lang.aff
@ -46,9 +52,13 @@ popd
%files
%doc README_sw_TZ.txt
%{_datadir}/myspell/*
%{_datadir}/%{dict_dirname}/*
%changelog
* Tue Mar 22 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.20050819-26
- Add conditional for new hunspell dir path and update to Requires:
hunspell-filesystem
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.20050819-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild