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

This commit is contained in:
Parag Nemade 2022-03-22 14:15:55 +05:30
parent 38af3e0b23
commit 07f4cc4760
No known key found for this signature in database
GPG Key ID: 71932951EB71E972

View File

@ -1,7 +1,13 @@
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
%global dict_dirname hunspell
%else
%global dict_dirname myspell
%endif
Name: hunspell-ur
Summary: Urdu hunspell dictionaries
Version: 0.64
Release: 22%{?dist}
Release: 23%{?dist}
#http://urdudictionary.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=30004#DownloadId=74761
#and click yes to agree to LGPLv2+, which stinks as a download-url :-(
Source: UrduDictionary.xpi
@ -10,7 +16,7 @@ License: LGPLv2+
BuildArch: noarch
BuildRequires: redland
Requires: hunspell
Requires: hunspell-filesystem
Supplements: (hunspell and langpacks-ur)
%description
@ -24,10 +30,10 @@ rdfproc hunspell-ur parse install.rdf
rdfproc hunspell-ur print | grep install-manifest | grep -v targetApplication | sed -e 's/.*#//' | sed -e 's/], "/: /'| sed -e 's/"}//' > CREDITS
%install
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell
cp -p dictionaries/ur.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/ur_PK.aff
cp -p dictionaries/ur.dic $RPM_BUILD_ROOT/%{_datadir}/myspell/ur_PK.dic
pushd $RPM_BUILD_ROOT/%{_datadir}/myspell/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}
cp -p dictionaries/ur.aff $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}/ur_PK.aff
cp -p dictionaries/ur.dic $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}/ur_PK.dic
pushd $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}/
ur_PK_aliases="ur_IN"
for lang in $ur_PK_aliases; do
ln -s ur_PK.aff $lang.aff
@ -38,9 +44,13 @@ popd
%files
%doc CREDITS
%{_datadir}/myspell/*
%{_datadir}/%{dict_dirname}/*
%changelog
* Tue Mar 22 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.64-23
- Add conditional for new hunspell dir path and update to Requires:
hunspell-filesystem
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.64-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild