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

This commit is contained in:
Parag Nemade 2022-03-22 13:26:09 +05:30
parent 9716d5a43f
commit 52256cf778
No known key found for this signature in database
GPG Key ID: 71932951EB71E972

View File

@ -1,8 +1,14 @@
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
%global dict_dirname hunspell
%else
%global dict_dirname myspell
%endif
Name: hunspell-ms
Summary: Malay hunspell dictionaries
%global upstreamid 20050117
Version: 0.%{upstreamid}
Release: 25%{?dist}
Release: 26%{?dist}
Source: http://download.services.openoffice.org/contrib/dictionaries/ms_MY.zip
URL: https://wiki.openoffice.org/wiki/Dictionaries
# affix file is under GPL+
@ -10,7 +16,7 @@ URL: https://wiki.openoffice.org/wiki/Dictionaries
License: GFDL and GPL+
BuildArch: noarch
Requires: hunspell
Requires: hunspell-filesystem
Supplements: (hunspell and langpacks-ms)
%description
@ -23,10 +29,10 @@ Malay hunspell dictionaries.
chmod -x *
%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}/
ms_MY_aliases="ms_BN"
for lang in $ms_MY_aliases; do
ln -s ms_MY.aff $lang.aff
@ -36,9 +42,13 @@ done
%files
%doc README_ms_MY.txt
%{_datadir}/myspell/*
%{_datadir}/%{dict_dirname}/*
%changelog
* Tue Mar 22 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.20050117-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.20050117-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild