hyphen-bg/hyphen-bg.spec
2021-06-01 17:07:53 +08:00

47 lines
1.4 KiB
RPMSpec

Name: hyphen-bg
Version: 4.3
Release: 16
Summary: rules for Bulgarian hyphenation
License: GPLv2+ or LGPLv2+ or MPLv1.1
URL: http://bgoffice.sourceforge.net/
Source: http://downloads.sourceforge.net/bgoffice/OOo-hyph-bg-%{version}.zip
Requires: hyphen
BuildArch: noarch
BuildRequires: git
Supplements: (hyphen and langpacks-bg)
%description
rules for Bulgarian hyphenation.
%prep
%autosetup -n OOo-hyph-bg-%{version} -p1 -S git
%build
for i in ChangeLog Copyright GPL-2.0.txt LGPL-2.1.txt MPL-1.1.txt README.bulgarian; do
if ! iconv -f utf-8 -t utf-8 -o /dev/null $i > /dev/null 2>&1; then
iconv -f ISO-8859-2 -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
echo "UTF-8" > hyph_bg_BG.dic.new
tail -n +2 hyph_bg_BG.dic | iconv -f WINDOWS-1251 -t UTF-8 | tr -d '\r' >> hyph_bg_BG.dic.new
mv hyph_bg_BG.dic.new hyph_bg_BG.dic
%install
install -Dp *.dic $RPM_BUILD_ROOT/%{_datadir}/hyphen/hyph_bg_BG.dic
%files
%doc ChangeLog Copyright GPL-2.0.txt LGPL-2.1.txt MPL-1.1.txt README.bulgarian
%{_datadir}/hyphen/*
%changelog
* Tue Jun 01 2021 wulei <wulei80@huawei.com> - 4.3-16
- fixes failed: git no such file or directory
* Thu Apr 30 2020 Jeffery.Gao <gaojianxing@huawei.com> - 4.3-15
- Package init