%define languageenglazy Catalan %define languagecode ca %define lc_ctype ca_ES Name: hunspell-%{languagecode} Version: 2.2.0 Release: %mkrel 6 Summary: %{languageenglazy} hunspell dictionaries License: GPLv2+ Group: System/Internationalization URL: http://www.softcatala.org/wiki/Projectes/Corrector_ortogrà fic Source0: http://www.softcatala.org/diccionaris/actualitzacions/OOo/catalan.oxt BuildArch: noarch Suggests: hunspell Requires: locales-ca #Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific Provides: enchant-dictionary = 2 Provides: hunspell-dictionary Provides: hunspell-%{lc_ctype} = %{version}-%{release} Provides: hunspell-ca_AD = %{version}-%{release} Provides: hunspell-ca_FR = %{version}-%{release} Provides: hunspell-ca_IT = %{version}-%{release} #Generic providing - see Mageia values Provides: dictionary-%{languagecode} = 2 Provides: dictionary-%{lc_ctype} = 2 Provides: dictionary-ca_AD = 2 Provides: dictionary-ca_FR = 2 Provides: dictionary-ca_IT = 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 tr -d '\r' < dictionaries/catalan.aff > ca_ES.aff touch -r dictionaries/catalan.aff ca_ES.aff tr -d '\r' < dictionaries/catalan.dic > ca_ES.dic touch -r dictionaries/catalan.dic ca_ES.dic chmod 0644 LICENSES-en.txt LLICENCIES-ca.txt %install install -D -m 0644 -p *.dic %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.dic install -D -m 0644 -p *.aff %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.aff ca_ES_aliases="ca_AD ca_FR ca_IT" pushd %{buildroot}%{_datadir}/hunspell for lang in $ca_ES_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 $ca_ES_aliases do ln -s ../hunspell/$lang.dic $lang.dic ln -s ../hunspell/$lang.aff $lang.aff done popd #%%{buildroot}%%{_datadir}/myspell %files %doc LICENSES-en.txt LLICENCIES-ca.txt %{_datadir}/hunspell/* %{_datadir}/myspell/* %changelog * Tue Mar 20 2012 kamil <kamil> 2.2.0-6.mga2 + Revision: 224579 - add requirement on locales (mga#4632) * Sun Feb 12 2012 kamil <kamil> 2.2.0-5.mga2 + Revision: 207661 - use better obsoleting of myspell * Mon Jan 16 2012 kamil <kamil> 2.2.0-4.mga2 + Revision: 196830 - adapt .spec to the current policies + lmenut <lmenut> - fix permissions of world-writable files * Sat Mar 12 2011 dmorgan <dmorgan> 2.2.0-2.mga1 + Revision: 68689 - imported package hunspell-ca