File nerd-fonts.spec of Package nerd-fonts
#
# spec file for package nerd-fonts
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 Luciano Santos <luc14n0@opensuse.org>
# Copyright (c) 2025 itachi re <itachi_re@opensuse.org>
# 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/
#
# install.sh script relies on bashisms
%define _buildshell /bin/bash
Name: nerd-fonts
Version: 3.0.0
Release: 0
Summary: The complete Nerd Fonts iconic font collection
License: OFL-1.1 AND MIT
URL: https://nerdfonts.com
Source: %{name}-%{version}.tar.zst
BuildRequires: bash
BuildRequires: fontpackages-devel
BuildArch: noarch
%reconfigure_fonts_prereq
%description
Nerd Fonts is a project that patches developer targeted fonts with
a high number of glyphs (icons). [cite: 174]
Specifically to add a high number
of extra glyphs from popular 'iconic fonts' such as Font Awesome,
Devicons, Octicons, Hack, Source Code Pro and others. [cite: 174]
This package provides the **complete collection** of all Nerd Fonts in
a single package.
%prep
%autosetup -p1
#
# Replace spaces with underscore in file names
#
find patched-fonts/* -type f -name '* *' -exec rename -a ' ' '_' '{}' \;
#
# No need to keep ProFont's Windows fonts around
#
rm -rf patched-fonts/ProFont/ProFontWinTweaked/ [cite: 450]
%build
# Nothing to be done here. [cite: 450]
%check
#nothing to check
%install
# Create the target directory
install -d -m 755 %{buildroot}%{_ttfontsdir}
# Find all font files (.ttf and .otf) in the patched-fonts directory
# and install them to the buildroot font directory.
find patched-fonts/ -type f \( -name "*.otf" -o -name "*.ttf" \) -exec install -v -m 644 -D -t %{buildroot}%{_ttfontsdir} {} +
%files
%license LICENSE
%doc changelog.md readme.md license-audit.md
%dir %{_ttfontsdir}
%{_ttfontsdir}/*
%changelog