diff --git a/0001-require-local-module-explicitly.patch b/0001-require-local-module-explicitly.patch new file mode 100644 index 0000000..a02a581 --- /dev/null +++ b/0001-require-local-module-explicitly.patch @@ -0,0 +1,54 @@ +From 4573c39c4a5bfbcd36941c2ead3d4d93d9ac85e4 Mon Sep 17 00:00:00 2001 +From: Dan Kenigsberg +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 + diff --git a/hspell-1.4.tar.gz b/hspell-1.4.tar.gz new file mode 100644 index 0000000..22d4e1e Binary files /dev/null and b/hspell-1.4.tar.gz differ diff --git a/hspell.spec b/hspell.spec new file mode 100644 index 0000000..a2514bc --- /dev/null +++ b/hspell.spec @@ -0,0 +1,82 @@ +Name: hspell +Version: 1.4 +Release: 7 +Summary: A checker for Hebrew spell +License: AGPLv3 +URL: http://hspell.ivrix.org.il/ +Source0: http://hspell.ivrix.org.il/hspell-%{version}.tar.gz +Patch0000: 0001-require-local-module-explicitly.patch + +BuildRequires: hunspell-devel perl-generators zlib-devel gcc + +%description +Hspell is a free Hebrew spell-checker and morphological analyzer, which provides a spell-like +interface that can give the list of wrong words in the input text and prints all known +meanings of a Hebrew string. + +%package devel +Summary: Provides library and include files for Hspell +Requires: hspell = %{version}-%{release} + +%description devel +This package provides library and include files for applications that want to use Hspell. + +%package -n hunspell-he +Summary: Provides dictionaries for hebrew hunspell +Requires: hunspell + +%description -n hunspell-he +The package provides hebrew hunspell dictionaries. + +%package help +Summary: Help docs for hspell and hspell-devel + +%description help +This help package contains help and man docs for hspell and hspell-devel + +%prep +%autosetup -n hspell-%{version} -p1 +/usr/bin/iconv -f hebrew -t utf8 -o WHATSNEW WHATSNEW + +%build +%configure --enable-fatverb --enable-linginfo --enable-shared +make +make hunspell + +%install +%make_install STRIP=: +install -Dp he.dic $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.dic +install -Dp he.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/he_IL.aff + +%check +make test + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%files +%doc LICENSE WHATSNEW COPYING +%{_bindir}/{hspell,hspell-i,multispell} +%{_libdir}/libhspell.so +%{_libdir}/libhspell.so.0 +%{_datadir}/hspell/ +%exclude %{_libdir}/libhspell.a + +%files devel +%{_includedir}/*.h + +%files -n hunspell-he +%doc LICENSE +%{_datadir}/myspell/* + +%files help +%doc README +%{_mandir}/man1/hspell.1* +%{_mandir}/man3/hspell.3* + +%changelog +* Tue Apr 14 2020 sunguoshuai - 1.4-7 +- Package init.