%global fontname hack %global fontconf 60-%{fontname}.conf %global major 3 %global minor 000 Name: %{fontname}-fonts Version: %{major}.%{minor} Release: 1%{?dist} Summary: A typeface designed for source code License: SIL URL: http://sourcefoundry.org/hack/ Source0: https://github.com/chrissimpkins/Hack/releases/download/v2.010/Hack-v%{major}.%{minor}-ttf.tar.xz Source1: %{name}-fontconfig.conf Source2: https://raw.githubusercontent.com/chrissimpkins/Hack/master/README.md Source3: %{fontname}.metainfo.xml BuildArch: noarch BuildRequires: fontpackages-devel Requires: fontpackages-filesystem %description A typeface designed for source code %prep %setup -q -c %{name}-%{version} cp %{SOURCE2} . %build # No build necessary for now # Cosider in the future generate through sources ? %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}/%{fontconf} ln -s %{_fontconfig_templatedir}/%{fontconf} \ %{buildroot}%{_fontconfig_confdir}/%{fontconf} # Add AppStream metadata install -Dm 0644 -p %{SOURCE3} %{buildroot}%{_datadir}/appdata/%{fontname}.metainfo.xml %_font_pkg -f %{fontconf} *.ttf %if 0%{?rhel} <= 6 %doc README.md %else %license README.md %endif %{_datadir}/appdata/%{fontname}.metainfo.xml %changelog * Wed Nov 08 2017 Helio Chissini de Castro - 3.000-1 - Recompile f27 + new version * Sat Oct 08 2016 Helio Chissini de Castro - 2.020-2 - Recompile for f25 * Tue Apr 26 2016 Helio Chissini de Castro - 2.020-1 - New upstream release * Mon Jan 18 2016 Helio Chissini de Castro - 2.019-1 - New upstream release * Fri Nov 06 2015 Helio Chissini de Castro - 2.018-2 - Fix epel 6 compilation * Fri Nov 06 2015 Helio Chissini de Castro - 2.018-1 - New upstream version * Mon Aug 31 2015 Helio Chissini de Castro - 2.010 - New font package