Name:          google-crosextra-carlito-fonts
Version:       1.103
Release:       1.0.20130920
Summary:       Sans-serif font with Calibri font from google
License:       OFL
URL:           https://www.ctan.org/tex-archive/fonts/carlito
Source0:       http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/crosextrafonts-carlito-20130920.tar.gz
Source1:       30-0-google-crosextra-carlito-fontconfig.conf
Source2:       62-google-crosextra-carlito-fontconfig.conf
Source3:       google-crosextra-carlito.metainfo.xml

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

%description
Carlito is sans-serif typeface family based on Lato metric-compatible with Calibri font.

%prep
%autosetup -n crosextrafonts-carlito-20130920 -p1

%build

%install
install -m 0755 -d %{buildroot}%{_fontdir}
install -m 0644 -p *.ttf %{buildroot}%{_fontdir}
install -m 0755 -d %{buildroot}%{_fontconfig_templatedir} %{buildroot}%{_fontconfig_confdir}

install -m 0644 -p %{SOURCE1} %{buildroot}%{_fontconfig_templatedir}/30-0-google-crosextra-carlito-fontconfig.conf
install -m 0644 -p %{SOURCE2} %{buildroot}%{_fontconfig_templatedir}/62-google-crosextra-carlito-fontconfig.conf

ln -s %{_fontconfig_templatedir}/30-0-google-crosextra-carlito-fontconfig.conf \
      %{buildroot}%{_fontconfig_confdir}/30-0-google-crosextra-carlito-fontconfig.conf
ln -s %{_fontconfig_templatedir}/62-google-crosextra-carlito-fontconfig.conf \
      %{buildroot}%{_fontconfig_confdir}/62-google-crosextra-carlito-fontconfig.conf

install -Dm 0644 -p %{SOURCE3} %{buildroot}%{_datadir}/appdata/google-crosextra-carlito.metainfo.xml

%_font_pkg -f *-google-crosextra-carlito-fontconfig.conf *.ttf

%doc LICENSE
%{_datadir}/appdata/google-crosextra-carlito.metainfo.xml

%changelog
* Fri Apr 23 2018 lizhenhua <lizhenhua21@huawei.com> - 1.103-1.0.20130920
- Package init
