File monoid-fonts.spec of Package monoid-fonts
#
# spec file for package monoid-fonts
#
# Copyright (c) 2020 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: monoid-fonts
Version: 0.61
Release: 1
License: OFL-1.1 or MIT
Summary: Open Source Coding Font
Url: http://larsenwork.com/monoid/
Group: System/X11/Fonts
Source1: monoid-0.61.zip
BuildRequires: unzip
BuildRequires: fontforge
BuildRequires: fontpackages-devel
BuildArch: noarch
%reconfigure_fonts_prereq
%description
Monoid is customizable and optimized for coding with bitmap-like sharpness at
12px/9pt even on low res displays.
%prep
unzip %{S:1}
cd monoid-%{version}
sed -n '247,$p' Readme.md > License.md
cd Scripts
cp %{_sourcedir}/fontbuilder-python3.patch .
patch -sp1 < fontbuilder-python3.patch
%build
cd monoid-%{version}
export PYTHONPATH=./Scripts/
python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid.sfdir");'
python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid-Bold.sfdir");'
python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid-Italic.sfdir");'
python3 -c 'import fontbuilder; fontbuilder.build("_build", "Source/Monoid-Retina.sfdir");'
%install
install -d %{buildroot}%{_ttfontsdir}
install -m0644 monoid-%{version}/_build/*.ttf %{buildroot}%{_ttfontsdir}
%reconfigure_fonts_scriptlets
%files
%defattr(-,root,root)
%doc monoid-%{version}/Readme.md
%license monoid-%{version}/License.md
%{_ttfontsdir}