19f51d7af4
fail in prep script
61 lines
1.6 KiB
RPMSpec
61 lines
1.6 KiB
RPMSpec
Name: hunspell-ar
|
|
Summary: Arabic hunspell dictionaries
|
|
%define upstreamid 20060208
|
|
Version: 0.%{upstreamid}
|
|
Release: 1%{?dist}
|
|
Source0: http://hunspell.sourceforge.net/buckwalter_morphan_1_hunspell_patch.tar.gz
|
|
Source1: http://www.andy-roberts.net/software/buckwalter2unicode/buckwalter2unicode.py
|
|
Group: Applications/Text
|
|
URL: http://hunspell.sourceforge.net
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
License: GPL
|
|
BuildArch: noarch
|
|
|
|
Requires: hunspell
|
|
|
|
%description
|
|
Arabic (Egypt, Algeria, etc.) hunspell dictionaries
|
|
|
|
%prep
|
|
%setup -q -n buckwalter_morphan_1_hunspell_patch
|
|
cp %{SOURCE1} convert2hunspell
|
|
chmod +x convert2hunspell/buckwalter2unicode.py
|
|
|
|
%build
|
|
cd convert2hunspell
|
|
make
|
|
|
|
./buckwalter2unicode.py -i arabic_alias.dic -o ../ar_LB.dic
|
|
grep -v '^.FX' arabic_alias.aff > nonFX
|
|
grep '^.FX' arabic_alias.aff > FX.in
|
|
./buckwalter2unicode.py -i FX.in -d ' ' -c 4 -o FX
|
|
cat nonFX FX > ../ar_LB.aff
|
|
|
|
tr -d '\r' < ../doc/readme.txt > ../doc/readme.txt.new
|
|
mv -f ../doc/readme.txt.new ../doc/readme.txt
|
|
|
|
%install
|
|
rm -rf $RPM_BUILD_ROOT
|
|
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/myspell
|
|
cp -p *.dic *.aff $RPM_BUILD_ROOT/%{_datadir}/myspell
|
|
|
|
pushd $RPM_BUILD_ROOT/%{_datadir}/myspell/
|
|
ar_LB_aliases="ar_AE ar_BH ar_DZ ar_EG ar_IN ar_IQ ar_JO ar_KW ar_LY ar_MA ar_OM ar_QA ar_SA ar_SD ar_SY ar_TN ar_YE"
|
|
for lang in $ar_LB_aliases; do
|
|
ln -s ar_LB.aff $lang.aff
|
|
ln -s ar_LB.dic $lang.dic
|
|
done
|
|
popd
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc gpl.txt doc/readme.txt convert2hunspell/README
|
|
%{_datadir}/myspell/*
|
|
|
|
%changelog
|
|
* Wed Jun 06 2007 Caolan McNamara <caolanm@redhat.com> - 0.20060208-1
|
|
- initial version
|