Compare commits

...

No commits in common. "c8" and "c10s" have entirely different histories.
c8 ... c10s

11 changed files with 113 additions and 10 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

3
.gitignore vendored
View File

@ -1 +1,2 @@
SOURCES/tswana_spell_checker-20150904-sm+tb+fx+an+fn.xpi
tswana__south_africa__dictionary-20091101-fx+tb.xpi
/tswana_spell_checker-20150904-sm+tb+fx+an+fn.xpi

View File

@ -1 +0,0 @@
4a0238207c915fce70a7b68c29eb914509c347e3 SOURCES/tswana_spell_checker-20150904-sm+tb+fx+an+fn.xpi

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,14 +1,20 @@
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
%global dict_dirname hunspell
%else
%global dict_dirname myspell
%endif
Name: hunspell-tn
Summary: Tswana hunspell dictionaries
%global upstreamid 20150904
Version: 0.%{upstreamid}
Release: 1%{?dist}
Release: 18%{?dist}
Source: https://addons.mozilla.org/firefox/downloads/file/347396/tswana_spell_checker-%{upstreamid}-sm+tb+fx+an+fn.xpi
URL: https://addons.mozilla.org/en-US/firefox/addon/tswana-spell-checker/
License: GPLv3+
License: GPL-3.0-or-later
BuildArch: noarch
Requires: hunspell
Requires: hunspell-filesystem
Supplements: (hunspell and langpacks-tn)
%description
@ -20,10 +26,10 @@ Tswana hunspell dictionaries.
%build
%install
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell
cp -p dictionaries/tn-ZA.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/tn_ZA.aff
cp -p dictionaries/tn-ZA.dic $RPM_BUILD_ROOT/%{_datadir}/myspell/tn_ZA.dic
pushd $RPM_BUILD_ROOT/%{_datadir}/myspell/
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}
cp -p dictionaries/tn-ZA.aff $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}/tn_ZA.aff
cp -p dictionaries/tn-ZA.dic $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}/tn_ZA.dic
pushd $RPM_BUILD_ROOT/%{_datadir}/%{dict_dirname}/
tn_ZA_aliases="tn_BW"
for lang in $tn_ZA_aliases; do
ln -s tn_ZA.aff $lang.aff
@ -34,9 +40,62 @@ popd
%files
%doc dictionaries/README_tn_ZA.txt
%{_datadir}/myspell/*
%{_datadir}/%{dict_dirname}/*
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 0.20150904-18
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 0.20150904-17
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Feb 23 2023 Caolán McNamara <caolanm@redhat.com> - 0.20091101-13
- migrated to SPDX license
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Mar 22 2022 Parag Nemade <pnemade AT redhat DOT com> - 0.20150904-10
- Add conditional for new hunspell dir path and update to Requires:
hunspell-filesystem
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.20150904-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 09 2018 Parag Nemade <pnemade AT fedoraproject DOT org> - 0.20150904-1
- Update to new upstream release 20150904

5
plans/hunspell-tn.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (tswana_spell_checker-20150904-sm+tb+fx+an+fn.xpi) = 857c1cd869980fd686c2cd6ca36d7552bb370b530a2f825d3f8a4412e207f7dd1f07920160b29361b714ca021c33a4c0707b75af88c3d9f432845c83867f0999

View File

@ -0,0 +1,6 @@
require:
- python3-enchant
- hunspell-tn
test: python3 test_dic_availability.py
framework: shell

View File

@ -0,0 +1,10 @@
#!/usr/bin/python3
import enchant
lang = "tn_ZA"
try:
dic = enchant.request_dict(lang)
print("Dictionary for {0} language is available for use".format(lang))
except enchant.errors.DictNotFoundError:
print("Dictionary is not installed for use")

View File

@ -0,0 +1,6 @@
require:
- python3-enchant
- hunspell-tn
test: python3 test_suggest_words.py
framework: shell

View File

@ -0,0 +1,9 @@
#!/usr/bin/python3
import enchant
wdlst = [ "dumelang", "mogodungwana", "phakela"]
dic = enchant.Dict("tn_ZA")
for wd in wdlst:
dic.check(wd)
print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))