%global fontname fontawesome
%global fontconf 60-fontawesome.conf

Name:           fontawesome-fonts
Version:        4.7.0
Release:        8 
Summary:        The iconic font and CSS toolkit
License:        OFL and MIT
URL:            https://github.com/FortAwesome/Font-Awesome
Source0:        https://github.com/FortAwesome/Font-Awesome/archive/v4.7.0.zip
Source1:        README-Trademarks.txt

BuildArch:      noarch
BuildRequires:  fontpackages-devel ttembed
Requires:       fontpackages-filesystem

Provides:       %{name}-web = %{version}-%{release}
Obsoletes:      %{name}-web < %{version}-%{release}

%description
Font Awesome gives you scalable vector icons that can instantly be
customized — size, color, drop shadow, and anything that can be done with the
power of CSS.

%package_help

%prep
%autosetup -n Font-Awesome-%{version} -p1
cp -p %SOURCE1 .

%build
ttembed fonts/*.ttf fonts/*.otf

%install
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p fonts/*.ttf fonts/*.otf fonts/*.woff fonts/*.svg \
                   fonts/*.woff2 fonts/*.eot %{buildroot}%{_fontdir}
mkdir -p %{buildroot}%{_datadir}/font-awesome-web/
cp -a css less scss %{buildroot}%{_datadir}/font-awesome-web/

%files
%defattr(-,root,root)
%{_datadir}/font-awesome-web/
%{_datadir}/fonts/fontawesome/*

%files help
%defattr(-,root,root)
%doc README-Trademarks.txt

%changelog
* Mon Sep 14 2020 Ge Wang <wangge20@huawei.com> - 4.7.0-8
- Modify Source0 Url

* Fri Feb 14 2020 yanzhihua <yanzhihua4@huawei.com> - 4.7.0-7
- Package init
