Name:    sil-padauk-fonts
Version: 5.001
Release: 1
Summary: A font for Burmese and the Myanmar script
License: OFL-1.1
URL:     https://software.sil.org/padauk/
Source0: https://github.com/silnrsi/font-padauk/releases/download/v%{version}/Padauk-%{version}.zip
Source1: sil-padauk-fonts-fontconfig.conf
Source2: sil-padauk-fonts-book-fontconfig.conf
BuildArch: noarch
BuildRequires: fontpackages-devel fonttools
Requires:      fontpackages-filesystem

%description
Padauk is a pan Burma font designed to support all Myanmar script based \
languages. It covers all of the Unicode Myanmar script blocks and works \
on all OpenType and Graphite based systems.

%package -n sil-padauk-book-fonts
Summary:  A font for Burmese and the Myanmar script

%description -n sil-padauk-book-fonts
Padauk Book family font.

%prep
%setup -q -n Padauk-%{version}

%install
install -m 0755 -d %{buildroot}%{_datadir}/fonts/sil-padauk
install -m 0644 -p *.ttf %{buildroot}%{_datadir}/fonts/sil-padauk

install -m 0755 -d %{buildroot}%{_datadir}/fontconfig/conf.avail 
install -m 0644 -p %{SOURCE1} %{buildroot}%{_datadir}/fontconfig/conf.avail/65-sil-padauk.conf
install -m 0644 -p %{SOURCE2} %{buildroot}%{_datadir}/fontconfig/conf.avail/65-sil-padauk-book.conf

install -m 0755 -d %{buildroot}/etc/fonts/conf.d
ln -s %{_datadir}/fontconfig/conf.avail/65-sil-padauk.conf %{buildroot}/etc/fonts/conf.d/65-sil-padauk.conf
ln -s %{_datadir}/fontconfig/conf.avail/65-sil-padauk-book.conf %{buildroot}/etc/fonts/conf.d/65-sil-padauk-book.conf

%files
%dir %{_datadir}/fonts/sil-padauk
%{_datadir}/fonts/sil-padauk/Padauk-Regular.ttf
%{_datadir}/fonts/sil-padauk/Padauk-Bold.ttf
%{_datadir}/fontconfig/conf.avail/65-sil-padauk.conf
%config(noreplace) /etc/fonts/conf.d/65-sil-padauk.conf
%doc *.txt documentation

%files -n sil-padauk-book-fonts
%dir %{_datadir}/fonts/sil-padauk
%{_datadir}/fonts/sil-padauk/PadaukBook*.ttf
%{_datadir}/fontconfig/conf.avail/65-sil-padauk-book.conf
%config(noreplace) /etc/fonts/conf.d/65-sil-padauk-book.conf
%doc *.txt documentation

%changelog
* Sat Sep 02 2023 Ge Wang <wang__ge@126.com> - 5.001-1
- Update to version 5.001

* Wed Apr 20 2022 liuyumeng <liuyumeng5@h-partners.com> - 3.003-5
- fix the error of license

* Sat Nov 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.003-4
- Package init
