File cozette-bitmap-fonts.spec of Package cozette-fonts
#
# spec file for package cozette-fonts
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define pythons python3
%define skip_python2 1
%define skip_python39 1
%define skip_python310 1
%define fontname Cozette
%define projname cozette
%define bitmap_fontdir %{_fontsdir}/%{projname}
Name: cozette-bitmap-fonts
Version: 1.13.0
Release: 0
Summary: A bitmap programming font
License: MIT
Group: System/X11/Fonts
URL: https://github.com/slavfox/Cozette
Source0: Cozette-%{version}.tar
Patch0: no-git-changelog.patch
BuildRequires: %{python_module Pillow >= 8.3.2}
BuildRequires: %{python_module crayons}
BuildRequires: %{python_module fonttools}
BuildRequires: %{python_module numpy}
BuildRequires: %{pythons} = 3.8
BuildRequires: %{suseconfig_fonts_prereq}
BuildRequires: fontforge
BuildRequires: fontpackages-devel
BuildArch: noarch
%reconfigure_fonts_prereq
%description
A bitmap font with great coverage of all the glyphs
you might encounter in the terminal.
%package -n %{projname}-ttf-fonts
Summary: Cozette font (TTF)
Group: System/X11/Fonts
%reconfigure_fonts_prereq
%description -n %{projname}-ttf-fonts
A bitmap font with great coverage of all the glyphs
you might encounter in the terminal (True Type version).
%prep
%setup -q -n %{fontname}-%{version}
%patch0 -p1
%build
%python_exec build.py fonts
%install
##find build -type f -not -name '*.otb' -delete
mkdir -p %{buildroot}%{bitmap_fontdir}
mkdir -p %{buildroot}%{_ttfontsdir}
install -m 0644 build/*.otb %{buildroot}%{bitmap_fontdir}
install -m 0644 build/*.ttf %{buildroot}%{_ttfontsdir}
%reconfigure_fonts_scriptlets -n %{projname}-bitmap-fonts
%reconfigure_fonts_scriptlets -c -n %{projname}-ttf-fonts
%files
%{bitmap_fontdir}
%license LICENSE
%doc CHANGELOG.md README.md
%files -n %{projname}-ttf-fonts
%{_ttfontsdir}
%changelog