# file: hack-fonts.spec # Source1000: vdb.lua %include %{S:1000} %Global Font Hack %global ver 3.003 %global rel 0.vdb.6 %global appid org.sourcefoundry.%{font} Name: %{font}-fonts Version: %{ver} Release: %{rel}%{?dist} Summary: A typeface designed for source code Group: User Interface/X License: Bitstream Vera and Public Domain and MIT URL: https://sourcefoundry.org/hack/ Source0: https://github.com/source-foundry/%{Font}/archive/v%{ver}.tar.gz#/%{Font}-%{ver}.tar.gz Source1001: %{name}.metainfo.xml BuildArch: noarch BuildRequires: coreutils BuildRequires: %{__m4} Requires: filesystem # ${_datadir}/appdata # ${_datadir}/doc Requires: fontpackages-filesystem # ${_datadir}/fonts # Description taken from README.md %description No frills. No gimmicks. Hack is hand groomed and optically balanced to be a workhorse face for code. It has deep roots in the libre, open source typeface community and expands upon the contributions of the Bitstream Vera & DejaVu projects. The face has been re-designed with a larger glyph set, modifications of the original glyph shapes (including distinct point styles and semi-bold punctuation weight in the regular set to make non-alphabetic characters less transparent), and meticulous attention to metrics (including numerous spacing adjustments to improve the rhythm of the face and the legibility of code at small text sizes). The large x-height + wide aperture + low contrast design combined with PostScript hinting/hint replacement programs and a TrueType instruction set make it highly legible at commonly used source code text sizes with a sweet spot that runs in the 8px—12px range on modern desktop and laptop monitors. Combine it with an HD monitor and you can comfortably work at 6 or 7px sizes. %prep %setup -q -n %{Font}-%{ver} %build %{__m4} \ -D ID="%{appid}" \ -D LICENSE="%{license}" \ -D SUMMARY="%{summary}" \ -D URL="%{url}" \ -D CONTACT="van.de.bugger@gmail.com" \ "%{S:1001}" > "%{appid}.metainfo.xml.tmp" %{__mv} "%{appid}.metainfo.xml.tmp" "%{appid}.metainfo.xml" %check %if %{author_check} # This check is mandatory: %{_bindir}/appstream-util validate-relax "%{appid}.metainfo.xml" # These checks are optional: status= # I want to run both checks even if the first fails. %{_bindir}/appstream-util validate "%{appid}.metainfo.xml" || status="$status:$?" %{_bindir}/appstreamcli validate "%{appid}.metainfo.xml" || status="$status:$?" [[ -z $status ]] %endif %install %_install_D -p -m u=rw,go=r -t "%{buildroot}%{_fontdir}/%{font}" build/ttf/*.ttf %_install_D -p -m u=rw,go=r -t "%{buildroot}%{_metainfodir}" "%{appid}.metainfo.xml" %files %dir %{_fontdir}/%{font} %{_fontdir}/%{font}/*.ttf %{_metainfodir}/*.metainfo.xml %doc CHANGELOG.md README.md %license LICENSE.md %post if [ -x %{_bindir}/fc-cache ]; then %{_bindir}/fc-cache %{_fontdir}/%{font} fi %postun if [ $1 -eq 0 -a -x %{_bindir}/fc-cache ]; then %{_bindir}/fc-cache %{_fontdir}/%{font} fi %changelog * Sat Sep 26 2020 Van de Bugger - 3.003-0.vdb.6 - F33. * Wed Nov 06 2019 Van de Bugger - 3.003-0.vdb.5 - metainfo.xml files are checked only if SPEC_AUTHOR_CHECK env var is set. It allows Mageia and OpenSuse builds. - Application ID changed to make `appstreamcli validate` happy. - URL uses https protocol. - libappstream-glib is not required for build. - Name of metainfo file changed to use app id, not just font name. - Checks are run only if SPEC_AUTHOR_CHECK env var is set. - _metainfodir macro used. * Thu Oct 31 2019 Van de Bugger - 3.003-0.vdb.4 - vdb.lua updated. - spec slightly fixed to work on epel. - release number changed. * Sun Mar 24 2019 Van de Bugger - 3.003-0.4.vdb - vdb.lua updated, _install_D macro used. - epel-7 build enabled. * Sat Mar 23 2019 Van de Bugger - 3.003-0.3.vdb - Rebuilt for F30. - vdb.lua updated. - NOTE: Release changed in non-backward-compatible way. Sorry. * Wed Jan 16 2019 Van de Bugger - 3.003-2.vdb - New vdb.lua used. * Mon Aug 20 2018 Van de Bugger - 3.003-1.vdb - Updated to v3.003. * Mon Aug 20 2018 Van de Bugger - 3.002-1.vdb - Updated to v3.002. * Mon Aug 20 2018 Van de Bugger - 3.001-1.vdb - Updated to v3.001. * Mon Oct 30 2017 Van de Bugger - 3.000-1.vdb - Updated to 3.000. - vdb.lua used. * Mon Nov 28 2016 Van de Bugger - 2.020-3.vdb - F22 dropped, F25 added, ppc64le enabled. * Thu Jun 30 2016 Van de Bugger - 2.020-2.vdb - Building rpm does not use remote git repo any more. - Few doc files added to the package. - Minor changes in the spec. - Dropped RHEL support. - vdb tag added to release number. * Mon Jun 27 2016 Van de Bugger - 2.020-1 - Updated to 2.020. * Sat Jan 23 2016 Van de Bugger - 2.019-1 - Updated to 2.019. - Fixed typo in description. - Requirements added. * Wed Jan 6 2016 Van de Bugger - 2.018-2 - Implemented check for metainfo.xml. - --single-branch git option dropped to let the package build on RHEL 6. - Second paragraph added to desctription. - update_contact added to metainfo.xml. * Wed Jan 6 2016 Van de Bugger - 2.018-1 - First release.