From d5f93385442b155c9179c8e5efde5cfa0ac0b848 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 19 Aug 2022 18:49:56 +0900 Subject: [PATCH] Omit foundry name in family name. --- fonts-rpm-macros-omit-foundry-in-family.patch | 14 ++++++++++++++ fonts-rpm-macros.spec | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 fonts-rpm-macros-omit-foundry-in-family.patch diff --git a/fonts-rpm-macros-omit-foundry-in-family.patch b/fonts-rpm-macros-omit-foundry-in-family.patch new file mode 100644 index 0000000..943dd06 --- /dev/null +++ b/fonts-rpm-macros-omit-foundry-in-family.patch @@ -0,0 +1,14 @@ +diff -pruN fonts-rpm-macros-2.0.5.orig/rpm/lua/srpm/fonts.lua fonts-rpm-macros-2.0.5/rpm/lua/srpm/fonts.lua +--- fonts-rpm-macros-2.0.5.orig/rpm/lua/srpm/fonts.lua 2020-04-03 07:55:50.000000000 +0900 ++++ fonts-rpm-macros-2.0.5/rpm/lua/srpm/fonts.lua 2022-07-29 18:57:38.183789875 +0900 +@@ -118,7 +118,9 @@ local function env(suffix, verbose, glob + fedora.explicitunset("current" .. g, verbose) + end + end +- local basename = rpm.expand("%{?foundry" .. suffix .. ":%{foundry" .. suffix .. "} }%{fontfamily" .. suffix .. "}") ++ local foundry = rpm.expand("%{?foundry" .. suffix .. ":%{foundry" .. suffix .. "}}") ++ local family = string.gsub(rpm.expand("%{fontfamily" .. suffix .. "}"), "^" .. foundry, "") ++ local basename = foundry .. " " .. family + fedora.safeset("fontpkgname" .. suffix, rpmname(basename), verbose) + fedora.safeset("fonthumanname" .. suffix, basename, verbose) + fedora.safeset("fontdir" .. suffix, "%{_fontbasedir}/%{fontpkgname" .. suffix .. "}", verbose) diff --git a/fonts-rpm-macros.spec b/fonts-rpm-macros.spec index d936cdd..3cb5ccc 100644 --- a/fonts-rpm-macros.spec +++ b/fonts-rpm-macros.spec @@ -18,12 +18,13 @@ Version: 2.0.5 BuildArch: noarch Name: fonts-rpm-macros -Release: 8%{?dist} +Release: 9%{?dist} Summary: Build-stage rpm automation for fonts packages License: GPLv3+ URL: https://docs.fedoraproject.org/en-US/packaging-guidelines/FontsPolicy/ Source: %{forgesource} +Patch0: %{name}-omit-foundry-in-family.patch Requires: fonts-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Requires: fonts-filesystem = %{?epoch:%{epoch}:}%{version}-%{release} @@ -92,6 +93,7 @@ for template in templates/rpm/*\.spec ; do grep -v '^%%dnl' "${template}" > "${target}" touch -r "${template}" "${target}" done +%patch0 -p1 -b .1-omit-foundry-in-family %install install -m 0755 -d %{buildroot}%{_fontbasedir} \ @@ -147,6 +149,9 @@ install -m 0755 -vp bin/* %{buildroot}%{_bindir} %doc %{ftcgtemplatedir}/*txt %changelog +* Fri Aug 19 2022 Akira TAGOH - 1:2.0.5-9 +- Omit foundry name in family name. + * Thu Jul 21 2022 Fedora Release Engineering - 1:2.0.5-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild