Name:        hunspell-be
Version:     1.1
Release:     17
Summary:     Hunspell dictionaries for Belarusian
License:     GPL+ and LGPLv2+
URL:         http://extensions.services.openoffice.org/project/dict-be-official
Source:      https://downloads.sourceforge.net/project/aoo-extensions/2412/1/dict-be-official.oxt
BuildArch:   noarch
Requires:    hunspell
Supplements: (hunspell and langpacks-be)

%description
This package provides hunspell dictionaries for Belarusian

%package -n hyphen-be
Summary:     Rules for Belarusian hyphenation
Requires:    hyphen
Supplements: (hyphen and langpacks-be)

%description -n hyphen-be
Rules for Belarusian hyphenation.

%prep
%autosetup -c -n hunspell-be -p1

%build
sed -i -e "s/microsoft-cp1251/CP1251/g" be-official.aff hyph_be_BY.dic
tail -n +3 hyph_be_BY.dic| head -n 3 > README_hyph_be_BY

%install
install -d $RPM_BUILD_ROOT/%{_datadir}/myspell
install -p be-official.aff $RPM_BUILD_ROOT/%{_datadir}/myspell/be_BY.aff
install -p be-official.dic $RPM_BUILD_ROOT/%{_datadir}/myspell/be_BY.dic
install -d $RPM_BUILD_ROOT/%{_datadir}/hyphen
install -p hyph_be_BY.dic $RPM_BUILD_ROOT/%{_datadir}/hyphen/hyph_be_BY.dic

%files
%{_datadir}/myspell/*

%files -n hyphen-be
%doc README_hyph_be_BY
%{_datadir}/hyphen/*

%changelog
* Sun Apr 26 15:36:25 CST 2020 sunguoshuai <sunguoshuai@huawei,com> - 1.1-17
- Package init
