%define languageenglazy Portuguese %define languagecode pt %define lc_ctype pt_PT %define upstream_version 20120911 Name: hunspell-%{languagecode} Version: 0.%{upstream_version}.1 Release: %mkrel 2 Summary: %{languageenglazy} hunspell dictionaries License: ((LGPLv3 or MPL) and LGPLv2) and (GPLv2 or LGPLv2 or MPLv1.1) Group: System/Internationalization URL: http://www.broffice.org/verortografico/baixar Source0: http://natura.di.uminho.pt/download/sources/Dictionaries/hunspell/hunspell-pt_PT-%{upstream_version}.tar.gz Source1: http://extensions.libreoffice.org/extension-center/vero-verificador-ortografico-e-hifenizador-em-portugues-do-brasil/pscreleasefolder.2012-01-04.1563120832/2.1/vero_pt_br_v210aoc.oxt BuildArch: noarch Suggests: hunspell Requires: locales-pt #Mageia values: 1 - aspell, 2 - hunspell, 3 - language specific Provides: enchant-dictionary = 2 Provides: hunspell-dictionary Provides: hunspell-%{lc_ctype} = %{version}-%{release} Provides: hunspell-pt_BR = %{version}-%{release} #Generic providing - see Mageia values Provides: dictionary-%{languagecode} = 2 Provides: dictionary-%{lc_ctype} = 2 Provides: dictionary-pt_BR = 2 #MySpell is deprecated Obsoletes: myspell-%{languagecode} < 1.0.3 Provides: myspell-%{languagecode} Obsoletes: myspell-%{lc_ctype} < 1.0.3 Provides: myspell-%{lc_ctype} Obsoletes: myspell-pt_BR < 1.0.3 Provides: myspell-pt_BR AutoReqProv: no %description %{languageenglazy} hunspell dictionaries. %prep %setup -q -n hunspell-pt_PT-%{upstream_version} unzip -q -o %{SOURCE1} for i in README_pt_BR.TXT README_pt_PT.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 %build %install # warning: it is installing pt_PT and pt_BR install -D -m 0644 -p pt_PT.dic %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.dic install -D -m 0644 -p pt_PT.aff %{buildroot}%{_datadir}/hunspell/%{lc_ctype}.aff install -D -m 0644 -p pt_BR.dic %{buildroot}%{_datadir}/hunspell/pt_BR.dic install -D -m 0644 -p pt_BR.aff %{buildroot}%{_datadir}/hunspell/pt_BR.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 ln -s ../hunspell/pt_BR.dic pt_BR.dic ln -s ../hunspell/pt_BR.aff pt_BR.aff popd #%%{buildroot}%%{_datadir}/myspell %files %doc README_pt_BR.TXT README_pt_PT.txt COPYING %{_datadir}/hunspell/* %{_datadir}/myspell/* %changelog * Sat Jan 12 2013 umeabot <umeabot> 0.20120911.1-2.mga3 + Revision: 353654 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Thu Jan 10 2013 kamil <kamil> 0.20120911.1-1.mga3 + Revision: 344465 - sync version with Fedora: 0.20120911.1 - update license - update S0 and S1 * Sat Jun 30 2012 kamil <kamil> 0.20111025.1-6.mga3 + Revision: 265593 - fix installing pt_BR dicts (mga#6516) * Tue Mar 20 2012 kamil <kamil> 0.20111025.1-5.mga2 + Revision: 224806 - add requirement on locales (mga#4632) * Wed Feb 15 2012 kamil <kamil> 0.20111025.1-4.mga2 + Revision: 209053 - use better obsoleting of myspell * Wed Feb 08 2012 kamil <kamil> 0.20111025.1-3.mga2 + Revision: 206301 - adapt .spec to the current policies * Mon Oct 31 2011 zezinho <zezinho> 0.20111025.1-2.mga2 + Revision: 160498 - new version * Sat Mar 12 2011 dmorgan <dmorgan> 0.20101214.1-2.mga1 + Revision: 69034 - imported package hunspell-pt