Update to 1.4.0 release
Update hunspell dictionary directory path https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change Added CI tests Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
This commit is contained in:
parent
e6d27b6a74
commit
629d25519c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/lv_LV-1.0.0.oxt
|
/lv_LV-1.0.0.oxt
|
||||||
|
/lv_LV-1.4.0.oxt
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Name: openoffice-lv
|
Name: openoffice-lv
|
||||||
Summary: Latvian linguistic dictionaries
|
Summary: Latvian linguistic dictionaries
|
||||||
Version: 1.0.0
|
Version: 1.4.0
|
||||||
Release: 15%{?dist}
|
Release: 1%{?dist}
|
||||||
Source: http://dict.dv.lv/download/lv_LV-%{version}.oxt
|
Source: http://dict.dv.lv/download/lv_LV-%{version}.oxt
|
||||||
URL: http://dict.dv.lv/
|
URL: http://dict.dv.lv/
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
@ -45,20 +45,19 @@ for i in README_lv_LV.txt README_hyph_lv_LV.txt; do
|
|||||||
touch -r $i $i.new
|
touch -r $i $i.new
|
||||||
mv -f $i.new $i
|
mv -f $i.new $i
|
||||||
done
|
done
|
||||||
chmod -x *.dic
|
|
||||||
|
|
||||||
%install
|
%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}/hyphen
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mythes
|
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
|
cp -p hyph_lv_LV.dic $RPM_BUILD_ROOT/%{_datadir}/hyphen
|
||||||
cp -p th_lv_LV_v2.* $RPM_BUILD_ROOT/%{_datadir}/mythes
|
cp -p th_lv_LV_v2.* $RPM_BUILD_ROOT/%{_datadir}/mythes
|
||||||
|
|
||||||
%files -n hunspell-lv
|
%files -n hunspell-lv
|
||||||
%doc README_lv_LV.txt
|
%doc README_lv_LV.txt
|
||||||
%license license.txt
|
%license license.txt
|
||||||
%{_datadir}/myspell/*
|
%{_datadir}/hunspell/*
|
||||||
|
|
||||||
%files -n hyphen-lv
|
%files -n hyphen-lv
|
||||||
%doc README_hyph_lv_LV.txt
|
%doc README_hyph_lv_LV.txt
|
||||||
@ -71,6 +70,12 @@ cp -p th_lv_LV_v2.* $RPM_BUILD_ROOT/%{_datadir}/mythes
|
|||||||
%{_datadir}/mythes/*
|
%{_datadir}/mythes/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 29 2022 Parag Nemade <pnemade AT redhat DOT com> - 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 <releng@fedoraproject.org> - 1.0.0-15
|
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-15
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
fbae82fd446d7672fda484d4832eb5f2 lv_LV-1.0.0.oxt
|
SHA512 (lv_LV-1.4.0.oxt) = e817d960c5d013cb2ffda49c20b955f7954124642ac6214ca81286065cf2443f5c3348af91105eaa070aecafe417376d078d851cdd8056a39e012ae6510a367a
|
||||||
|
4
tests/scripts/run_tests.sh
Normal file
4
tests/scripts/run_tests.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
python3 test_suggest_words.py
|
||||||
|
python3 test_dic_availability.py
|
10
tests/scripts/test_dic_availability.py
Normal file
10
tests/scripts/test_dic_availability.py
Normal file
@ -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")
|
9
tests/scripts/test_suggest_words.py
Normal file
9
tests/scripts/test_suggest_words.py
Normal file
@ -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)))
|
11
tests/tests.yml
Normal file
11
tests/tests.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
roles:
|
||||||
|
- role: standard-test-basic
|
||||||
|
required_packages:
|
||||||
|
- python3-enchant
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
tests:
|
||||||
|
- sample:
|
||||||
|
dir: scripts/
|
||||||
|
run: ./run_tests.sh
|
Loading…
Reference in New Issue
Block a user