From 1a5691e4fcbe98e1ffdbcc01490bf30b4044781a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 15 Oct 2020 12:34:56 +0200 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/hunspell-bn#0cede4680dad64296be6245a442bbb90c8e42943 --- .gitignore | 3 + hunspell-bn.spec | 118 +++++++++++++++++++++++++ sources | 1 + tests/scripts/run_tests.sh | 4 + tests/scripts/test_dic_availability.py | 10 +++ tests/scripts/test_suggest_words.py | 9 ++ tests/tests.yml | 11 +++ 7 files changed, 156 insertions(+) create mode 100644 hunspell-bn.spec create mode 100644 sources create mode 100644 tests/scripts/run_tests.sh create mode 100644 tests/scripts/test_dic_availability.py create mode 100644 tests/scripts/test_suggest_words.py create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index e69de29..b50ed8a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +hunspell-bn-0.04.tar.bz2 +/hunspell-bn-0.06.tar.bz2 +/bn_in.1.0.0.tar.gz diff --git a/hunspell-bn.spec b/hunspell-bn.spec new file mode 100644 index 0000000..693a75b --- /dev/null +++ b/hunspell-bn.spec @@ -0,0 +1,118 @@ +Name: hunspell-bn +Summary: Bengali hunspell dictionaries +Version: 1.0.0 +Release: 14%{?dist} +Epoch: 1 +Source: http://anishpatil.fedorapeople.org/bn_in.%{version}.tar.gz +URL: https://gitorious.org/hunspell_dictionaries/hunspell_dictionaries.git +License: GPLv2+ +BuildArch: noarch + +Requires: hunspell +Supplements: (hunspell and langpacks-bn) + +%description +Bengali hunspell dictionaries. + +%prep +%autosetup -c -n bn_IN +# fix file permissions +chmod 644 bn_IN/* + +%build + +%install +mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell +cp -p bn_IN/*.dic bn_IN/*.aff $RPM_BUILD_ROOT/%{_datadir}/myspell + + +%files +%doc bn_IN/README +%license bn_IN/COPYING bn_IN/Copyright +%{_datadir}/myspell/* + +%changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1:1.0.0-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 1:1.0.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1:1.0.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1:1.0.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1:1.0.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 1:1.0.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Sep 28 2017 Parag Nemade - 1:1.0.0-8 +- Fix the upstream URL (rh#1294622) + +* Wed Jul 26 2017 Fedora Release Engineering - 1:1.0.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1:1.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 19 2016 Parag Nemade - 1:1.0.0-5 +- Add Supplements: tag for langpacks naming guidelines +- Clean the specfile to follow current packaging guidelines + +* Wed Feb 03 2016 Fedora Release Engineering - 1:1.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1:1.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1:1.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat May 17 2014 Anish Patil - 1:1.0.0-1 +- Upstream has changed and built with new tarball + +* Sat Aug 03 2013 Fedora Release Engineering - 1:0.06-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1:0.06-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 1:0.06-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Feb 28 2012 Parag - 1:0.06-1 +- Update to 0.06 release + +* Fri Jan 13 2012 Fedora Release Engineering - 1:0.04-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 1:0.04-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Mar 25 2010 Parag - 1:0.04-2 +- Resolves:rh#576774 - newer release 0.04 made symlink to bn_BD nonexistent + +* Tue Mar 09 2010 Parag - 1:0.04-1 +- Resolves:rh#571712 - Should use correct version what upstream provides by adding epoch + +* Fri Jul 24 2009 Fedora Release Engineering - 20080201-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 20080201-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Sep 08 2008 Parag - 20080201-1 +- update to latest release. + +* Tue Sep 02 2008 Caolán McNamara - 20050726-3 +- add bn_BD alias + +* Sun Jan 06 2008 Parag - 20050726-2 +- Added Copyright and corrected changelog version. + +* Thu Jan 03 2008 Parag - 20050726-1 +- Initial Fedora release diff --git a/sources b/sources new file mode 100644 index 0000000..e2b41e0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +6c2d223ea285bd564a9e156af847b9da bn_in.1.0.0.tar.gz diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh new file mode 100644 index 0000000..80d965a --- /dev/null +++ b/tests/scripts/run_tests.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +python3 test_suggest_words.py +python3 test_dic_availability.py diff --git a/tests/scripts/test_dic_availability.py b/tests/scripts/test_dic_availability.py new file mode 100644 index 0000000..fc9e313 --- /dev/null +++ b/tests/scripts/test_dic_availability.py @@ -0,0 +1,10 @@ +#!/usr/bin/python3 + +import enchant + +lang = "bn_IN" +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/scripts/test_suggest_words.py b/tests/scripts/test_suggest_words.py new file mode 100644 index 0000000..387263f --- /dev/null +++ b/tests/scripts/test_suggest_words.py @@ -0,0 +1,9 @@ +#!/usr/bin/python3 + +import enchant + +wdlst = [ "হ্যাল", "ডিনা", "বাঙল", "বঙ্গ"] +dic = enchant.Dict("bn_IN") +for wd in wdlst: + dic.check(wd) + print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd))) diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..5ffb74a --- /dev/null +++ b/tests/tests.yml @@ -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