diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index eb0e7b5..04b8dc3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /lv_LV-1.0.0.oxt +/lv_LV-1.4.0.oxt diff --git a/openoffice-lv.spec b/openoffice-lv.spec index bf3c2e3..6631fe7 100644 --- a/openoffice-lv.spec +++ b/openoffice-lv.spec @@ -1,10 +1,16 @@ +%if 0%{?rhel} && 0%{?rhel} > 9 +%bcond_with mythes +%else +%bcond_without mythes +%endif + Name: openoffice-lv Summary: Latvian linguistic dictionaries -Version: 1.0.0 -Release: 10%{?dist} +Version: 1.4.0 +Release: 13%{?dist} Source: http://dict.dv.lv/download/lv_LV-%{version}.oxt URL: http://dict.dv.lv/ -License: LGPLv2+ +License: LGPL-2.1-or-later BuildArch: noarch %description @@ -24,12 +30,14 @@ Requires: hyphen %description -n hyphen-lv Latvian hyphenation rules. +%if %{with mythes} %package -n mythes-lv Summary: Latvian thesaurus Requires: mythes %description -n mythes-lv Latvian thesaurus. +%endif %prep %autosetup -c @@ -45,32 +53,93 @@ for i in README_lv_LV.txt README_hyph_lv_LV.txt; do touch -r $i $i.new mv -f $i.new $i done -chmod -x *.dic %install -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/hunspell mkdir -p $RPM_BUILD_ROOT/%{_datadir}/hyphen -mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mythes -cp -p lv_LV.dic lv_LV.aff $RPM_BUILD_ROOT/%{_datadir}/myspell +cp -p lv_LV.dic lv_LV.aff $RPM_BUILD_ROOT/%{_datadir}/hunspell cp -p hyph_lv_LV.dic $RPM_BUILD_ROOT/%{_datadir}/hyphen + +%if %{with mythes} +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mythes cp -p th_lv_LV_v2.* $RPM_BUILD_ROOT/%{_datadir}/mythes +%endif %files -n hunspell-lv %doc README_lv_LV.txt %license license.txt -%{_datadir}/myspell/* +%{_datadir}/hunspell/* %files -n hyphen-lv %doc README_hyph_lv_LV.txt %license license.txt %{_datadir}/hyphen/* +%if %{with mythes} %files -n mythes-lv %doc package-description.txt %license license.txt %{_datadir}/mythes/* +%endif %changelog +* Thu Jul 16 2026 Fedora Release Engineering - 1.4.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Fri Jan 16 2026 Fedora Release Engineering - 1.4.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Thu Jul 24 2025 Fedora Release Engineering - 1.4.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Fri Jan 17 2025 Fedora Release Engineering - 1.4.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jul 18 2024 Fedora Release Engineering - 1.4.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Apr 15 2024 Parag Nemade - 1.4.0-8 +- The mythes package is not present in RHEL10 + +* Thu Jan 25 2024 Fedora Release Engineering - 1.4.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.4.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 1.4.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Feb 24 2023 Caolán McNamara - 1.4.0-4 +- migrated to SPDX license + +* Thu Jan 19 2023 Fedora Release Engineering - 1.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 1.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 29 2022 Parag Nemade - 1.4.0-1 +- Update to 1.4.0 release +- Update hunspell dictionary directory path + https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change +- Added CI tests + +* Thu Jan 20 2022 Fedora Release Engineering - 1.0.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 1.0.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 1.0.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.0.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 1.0.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jul 25 2019 Fedora Release Engineering - 1.0.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/plans/hunspell-lv.fmf b/plans/hunspell-lv.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/hunspell-lv.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/sources b/sources index 6b970db..821f454 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fbae82fd446d7672fda484d4832eb5f2 lv_LV-1.0.0.oxt +SHA512 (lv_LV-1.4.0.oxt) = e817d960c5d013cb2ffda49c20b955f7954124642ac6214ca81286065cf2443f5c3348af91105eaa070aecafe417376d078d851cdd8056a39e012ae6510a367a diff --git a/tests/test_dic_availability.fmf b/tests/test_dic_availability.fmf new file mode 100644 index 0000000..1238583 --- /dev/null +++ b/tests/test_dic_availability.fmf @@ -0,0 +1,6 @@ +require: +- python3-enchant +- hunspell-lv +test: python3 test_dic_availability.py +framework: shell + diff --git a/tests/test_dic_availability.py b/tests/test_dic_availability.py new file mode 100644 index 0000000..e3acbde --- /dev/null +++ b/tests/test_dic_availability.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import enchant + +lang = "lv_LV" +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") diff --git a/tests/test_suggest_words.fmf b/tests/test_suggest_words.fmf new file mode 100644 index 0000000..d33fe38 --- /dev/null +++ b/tests/test_suggest_words.fmf @@ -0,0 +1,6 @@ +require: +- python3-enchant +- hunspell-lv +test: python3 test_suggest_words.py +framework: shell + diff --git a/tests/test_suggest_words.py b/tests/test_suggest_words.py new file mode 100644 index 0000000..053690f --- /dev/null +++ b/tests/test_suggest_words.py @@ -0,0 +1,9 @@ +#!/usr/bin/python3 + +import enchant + +wdlst = [ "Pēšņi", "Padies", "Sviki"] +dic = enchant.Dict("lv_LV") +for wd in wdlst: + dic.check(wd) + print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))