File google-literata-fonts.spec of Package google-literata-fonts

#
# spec file for package google-literata-fonts
#
# Copyright (c) 2024 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/
#

%global desc Literata is designed by TypeTogether. It was commisioned for Google Play Books.\
Two versions of the family exist, one for print and the other for Ebooks. This\
is the print version of the family.
Name:           google-literata-fonts
Version:        3.103
Release:        0
Summary:        A contemporary serif typeface family for long-form reading
License:        OFL-1.1
Group:          System/X11/Fonts
URL:            https://github.com/googlefonts/literata
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  fontpackages-devel
BuildArch:      noarch

%description
%{desc}

%package -n google-literata-variable-fonts
Summary:        A contemporary serif typeface family for long-form reading (variable version)

%description -n google-literata-variable-fonts
%{desc} This package contains the variable version of fonts.

%package -n google-literata-fonts-doc
Summary:        A contemporary serif typeface family for long-form reading (documentation)

%description -n google-literata-fonts-doc
%{desc} This package contains the documentation.

%prep
%autosetup -n literata-%{version}
find Documentation -name \*.mp4 -delete

%build

%install
install -dm0755 %{buildroot}%{_ttfontsdir}
install -m0644 fonts/{ttf,variable}/*.ttf %{buildroot}%{_ttfontsdir}

install -dm0755 %{buildroot}%{_defaultdocdir}/google-literata-fonts-doc
cp -prf Documentation/* %{buildroot}%{_defaultdocdir}/google-literata-fonts-doc
%fdupes %{buildroot}%{_defaultdocdir}/google-literata-fonts-doc

%reconfigure_fonts_scriptlets

%files
%license OFL.txt
%doc AUTHORS.txt README.md CONTRIBUTORS.txt
%dir %{_ttfontsdir}
%{_ttfontsdir}/*.ttf
%exclude %{_ttfontsdir}/Literata*[opsz,wght].ttf

%files -n google-literata-variable-fonts
%license OFL.txt
%doc AUTHORS.txt README.md CONTRIBUTORS.txt
%dir %{_ttfontsdir}
%{_ttfontsdir}/Literata*[opsz,wght].ttf

%files -n google-literata-fonts-doc
%license OFL.txt
%doc AUTHORS.txt README.md CONTRIBUTORS.txt Documentation/*

%changelog
openSUSE Build Service is sponsored by