Sophie

Sophie

distrib > Mageia > 2 > i586 > media > core-release-src > by-pkgid > 52dd61bffc760ccabc877cf2287e6932 > files > 1

hunspell-mg-0.20050109.1-8.mga2.src.rpm

%define languageenglazy Malagasy
%define languagecode    mg
%define lc_ctype        mg_MG

%define upstream_version 20050109

Name:           hunspell-%{languagecode}
Version:        0.%{upstream_version}.1
Release:        %mkrel 8
Summary:        %{languageenglazy} hunspell dictionaries
License:        GPLv2+
Group:          System/Internationalization
URL:            http://borel.slu.edu/crubadan/apps.html
Source0:        http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/mg_MG.zip

BuildArch:      noarch

Suggests:       hunspell

Requires:       locales-mg
#Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific
Provides:       enchant-dictionary = 2
Provides:       hunspell-dictionary
Provides:       hunspell-%{lc_ctype} = %{version}-%{release}
#Generic providing - see Mageia values
Provides:       dictionary-%{languagecode} = 2 
Provides:       dictionary-%{lc_ctype} = 2

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

AutoReqProv:    no

%description
%{languageenglazy} hunspell dictionaries.


%prep
%setup -q -c

%build
for i in README_mg_MG.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
install -D -m 0644 -p mg_MG.dic %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.dic
install -D -m 0644 -p mg_MG.aff %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.aff

#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
popd #%%{buildroot}%%{_datadir}/myspell

%files
%doc README_mg_MG.txt
%{_datadir}/hunspell/*
%{_datadir}/myspell/*


%changelog

* Tue Mar 20 2012 kamil <kamil> 0.20050109.1-8.mga2
+ Revision: 224735
- add requirement on locales (mga#4632)

* Tue Feb 14 2012 kamil <kamil> 0.20050109.1-7.mga2
+ Revision: 208572
- adapt .spec to the current policies

* Sat Mar 12 2011 dmorgan <dmorgan> 0.20050109.1-6.mga2
+ Revision: 68929
- imported package hunspell-mg