%global fontname source-sans-pro
%global fontconf 63-%{fontname}.conf
%global major_version 3
%global minor_version 028
Name: adobe-source-sans-pro-fonts
Version: %{major_version}.%{minor_version}
Release: 1%{?dist}
Summary: A set of OpenType fonts designed for user interfaces
License: OFL
URL: https://github.com/adobe-fonts/%{fontname}
Source0: %{url}/releases/download/%{version}R/source-sans-%{major_version}v%{minor_version}R.zip
Source1: %{name}-fontconfig.conf
Source2: %{fontname}.metainfo.xml
BuildRequires: fontpackages-devel
Requires: fontpackages-filesystem
BuildArch: noarch
%description
Source Sans is a set of OpenType fonts that have been designed to work well in
user interface (UI) environments, as well as in text setting for screen and
print.
%prep
%autosetup -c
%build
%install
install -dm 0755 $RPM_BUILD_ROOT%{_fontdir}
install -pm 0644 OTF/*.otf $RPM_BUILD_ROOT%{_fontdir}
install -dm 0755 $RPM_BUILD_ROOT%{_fontconfig_templatedir} $RPM_BUILD_ROOT%{_fontconfig_confdir}
install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_fontconfig_templatedir}/%{fontconf}
ln -s %{_fontconfig_templatedir}/%{fontconf} $RPM_BUILD_ROOT%{_fontconfig_confdir}/%{fontconf}
# Add AppStream metadata
install -Dpm 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/appdata/%{fontname}.metainfo.xml
%_font_pkg -f %{fontconf} *.otf
%doc README.md
%license LICENSE.md
%{_datadir}/appdata/%{fontname}.metainfo.xml
%changelog
* Fri Dec 25 2020 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.028-1
- Initial release for EPEL