hunspell-en/hunspell-en.spec
2024-01-05 23:44:58 +01:00

89 lines
2.5 KiB
RPMSpec

Name: hunspell-en
Version: 20110410
Release: 1mamba
Summary: English hunspell dictionaries
Group: System/Internationalization
Vendor: openmamba
Distribution: openmamba
Packager: gil <puntogil@libero.it>
URL: http://wordlist.sourceforge.net/
# svn co https://wordlist.svn.sourceforge.net/svnroot/wordlist/trunk wordlist
# tar czf hunspell-en-wordlist-2011025-src-svn.tar.gz wordlist
Source0: hunspell-en-wordlist-20110410-src-svn.tar.gz
Source1: http://en-gb.pyxidium.co.uk/dictionary/en_GB.zip
Patch0: hunspell-en-2011025-mozilla_words.patch
Patch1: hunspell-en-2011025-en_GB-singleletters.patch
Patch2: hunspell-en-2011025-en_GB-two_initial_caps.patch
Patch3: hunspell-en-2011025-en_US-strippedabbrevs.patch
Patch4: hunspell-en-2011025-allow-non-typographical-marks.patch
Patch5: hunspell-en-2011025-SI_and_IEC.patch
License: BSD, LGPL
BuildRequires: aspell
BuildRequires: hunspell
BuildRequires: zip
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
English hunspell dictionaries
%prep
%setup -q -n wordlist
%setup -q -T -D -a 1 -n wordlist
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
make
cd scowl/speller
make hunspell
for i in README_en_CA.txt README_en_US.txt; do
if ! iconv -f utf-8 -t utf-8 -o /dev/null $i > /dev/null 2>&1; then
iconv -f ISO-8859-1 -t UTF-8 $i > $i.new
touch -r $i $i.new
mv -f $i.new $i
fi
tr -d '\r' < $i > $i.new
touch -r $i $i.new
mv -f $i.new $i
done
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_datadir}/myspell
cp -p *.dic *.aff %{buildroot}%{_datadir}/myspell
cd scowl/speller
cp -p en_*.dic en_*.aff %{buildroot}%{_datadir}/myspell
pushd %{buildroot}%{_datadir}/myspell/
for lang in en_AG en_AU en_BS en_BW en_BZ en_DK en_GH en_HK en_IE en_IN en_JM en_NA en_NG en_NZ en_SG en_TT en_ZA en_ZW; do
ln -s en_GB.aff $lang.aff
ln -s en_GB.dic $lang.dic
done
ln -s en_US.aff en_PH.aff
ln -s en_US.dic en_PH.dic
popd
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_datadir}/myspell/en_*.aff
%{_datadir}/myspell/en_*.dic
%doc README_en_GB.txt scowl/speller/README_en_CA.txt scowl/speller/README_en_US.txt
%changelog
* Sun Apr 10 2011 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 20110410-1mamba
- update to 20110410
* Tue Jan 25 2011 gil <puntogil@libero.it> 2011025-1mamba
- update to 2011025
* Sat Jan 31 2009 gil <puntogil@libero.it> 20090131-1mamba
- package created by autospec