Compare commits

...

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

15 changed files with 165 additions and 63 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

3
.gitignore vendored
View File

@ -1 +1,2 @@
SOURCES/hspell-1.4.tar.gz /hspell-1.3.tar.gz
/hspell-1.4.tar.gz

View File

@ -1 +0,0 @@
dc0bcc7847e3a2e87487c45f77436498b788c358 SOURCES/hspell-1.4.tar.gz

View File

@ -1,43 +0,0 @@
diff -urN hspell-1.4.old/Makefile.in hspell-1.4/Makefile.in
--- hspell-1.4.old/Makefile.in 2017-06-23 03:02:50.000000000 +0530
+++ hspell-1.4/Makefile.in 2018-09-20 11:12:50.241459999 +0530
@@ -306,19 +306,6 @@
mk_he_affix.o: prefixes.c hspell.h
-# The "he_affix.dat" and "he.wl" files are the two files basic files which
-# together form an Aspell 0.6 dictionary.
-.PHONY: aspell
-aspell: he_affix.dat he.wl
-he.wl: mk_he_affix wunzip hebrew.wgz hebrew.wgz.prefixes specfilter
- ./mk_he_affix 0 he_affix.dat he.wl
-he_affix.dat: he.wl
-
-# Aspell runtime prefers a hash-table dump which can be mmapped, instead of
-# the textual word format:
-he.rws: he.wl
- aspell --lang=he create master ./he.rws < he.wl
-
# The "he.dic" and "he.aff" files are the two files basic files which
# form a Hunspell dictionary; Hunspell is the multilingual spellchecker used
# by Firefox, OpenOffice, and many other projects. The format of these files
@@ -346,5 +333,5 @@
# A (very small number of) automated tests
.PHONY: test
-test: hspell hebrew.wgz.sizes he.rws hunspell
+test: hspell hebrew.wgz.sizes hunspell
test/test1
diff -urN hspell-1.4.old/test/test1 hspell-1.4/test/test1
--- hspell-1.4.old/test/test1 2012-02-27 04:23:23.000000000 +0530
+++ hspell-1.4/test/test1 2018-09-20 11:13:02.437284530 +0530
@@ -79,9 +79,6 @@
cat $DIR/test1.dat|
test_all hspell ./hspell -Dhebrew.wgz -a
-cat $DIR/test1.dat|
-test_all aspell aspell --dict-dir=. -d he.rws -a
-
iconv -f iso-8859-8 -t utf-8 $DIR/test1.dat |
test_all hunspell hunspell -i utf-8 -d `pwd`/he -a

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,15 @@
Summary: A Hebrew spell checker Summary: A Hebrew spell checker
Name: hspell Name: hspell
Version: 1.4 Version: 1.4
Release: 6%{?dist} Release: 23%{?dist}
License: AGPLv3 License: AGPL-3.0-only
URL: http://hspell.ivrix.org.il/ URL: http://hspell.ivrix.org.il/
Source: http://hspell.ivrix.org.il/%{name}-%{version}.tar.gz Source: http://hspell.ivrix.org.il/%{name}-%{version}.tar.gz
Patch0: 0001-require-local-module-explicitly.patch Patch0: 0001-require-local-module-explicitly.patch
Patch1: hspell-1.4-remove-aspell-rule.patch
BuildRequires: hunspell-devel, perl-generators, zlib-devel BuildRequires: gcc, make, hunspell-devel
BuildRequires: perl-generators, perl-interpreter, zlib-devel
BuildRequires: perl(Carp), perl(FileHandle)
%description %description
Hspell is a Hebrew SPELLer and morphological analyzer. It provides a mostly Hspell is a Hebrew SPELLer and morphological analyzer. It provides a mostly
@ -44,8 +45,7 @@ Hebrew hunspell dictionaries.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .localreq %patch -P 0 -p1 -b .localreq
%patch1 -p1 -b .aspell-remove
/usr/bin/iconv -f hebrew -t utf8 -o WHATSNEW WHATSNEW /usr/bin/iconv -f hebrew -t utf8 -o WHATSNEW WHATSNEW
%build %build
@ -57,13 +57,13 @@ make hunspell
make DESTDIR=$RPM_BUILD_ROOT STRIP=: install make DESTDIR=$RPM_BUILD_ROOT STRIP=: install
rm -f $RPM_BUILD_ROOT/%{_libdir}/libhspell.a rm -f $RPM_BUILD_ROOT/%{_libdir}/libhspell.a
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell mkdir -p $RPM_BUILD_ROOT/%{_datadir}/hunspell
cp -p he.dic $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.dic cp -p he.dic $RPM_BUILD_ROOT/%{_datadir}/hunspell/he_IL.dic
cp -p he.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.aff cp -p he.aff $RPM_BUILD_ROOT/%{_datadir}/hunspell/he_IL.aff
%check %check
# there are three known failures # there are three known failures
! LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test | grep FAILED | grep -E -v '1/aspell/[489]' ! make test | grep FAILED | grep -E -v '1/aspell/[489]'
%files %files
%doc LICENSE README WHATSNEW COPYING %doc LICENSE README WHATSNEW COPYING
@ -81,17 +81,66 @@ cp -p he.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.aff
%files -n hunspell-he %files -n hunspell-he
%doc LICENSE %doc LICENSE
%{_datadir}/myspell/* %{_datadir}/hunspell/*
%post -p /sbin/ldconfig %ldconfig_scriptlets
%postun -p /sbin/ldconfig
%changelog %changelog
* Thu Sep 20 2018 Parag Nemade <pnemade AT fedoraproject DOT org> - 1.4-6 * Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.4-23
- Resolves:rh#1626335 - Bump release for October 2024 mass rebuild:
- fix aspell error in build.log Resolves: RHEL-64018
- fix %%check section
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.4-22
- Bump release for June 2024 mass rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 07 2023 Parag Nemade <pnemade AT redhat DOT com> - 1.4-18
- Migrate to SPDX license expression
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 29 2022 Parag Nemade <pnemade AT redhat DOT com> - 1.4-15
- Update hunspell dictionary directory path
https://fedoraproject.org/wiki/Changes/Hunspell_dictionary_dir_change
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Mar 26 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.4-10
- Add perl dependencies needed for build
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-5 * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

5
plans/hspell.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 (hspell-1.4.tar.gz) = d0c9205d9f6a7e9e2577b685418120542235d290ee8d95e2066694c45b4083e3ce1abc38c910714cde0941fa6b211522a8259b0d880a71c5b9c5a6d77a115f1a

11
tests/main.fmf Normal file
View File

@ -0,0 +1,11 @@
test: ./runtests.sh
duration: 10m
framework: beakerlib
require:
- hspell
- hunspell-he
- make
- gcc
- gzip
- zlib-devel
- rpm-build

41
tests/runtests.sh Executable file
View File

@ -0,0 +1,41 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
NAME=convmv
rlJournalStart
rlPhaseStartSetup
rlAssertRpm ${NAME}
rlShowPackageVersion ${NAME}
rlRun -t -l "VERSION=$(rpm -q ${NAME} --queryformat='%{version}')" 0 "Get VERSION"
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlFetchSrcForInstalled "${NAME}"
rlRun "rpm --define '_topdir $tmp' -i *src.rpm"
rlRun -t -l "mkdir BUILD" 0 "Creating BUILD directory"
rlRun -t -l "rpmbuild --noclean --nodeps --define '_topdir $tmp' -bp $tmp/SPECS/*spec"
if [ -d BUILD/${NAME}-${VERSION}-build ]; then
rlRun -t -l "pushd BUILD/${NAME}-${VERSION}-build/${NAME}-${VERSION}"
else
rlRun -t -l "pushd BUILD/${NAME}-${VERSION}"
fi
rlPhaseEnd
rlPhaseStartTest
rlRun "set -o pipefail"
rlRun "echo "Default installation does not have aspell binary so remove its execution""
rlRun "sed -i 's/he.rws hunspell/hunspell/g' Makefile.in"
rlRun "./configure"
rlRun "sed -i '82,84d' test/test1"
rlRun "make V=1 test"
rlRun "retval=$?"
rlRun "echo $retval"
rlRun "popd" 0
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd

View File

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

View File

@ -0,0 +1,10 @@
#!/usr/bin/python3
import enchant
lang = "he_IL"
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-he
test: python3 test_suggest_words.py
framework: shell

View File

@ -0,0 +1,9 @@
#!/usr/bin/python3
import enchant
wdlst = [ "שלום", "תֵה", "שַׁחַר"]
dic = enchant.Dict("he_IL")
for wd in wdlst:
dic.check(wd)
print("input word = {0}, Suggestions => {1}".format(wd, dic.suggest(wd)))