Compare commits
31 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce78a7aaa4 | ||
|
|
4d74ea0df9 | ||
|
|
b2f261fa6f |
||
|
|
975ed4ee7b | ||
|
|
6b0cfb956e | ||
|
|
3ff49da80a | ||
|
|
7017373e6d | ||
|
|
82a1a2e887 |
||
|
|
848656df4f | ||
|
|
c911004bc0 | ||
|
|
d04e73b0cf |
||
|
|
afb67a6a1f | ||
|
|
ff5e3efa96 | ||
|
|
e98e4ebe8c |
||
|
|
319a06235d | ||
|
|
5258790b99 | ||
|
|
f701db5a30 | ||
|
|
c3610ec5b3 | ||
|
|
9e2aa3310d | ||
|
|
a5deed06f9 | ||
|
|
9a916cd967 | ||
|
|
b5318f6d3d |
||
|
|
7880145e7b | ||
|
|
29acaca81a | ||
|
|
2698470c69 | ||
|
|
a9a1bc2eae | ||
|
|
1847c23ded | ||
|
|
f18538edf0 | ||
|
|
eae114f21f | ||
|
|
0f1ead69a2 | ||
|
|
4db466c1c7 |
12 changed files with 234 additions and 15 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/hspell-1.3.tar.gz
|
||||
/hspell-1.4.tar.gz
|
||||
|
|
|
|||
54
0001-require-local-module-explicitly.patch
Normal file
54
0001-require-local-module-explicitly.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
From 4573c39c4a5bfbcd36941c2ead3d4d93d9ac85e4 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Kenigsberg <danken@cs.technion.ac.il>
|
||||
Date: Sat, 15 Jul 2017 21:28:03 +0300
|
||||
Subject: [PATCH] require local module explicitly
|
||||
|
||||
this allows build hspell when perl runs in taint mode which does not
|
||||
include the current directory in @INC
|
||||
---
|
||||
binarize-desc.pl | 2 +-
|
||||
genprefixes.pl | 2 +-
|
||||
pmerge | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/binarize-desc.pl b/binarize-desc.pl
|
||||
index dbf0b1c..f62ebc6 100755
|
||||
--- a/binarize-desc.pl
|
||||
+++ b/binarize-desc.pl
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
use Carp;
|
||||
|
||||
-require "PrefixBits.pl";
|
||||
+require "./PrefixBits.pl";
|
||||
|
||||
# "perl -w" warns about variables only used once (it assumes they are a
|
||||
# typo). This ugliness gets rid of this warning. Is there a more sensible way?
|
||||
diff --git a/genprefixes.pl b/genprefixes.pl
|
||||
index 450a7ca..9ae9e50 100755
|
||||
--- a/genprefixes.pl
|
||||
+++ b/genprefixes.pl
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
-require "PrefixBits.pl";
|
||||
+require "./PrefixBits.pl";
|
||||
|
||||
sub find_prefixes {
|
||||
my $INQUISITIVE_HE=shift;
|
||||
diff --git a/pmerge b/pmerge
|
||||
index 83ad949..9ceb9de 100755
|
||||
--- a/pmerge
|
||||
+++ b/pmerge
|
||||
@@ -8,7 +8,7 @@
|
||||
use IO::File;
|
||||
use Carp;
|
||||
|
||||
-require "PrefixBits.pl";
|
||||
+require "./PrefixBits.pl";
|
||||
|
||||
# "perl -w" warns about variables only used once (it assumes they are a
|
||||
# typo). This ugliness gets rid of this warning. Is there a more sensible way?
|
||||
--
|
||||
2.9.4
|
||||
|
||||
103
hspell.spec
103
hspell.spec
|
|
@ -1,29 +1,33 @@
|
|||
Summary: A Hebrew spell checker
|
||||
Name: hspell
|
||||
Version: 1.3
|
||||
Release: 3%{?dist}
|
||||
License: AGPLv3
|
||||
Group: Applications/Text
|
||||
Version: 1.4
|
||||
Release: 24%{?dist}
|
||||
License: AGPL-3.0-only
|
||||
URL: http://hspell.ivrix.org.il/
|
||||
Source: http://hspell.ivrix.org.il/%{name}-%{version}.tar.gz
|
||||
Patch0: 0001-require-local-module-explicitly.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
|
||||
Hspell is a Hebrew SPELLer and morphological analyzer. It provides a mostly
|
||||
spell-like interface (gives the list of wrong words in the input text), but can
|
||||
also suggest corrections (-c). It also provides a true morphological analyzer
|
||||
(-l), that prints all known meanings of a Hebrew string.
|
||||
Hspell 1.4 still follows the old (pre June 2017) spelling standard of the
|
||||
Academy of the Hebrew Language.
|
||||
|
||||
%description -l he
|
||||
Hspell הוא מאיית ומנתח צורני עברי, המספק מנשק דמוי-spell - פולט רשימה של המילים
|
||||
השגויות המופיעות בקלט. Hspell מקפיד מאוד כללי האקדמיה העברית לכתיב חסר ניקוד
|
||||
("כתיב מלא"). כמו כן, Hspell מספק (-l) מנתח מורפולוגי אשר מדפיס את כל
|
||||
המשמעויות האפשריות של מחרוזת אותיות עברית.
|
||||
גרסה 1.4 תואמת עדיין לכללי האיות הישנים (טרם יוני 2017) של האקדמיה.
|
||||
|
||||
%package devel
|
||||
Summary: Library and include files for Hspell, the Hebrew spell checker
|
||||
Group: Applications/Text
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
|
|
@ -34,7 +38,6 @@ Library and include files for applications that want to use Hspell.
|
|||
|
||||
%package -n hunspell-he
|
||||
Summary: Hebrew hunspell dictionaries
|
||||
Group: Applications/Text
|
||||
Requires: hunspell
|
||||
|
||||
%description -n hunspell-he
|
||||
|
|
@ -42,6 +45,7 @@ Hebrew hunspell dictionaries.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 0 -p1 -b .localreq
|
||||
/usr/bin/iconv -f hebrew -t utf8 -o WHATSNEW WHATSNEW
|
||||
|
||||
%build
|
||||
|
|
@ -53,9 +57,9 @@ make hunspell
|
|||
make DESTDIR=$RPM_BUILD_ROOT STRIP=: install
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/libhspell.a
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell
|
||||
cp -p he.dic $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.dic
|
||||
cp -p he.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.aff
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/hunspell
|
||||
cp -p he.dic $RPM_BUILD_ROOT/%{_datadir}/hunspell/he_IL.dic
|
||||
cp -p he.aff $RPM_BUILD_ROOT/%{_datadir}/hunspell/he_IL.aff
|
||||
|
||||
%check
|
||||
# there are three known failures
|
||||
|
|
@ -77,13 +81,84 @@ cp -p he.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.aff
|
|||
|
||||
%files -n hunspell-he
|
||||
%doc LICENSE
|
||||
%{_datadir}/myspell/*
|
||||
%{_datadir}/hunspell/*
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%changelog
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-24
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-23
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-22
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_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
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Jul 15 2017 Dan Kenigsberg <danken@cs.technion.ac.il> - 1.4-1
|
||||
- Sync with upstream hspell-1.4
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
5
plans/hspell.fmf
Normal file
5
plans/hspell.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
351850c9f6974a709dd092a2d1063e4a hspell-1.3.tar.gz
|
||||
SHA512 (hspell-1.4.tar.gz) = d0c9205d9f6a7e9e2577b685418120542235d290ee8d95e2066694c45b4083e3ce1abc38c910714cde0941fa6b211522a8259b0d880a71c5b9c5a6d77a115f1a
|
||||
|
|
|
|||
11
tests/main.fmf
Normal file
11
tests/main.fmf
Normal 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
41
tests/runtests.sh
Executable 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
|
||||
|
||||
6
tests/test_dic_availability.fmf
Normal file
6
tests/test_dic_availability.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
require:
|
||||
- python3-enchant
|
||||
- hunspell-he
|
||||
test: python3 test_dic_availability.py
|
||||
framework: shell
|
||||
|
||||
10
tests/test_dic_availability.py
Normal file
10
tests/test_dic_availability.py
Normal 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")
|
||||
6
tests/test_suggest_words.fmf
Normal file
6
tests/test_suggest_words.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
require:
|
||||
- python3-enchant
|
||||
- hunspell-he
|
||||
test: python3 test_suggest_words.py
|
||||
framework: shell
|
||||
|
||||
9
tests/test_suggest_words.py
Normal file
9
tests/test_suggest_words.py
Normal 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)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue