Sophie

Sophie

distrib > Mageia > 2 > i586 > by-pkgid > 35b69b53b9884f044bbe4d01002956fd > files > 1

hunspell-ar-0.20080110.1-9.mga2.src.rpm

%define languageenglazy Arabic
%define languagecode    ar
%define lc_ctype        ar_TN

%define upstream_version 20080110

Name:           hunspell-%{languagecode}
Version:        0.%{upstream_version}.1
Release:        %mkrel 9
Summary:        %{languageenglazy} hunspell dictionaries
License:        GPLv2 or LGPLv2 or MPLv1.1
Group:          System/Internationalization
URL:            http://ayaspell.sourceforge.net/
Source0:        http://downloads.sourceforge.net/ayaspell/%{name}_%{upstream_version}.tar.gz

BuildArch:      noarch

Suggests:       hunspell

Requires:       locales-ar
#Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific
Provides:       enchant-dictionary = 2
Provides:       hunspell-dictionary
Provides:       hunspell-%{lc_ctype} = %{version}-%{release}
Provides:       hunspell-ar_AE = %{version}-%{release}
Provides:       hunspell-ar_BH = %{version}-%{release}
Provides:       hunspell-ar_DJ = %{version}-%{release}
Provides:       hunspell-ar_DZ = %{version}-%{release}
Provides:       hunspell-ar_EG = %{version}-%{release}
Provides:       hunspell-ar_ER = %{version}-%{release}
Provides:       hunspell-ar_IL = %{version}-%{release}
Provides:       hunspell-ar_IN = %{version}-%{release}
Provides:       hunspell-ar_IQ = %{version}-%{release}
Provides:       hunspell-ar_JO = %{version}-%{release}
Provides:       hunspell-ar_KM = %{version}-%{release}
Provides:       hunspell-ar_KW = %{version}-%{release}
Provides:       hunspell-ar_LB = %{version}-%{release}
Provides:       hunspell-ar_LY = %{version}-%{release}
Provides:       hunspell-ar_MA = %{version}-%{release}
Provides:       hunspell-ar_MR = %{version}-%{release}
Provides:       hunspell-ar_OM = %{version}-%{release}
Provides:       hunspell-ar_PS = %{version}-%{release}
Provides:       hunspell-ar_QA = %{version}-%{release}
Provides:       hunspell-ar_SA = %{version}-%{release}
Provides:       hunspell-ar_SD = %{version}-%{release}
Provides:       hunspell-ar_SO = %{version}-%{release}
Provides:       hunspell-ar_SY = %{version}-%{release}
Provides:       hunspell-ar_TD = %{version}-%{release}
Provides:       hunspell-ar_YE = %{version}-%{release}
#Generic providing - see Mageia values
Provides:       dictionary-%{languagecode} = 2 
Provides:       dictionary-%{lc_ctype} = 2
Provides:       dictionary-ar_AE = 2
Provides:       dictionary-ar_BH = 2
Provides:       dictionary-ar_DJ = 2
Provides:       dictionary-ar_DZ = 2
Provides:       dictionary-ar_EG = 2
Provides:       dictionary-ar_ER = 2
Provides:       dictionary-ar_IL = 2
Provides:       dictionary-ar_IN = 2
Provides:       dictionary-ar_IQ = 2
Provides:       dictionary-ar_JO = 2
Provides:       dictionary-ar_KM = 2
Provides:       dictionary-ar_KW = 2
Provides:       dictionary-ar_LB = 2
Provides:       dictionary-ar_LY = 2
Provides:       dictionary-ar_MA = 2
Provides:       dictionary-ar_MR = 2
Provides:       dictionary-ar_OM = 2
Provides:       dictionary-ar_PS = 2
Provides:       dictionary-ar_QA = 2
Provides:       dictionary-ar_SA = 2
Provides:       dictionary-ar_SD = 2
Provides:       dictionary-ar_SD = 2
Provides:       dictionary-ar_SO = 2
Provides:       dictionary-ar_SY = 2
Provides:       dictionary-ar_TD = 2
Provides:       dictionary-ar_YE = 2

#MySpell is deprecated
Obsoletes:      myspell-%{languagecode} < 1.0.3
Provides:       myspell-%{languagecode}
Obsoletes:      myspell-ar_AR < 1.0.3
Provides:       myspell-ar_AR

AutoReqProv:    no

%description
%{languageenglazy} (Egypt, Algeria, etc.) hunspell dictionaries


%prep
%setup -q -n %{name}_%{upstream_version}

%build

%install
install -D -m 0644 -p %{languagecode}.dic %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.dic
install -D -m 0644 -p %{languagecode}.aff %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.aff

ar_TN_aliases="ar_AE ar_BH ar_DJ ar_DZ ar_EG ar_ER ar_IL ar_IN ar_IQ ar_JO ar_KM ar_KW ar_LB ar_LY ar_MA ar_MR ar_OM ar_PS ar_QA ar_SA ar_SD ar_SO ar_SY ar_TD ar_YE"
pushd %{buildroot}%{_datadir}/hunspell
    for lang in $ar_TN_aliases
    do
        ln -s %{lc_ctype}.aff $lang.aff
        ln -s %{lc_ctype}.dic $lang.dic
    done
popd #%%{buildroot}%%{_datadir}/hunspell

#backward compatibility
mkdir -p %{buildroot}%{_datadir}/myspell
pushd %{buildroot}%{_datadir}/myspell
    ln -s ../hunspell/%{lc_ctype}.dic %{lc_ctype}.dic
    ln -s ../hunspell/%{lc_ctype}.aff %{lc_ctype}.aff

    for lang in $ar_TN_aliases
    do
        ln -s ../hunspell/$lang.dic $lang.dic
        ln -s ../hunspell/$lang.aff $lang.aff
    done
popd #%%{buildroot}%%{_datadir}/myspell

%files
%doc AUTHORS ChangeLog-ar COPYING README-ar THANKS
%{_datadir}/hunspell/*
%{_datadir}/myspell/*


%changelog

* Tue Mar 20 2012 kamil <kamil> 0.20080110.1-9.mga2
+ Revision: 224555
- add requirement on locales (mga#4632)

* Sun Feb 12 2012 kamil <kamil> 0.20080110.1-8.mga2
+ Revision: 207630
- use better obsoleting of myspell

* Sun Jan 15 2012 kamil <kamil> 0.20080110.1-7.mga2
+ Revision: 196583
- drop requirement on locales
- hunspell is now suggested

* Mon Jan 09 2012 kamil <kamil> 0.20080110.1-6.mga2
+ Revision: 194093
- adapt the file to the current policy
  o use languageenglazy, languagecode, lc_ctype defines
  o add requirements on locales-%%{languagecode}
  o add providing of
  x enchant-dictionary
  x hunspell-dictionary
  x hunspell-%%{lc_ctype} and variants
  x dictionary-%%{languagecode}
  x dictionary-%%{lc_ctype} and variants
  o install files into %%{_datadir}/hunspell/*
  o add backward compatibility for myspell
  o obsolete myspell-ar
- clean spec

* Sat Mar 12 2011 dmorgan <dmorgan> 0.20080110.1-5.mga1
+ Revision: 68643
- imported package hunspell-ar